Skip to content

Commit 62aa470

Browse files
authored
add GCV and WI for streams (#997)
1 parent e6f1062 commit 62aa470

File tree

2 files changed

+44
-0
lines changed

2 files changed

+44
-0
lines changed

src/main/java/neqsim/processSimulation/processEquipment/stream/Stream.java

+20
Original file line numberDiff line numberDiff line change
@@ -606,6 +606,26 @@ public double GCV() {
606606
return standard.getValue("GCV") * 1.0e3;
607607
}
608608

609+
/** {@inheritDoc} */
610+
@Override
611+
public double getGCV(String unit, double refTVolume, double refTCombustion) {
612+
Standard_ISO6976 standard =
613+
new Standard_ISO6976(getFluid().clone(), refTVolume, refTCombustion, unit);
614+
standard.setReferenceState("real");
615+
standard.calculate();
616+
return standard.getValue("GCV") * 1.0e3;
617+
}
618+
619+
/** {@inheritDoc} */
620+
@Override
621+
public double getWI(String unit, double refTVolume, double refTCombustion) {
622+
Standard_ISO6976 standard =
623+
new Standard_ISO6976(getFluid().clone(), refTVolume, refTCombustion, unit);
624+
standard.setReferenceState("real");
625+
standard.calculate();
626+
return standard.getValue("WI") * 1.0e3;
627+
}
628+
609629
/** {@inheritDoc} */
610630
@Override
611631
public double LCV() {

src/main/java/neqsim/processSimulation/processEquipment/stream/StreamInterface.java

+24
Original file line numberDiff line numberDiff line change
@@ -244,6 +244,30 @@ public default double getFlowRate(String unit) {
244244
*/
245245
public double GCV();
246246

247+
/**
248+
* <p>
249+
* getGCV.
250+
* </p>
251+
*
252+
* @param unit a String
253+
* @param refTVolume a double in Celcius
254+
* @param refTCombustion a double in Celcius
255+
* @return a double
256+
*/
257+
public double getGCV(String unit, double refTVolume, double refTCombustion);
258+
259+
/**
260+
* <p>
261+
* getWI.
262+
* </p>
263+
*
264+
* @param unit a String
265+
* @param refTVolume a double in Celcius
266+
* @param refTCombustion a double in Celcius
267+
* @return a double
268+
*/
269+
public double getWI(String unit, double refTVolume, double refTCombustion);
270+
247271
/**
248272
* <p>
249273
* LCV.

0 commit comments

Comments
 (0)