Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

added getPressure() setPressure() #543

Merged
merged 4 commits into from
Oct 5, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -191,12 +191,21 @@ public boolean isSetEnergyStream() {
/** {@inheritDoc} */
@Override
public double getPressure() {
return 1.0;
return getFluid().getPressure();
}

/** {@inheritDoc} */
@Override
public void setPressure(double pressure) {}
public double getPressure(String unit) {
return getFluid().getPressure(unit);
}


/** {@inheritDoc} */
@Override
public void setPressure(double pressure) {
getFluid().setPressure(pressure);
}

/** {@inheritDoc} */
@Override
Expand Down Expand Up @@ -253,12 +262,15 @@ public int hashCode() {
/** {@inheritDoc} */
@Override
public boolean equals(Object obj) {
if (this == obj)
if (this == obj) {
return true;
if (obj == null)
}
if (obj == null) {
return false;
if (getClass() != obj.getClass())
}
if (getClass() != obj.getClass()) {
return false;
}
ProcessEquipmentBaseClass other = (ProcessEquipmentBaseClass) obj;
return Objects.equals(conditionAnalysisMessage, other.conditionAnalysisMessage)
&& Objects.equals(controller, other.controller)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,7 @@ public interface ProcessEquipmentInterface extends SimulationInterface, java.io.
*
* @return a {@link neqsim.thermo.system.SystemInterface} object
*/
default public SystemInterface getFluid() {
public default SystemInterface getFluid() {
return getThermoSystem();
}

Expand Down Expand Up @@ -134,6 +134,16 @@ default public SystemInterface getFluid() {
*/
public void setPressure(double pressure);

/**
* <p>
* getPressure.
* </p>
*
* @param unit a {@link java.lang.String} object
*
**/
public double getPressure(String unit);

/**
* <p>
* runConditionAnalysis.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -223,4 +223,16 @@ public String getConditionAnalysisMessage() {
public String[][] getResultTable() {
return null;
}

/**
* <p>
* getPressure.
* </p>
*
* @param unit a {@link java.lang.String} object
*
**/
public double getPressure(String unit) {
return 1.0;
}
}