Skip to content

Commit

Permalink
added getPressure() setPressure() (#543)
Browse files Browse the repository at this point in the history
* added getPressure() setPressure()

* update

* added setPressure

* update
  • Loading branch information
EvenSol committed May 22, 2023
1 parent a74a7dc commit bd1d502
Show file tree
Hide file tree
Showing 3 changed files with 40 additions and 6 deletions.
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;
}
}

0 comments on commit bd1d502

Please sign in to comment.