Skip to content

Commit 7ba0c3c

Browse files
authored
FixCCBCCT (#1296)
* update * update * update version
1 parent 010d6d8 commit 7ba0c3c

File tree

4 files changed

+37
-38
lines changed

4 files changed

+37
-38
lines changed

pom.xml

+1-1
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313
<version>${revision}</version>
1414

1515
<properties>
16-
<revision>3.0.19</revision>
16+
<revision>3.0.20</revision>
1717
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
1818
<project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding>
1919
<checkstyle.config.location>checkstyle_neqsim.xml</checkstyle.config.location>

pomJava21.xml

+1-1
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313
<version>${revision}${sha1}${changelist}</version>
1414

1515
<properties>
16-
<revision>3.0.19</revision>
16+
<revision>3.0.20</revision>
1717
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
1818
<project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding>
1919
<sha1/>

pomJava8.xml

+1-1
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313
<version>${revision}${sha1}${changelist}-Java8</version>
1414

1515
<properties>
16-
<revision>3.0.19</revision>
16+
<revision>3.0.20</revision>
1717
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
1818
<project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding>
1919
<sha1 />

src/main/java/neqsim/process/equipment/stream/Stream.java

+34-35
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,8 @@ public class Stream extends ProcessEquipmentBaseClass implements StreamInterface
3939

4040
protected SystemInterface thermoSystem;
4141

42-
// todo: is streamNumber ever anything besides 0 and 1? consider removing along with
42+
// todo: is streamNumber ever anything besides 0 and 1? consider removing along
43+
// with
4344
// numberOfStreams?
4445
protected int streamNumber = 0;
4546
/** Constant <code>numberOfStreams=0</code>. */
@@ -68,12 +69,13 @@ public Stream(String name) {
6869
* </p>
6970
*
7071
* <p>
71-
* NB! This construct uses the input stream object internally, i.e., it is not cloned. Use
72+
* NB! This construct uses the input stream object internally, i.e., it is not
73+
* cloned. Use
7274
* <code>streamObject.clone(newName)</code> rather than
7375
* <code>new Stream(newName,streamObject)</code>
7476
* </p>
7577
*
76-
* @param name name of stream
78+
* @param name name of stream
7779
* @param stream Stream to use as internal Stream.
7880
*/
7981
public Stream(String name, StreamInterface stream) {
@@ -89,10 +91,11 @@ public Stream(String name, StreamInterface stream) {
8991
* </p>
9092
*
9193
* <p>
92-
* NB! This construct uses the input thermoSystem object internally, i.e., it is not cloned.
94+
* NB! This construct uses the input thermoSystem object internally, i.e., it is
95+
* not cloned.
9396
* </p>
9497
*
95-
* @param name name of stream
98+
* @param name name of stream
9699
* @param thermoSystem System to use as internal System.
97100
*/
98101
public Stream(String name, SystemInterface thermoSystem) {
@@ -179,7 +182,8 @@ public Stream clone() {
179182
try {
180183
clonedSystem = (Stream) super.clone();
181184
} catch (Exception ex) {
182-
logger.error(ex.getMessage());;
185+
logger.error(ex.getMessage());
186+
;
183187
}
184188
if (stream != null) {
185189
clonedSystem.setStream(stream.clone());
@@ -251,8 +255,7 @@ public void setThermoSystemFromPhase(SystemInterface thermoSystem, String phaseT
251255
} else if (thermoSystem.hasPhaseType("oil")) {
252256
this.thermoSystem = thermoSystem.phaseToSystem(thermoSystem.getPhaseNumberOfPhase("oil"));
253257
} else if (thermoSystem.hasPhaseType("aqueous")) {
254-
this.thermoSystem =
255-
thermoSystem.phaseToSystem(thermoSystem.getPhaseNumberOfPhase("aqueous"));
258+
this.thermoSystem = thermoSystem.phaseToSystem(thermoSystem.getPhaseNumberOfPhase("aqueous"));
256259
} else {
257260
logger.warn("no phase of type " + phaseTypeName);
258261
logger.warn("...returning empty system ");
@@ -368,8 +371,7 @@ && getSpecification().equals("TP")) {
368371
double gasEnthalpy = thermoSystem.getPhase(0).getEnthalpy();
369372
double liquidEnthalpy = thermoSystem.getPhase(1).getEnthalpy();
370373

371-
double enthalpySpec =
372-
getGasQuality() * gasEnthalpy + (1.0 - getGasQuality()) * liquidEnthalpy;
374+
double enthalpySpec = getGasQuality() * gasEnthalpy + (1.0 - getGasQuality()) * liquidEnthalpy;
373375
thermoOps.PHflash(enthalpySpec);
374376
} catch (Exception ex) {
375377
logger.error(ex.getMessage(), ex);
@@ -472,7 +474,7 @@ public void phaseEnvelope() {
472474
SystemInterface localSyst = getFluid().clone();
473475
ThermodynamicOperations ops = new ThermodynamicOperations(localSyst);
474476
ops.setRunAsThread(true);
475-
ops.calcPTphaseEnvelope(true);
477+
ops.calcPTphaseEnvelope2();
476478
ops.waitAndCheckForFinishedCalculation(10000);
477479
ops.displayResult();
478480
// ops.getJfreeChart();
@@ -484,7 +486,7 @@ public double CCB(String unit) {
484486
SystemInterface localSyst = getFluid().clone();
485487
ThermodynamicOperations ops = new ThermodynamicOperations(localSyst);
486488
ops.setRunAsThread(true);
487-
ops.calcPTphaseEnvelope(true);
489+
ops.calcPTphaseEnvelope2();
488490
ops.waitAndCheckForFinishedCalculation(10000);
489491
if (unit.equals("bara") || unit.equals("bar")) {
490492
return ops.get("cricondenbar")[1];
@@ -505,7 +507,7 @@ public double CCT(String unit) {
505507
SystemInterface localSyst = getFluid().clone();
506508
ThermodynamicOperations ops = new ThermodynamicOperations(localSyst);
507509
ops.setRunAsThread(true);
508-
ops.calcPTphaseEnvelope(true);
510+
ops.calcPTphaseEnvelope2();
509511
ops.waitAndCheckForFinishedCalculation(10000);
510512
if (unit.equals("bara") || unit.equals("bar")) {
511513
return ops.get("cricondentherm")[1];
@@ -582,9 +584,9 @@ public String[][] reportResults() {
582584
* </p>
583585
*
584586
* @param propertyName a {@link java.lang.String} object
585-
* @param unit a {@link java.lang.String} object
586-
* @param phase a {@link java.lang.String} object
587-
* @param component a {@link java.lang.String} object
587+
* @param unit a {@link java.lang.String} object
588+
* @param phase a {@link java.lang.String} object
589+
* @param component a {@link java.lang.String} object
588590
* @return a {@link java.lang.Object} object
589591
*/
590592
public Object getProperty(String propertyName, String unit, String phase, String component) {
@@ -611,17 +613,15 @@ public double GCV() {
611613
@Override
612614
public double getHydrocarbonDewPoint(String temperatureUnit, double refpressure,
613615
String refPressureUnit) {
614-
HydrocarbonDewPointAnalyser dewPointAnalyser =
615-
new HydrocarbonDewPointAnalyser("dew point analyser", this);
616+
HydrocarbonDewPointAnalyser dewPointAnalyser = new HydrocarbonDewPointAnalyser("dew point analyser", this);
616617
dewPointAnalyser.setReferencePressure(refpressure);
617618
return dewPointAnalyser.getMeasuredValue(temperatureUnit);
618619
}
619620

620621
/** {@inheritDoc} */
621622
@Override
622623
public double getGCV(String unit, double refTVolume, double refTCombustion) {
623-
Standard_ISO6976 standard =
624-
new Standard_ISO6976(getFluid().clone(), refTVolume, refTCombustion, unit);
624+
Standard_ISO6976 standard = new Standard_ISO6976(getFluid().clone(), refTVolume, refTCombustion, unit);
625625
standard.setReferenceState("real");
626626
standard.calculate();
627627
return standard.getValue("SuperiorCalorificValue") * 1.0e3;
@@ -630,8 +630,7 @@ public double getGCV(String unit, double refTVolume, double refTCombustion) {
630630
/** {@inheritDoc} */
631631
@Override
632632
public double getWI(String unit, double refTVolume, double refTCombustion) {
633-
Standard_ISO6976 standard =
634-
new Standard_ISO6976(getFluid().clone(), refTVolume, refTCombustion, unit);
633+
Standard_ISO6976 standard = new Standard_ISO6976(getFluid().clone(), refTVolume, refTCombustion, unit);
635634
standard.setReferenceState("real");
636635
standard.calculate();
637636
return standard.getValue("SuperiorWobbeIndex") * 1.0e3;
@@ -640,8 +639,7 @@ public double getWI(String unit, double refTVolume, double refTCombustion) {
640639
/** {@inheritDoc} */
641640
@Override
642641
public Standard_ISO6976 getISO6976(String unit, double refTVolume, double refTCombustion) {
643-
Standard_ISO6976 standard =
644-
new Standard_ISO6976(getFluid().clone(), refTVolume, refTCombustion, unit);
642+
Standard_ISO6976 standard = new Standard_ISO6976(getFluid().clone(), refTVolume, refTCombustion, unit);
645643
standard.setReferenceState("real");
646644
return standard;
647645
}
@@ -660,7 +658,8 @@ public double LCV() {
660658
* Setter for the field <code>stream</code>.
661659
* </p>
662660
*
663-
* @param stream a {@link neqsim.process.equipment.stream.StreamInterface} object
661+
* @param stream a {@link neqsim.process.equipment.stream.StreamInterface}
662+
* object
664663
*/
665664
public void setStream(StreamInterface stream) {
666665
this.stream = stream;
@@ -702,21 +701,21 @@ public ArrayList<String[]> getReport() {
702701

703702
ArrayList<String[]> report = new ArrayList<String[]>();
704703
report.add(phases.toArray(new String[0]));
705-
report.add(new String[] {"temperature",
704+
report.add(new String[] { "temperature",
706705
Double.toString(getTemperature(neqsim.util.unit.Units.getSymbol("temperature"))),
707-
neqsim.util.unit.Units.getSymbol("temperature")});
708-
report.add(new String[] {"pressure",
706+
neqsim.util.unit.Units.getSymbol("temperature") });
707+
report.add(new String[] { "pressure",
709708
Double.toString(getPressure(neqsim.util.unit.Units.getSymbol("pressure"))),
710-
neqsim.util.unit.Units.getSymbol("pressure")});
711-
report.add(new String[] {"mass flow",
709+
neqsim.util.unit.Units.getSymbol("pressure") });
710+
report.add(new String[] { "mass flow",
712711
Double.toString(getFlowRate(neqsim.util.unit.Units.getSymbol("mass flow"))),
713-
neqsim.util.unit.Units.getSymbol("mass flow")});
714-
report.add(new String[] {"molar flow",
712+
neqsim.util.unit.Units.getSymbol("mass flow") });
713+
report.add(new String[] { "molar flow",
715714
Double.toString(getFlowRate(neqsim.util.unit.Units.getSymbol("molar flow"))),
716-
neqsim.util.unit.Units.getSymbol("molar flow")});
717-
report.add(new String[] {"volume flow",
715+
neqsim.util.unit.Units.getSymbol("molar flow") });
716+
report.add(new String[] { "volume flow",
718717
Double.toString(getFlowRate(neqsim.util.unit.Units.getSymbol("volume flow"))),
719-
neqsim.util.unit.Units.getSymbol("volume flow")});
718+
neqsim.util.unit.Units.getSymbol("volume flow") });
720719
return report;
721720
}
722721

0 commit comments

Comments
 (0)