Skip to content

Commit

Permalink
add GCV and WI for streams (#997)
Browse files Browse the repository at this point in the history
  • Loading branch information
EvenSol authored May 2, 2024
1 parent e6f1062 commit 62aa470
Show file tree
Hide file tree
Showing 2 changed files with 44 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -606,6 +606,26 @@ public double GCV() {
return standard.getValue("GCV") * 1.0e3;
}

/** {@inheritDoc} */
@Override
public double getGCV(String unit, double refTVolume, double refTCombustion) {
Standard_ISO6976 standard =
new Standard_ISO6976(getFluid().clone(), refTVolume, refTCombustion, unit);
standard.setReferenceState("real");
standard.calculate();
return standard.getValue("GCV") * 1.0e3;
}

/** {@inheritDoc} */
@Override
public double getWI(String unit, double refTVolume, double refTCombustion) {
Standard_ISO6976 standard =
new Standard_ISO6976(getFluid().clone(), refTVolume, refTCombustion, unit);
standard.setReferenceState("real");
standard.calculate();
return standard.getValue("WI") * 1.0e3;
}

/** {@inheritDoc} */
@Override
public double LCV() {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -244,6 +244,30 @@ public default double getFlowRate(String unit) {
*/
public double GCV();

/**
* <p>
* getGCV.
* </p>
*
* @param unit a String
* @param refTVolume a double in Celcius
* @param refTCombustion a double in Celcius
* @return a double
*/
public double getGCV(String unit, double refTVolume, double refTCombustion);

/**
* <p>
* getWI.
* </p>
*
* @param unit a String
* @param refTVolume a double in Celcius
* @param refTCombustion a double in Celcius
* @return a double
*/
public double getWI(String unit, double refTVolume, double refTCombustion);

/**
* <p>
* LCV.
Expand Down

0 comments on commit 62aa470

Please sign in to comment.