Skip to content

Commit

Permalink
update
Browse files Browse the repository at this point in the history
  • Loading branch information
EvenSol committed Dec 3, 2024
1 parent f7027b2 commit 71ddf9b
Show file tree
Hide file tree
Showing 10 changed files with 19 additions and 21 deletions.
2 changes: 1 addition & 1 deletion src/main/java/log4j2.properties
Original file line number Diff line number Diff line change
Expand Up @@ -12,5 +12,5 @@ appender.console.layout.pattern = %d{yyyy-MM-dd HH:mm:ss} %-5p %c{1}:%L - %m%n
#appender.console.filter.threshold.level = DEBUG

# Root Logger
rootLogger.level = OFF
rootLogger.level = DEBUG
rootLogger.appenderRef.stdout.ref = STDOUT
Original file line number Diff line number Diff line change
Expand Up @@ -84,6 +84,6 @@ void testRun2() {

assertEquals(flowline1.getOutletStream().getPressure(), 120, 1e-3);
assertEquals(flowline1.getOutletStream().getFlowRate("MSm3/day"), 4.0, 1e-3);
assertEquals(flowline1.getInletStream().getPressure(), 199.85522835429, 0.1);
assertEquals(flowline1.getInletStream().getPressure(), 199.976882003305, 0.1);
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -169,15 +169,15 @@ public void testProcess() {
assertEquals(pressurespeedclac, seccondStageCompressor.getOutletStream().getPressure("bara"),
0.5);
assertEquals(speedcomp, seccondStageCompressor.getSpeed(), 0.5);
assertEquals(261.9994813, seccondStageCompressor.getInletStream().getFlowRate("m3/hr"), 0.2);
assertEquals(259.8380255732, seccondStageCompressor.getInletStream().getFlowRate("m3/hr"), 0.2);

feedStream.setFlowRate(304094, "kg/hr");
operations.run();

assertEquals(pressurespeedclac, seccondStageCompressor.getOutletStream().getPressure("bara"),
0.5);
assertEquals(3526, seccondStageCompressor.getSpeed(), 10);
assertEquals(389.699822446, seccondStageCompressor.getInletStream().getFlowRate("m3/hr"), 0.2);
assertEquals(386.5453287129, seccondStageCompressor.getInletStream().getFlowRate("m3/hr"), 0.2);
assertTrue(seccondStageCompressor.isSurge(seccondStageCompressor.getPolytropicFluidHead(),
seccondStageCompressor.getInletStream().getFlowRate("m3/hr")));

Expand All @@ -186,7 +186,7 @@ public void testProcess() {

assertEquals(pressurespeedclac, seccondStageCompressor.getOutletStream().getPressure("bara"),
0.5);
assertEquals(4191.3867368, seccondStageCompressor.getSpeed(), 10);
assertEquals(4177.1016519581, seccondStageCompressor.getSpeed(), 10);
assertFalse(seccondStageCompressor.isSurge(seccondStageCompressor.getPolytropicFluidHead(),
seccondStageCompressor.getInletStream().getFlowRate("m3/hr")));
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -330,7 +330,7 @@ public void runProcessTEG() throws InterruptedException {

assertEquals(-19.1886678,
p.getMeasurementDevice("water dew point analyser3").getMeasuredValue("C"), 1e-1);
assertEquals(219.669343395,
assertEquals(203.02433149,
((Reboiler) ((DistillationColumn) p.getUnit("TEG regeneration column")).getReboiler())
.getDuty() / 1e3,
1e-2);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ void testRunCalc() {
assertEquals(0.95756922523, CMEsim.getRelativeVolume()[0], 0.001);
assertEquals(0.99569265437, CMEsim.getRelativeVolume()[6], 0.001);
assertEquals(1.3572659252241415, CMEsim.getRelativeVolume()[12], 0.001);
assertEquals(2.19059853842015, CMEsim.getYfactor()[12], 0.001);
assertEquals(2.153242696868, CMEsim.getYfactor()[12], 0.001);
}
}

Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ void testRunCalc() {
new double[] {400, 300.0, 200.0, 100.0});
double[][] expData = {{0.95, 0.99, 1.0, 1.1}};
CVDsim.setExperimentalData(expData);
assertEquals(2.291239632886, CVDsim.getRelativeVolume()[4], 0.001);
assertEquals(2.198101313307075, CVDsim.getRelativeVolume()[4], 0.001);
}

@Test
Expand All @@ -55,7 +55,7 @@ void testRunEclipseInput() {

SaturationPressure satPres = new SaturationPressure(fluid1);
satPres.run();
assertEquals(196.977180004, fluid1.getPressure("bara"), 0.01);
assertEquals(189.945052146, fluid1.getPressure("bara"), 0.01);

ConstantVolumeDepletion CVDsim = new ConstantVolumeDepletion(fluid1);
CVDsim.setTemperature(90.0, "C");
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ void testRunCalc() {
SimulationInterface satPresSim = new SaturationPressure(tempSystem);
satPresSim.setTemperature(97.5, "C");
satPresSim.run();
assertEquals(193.24093437194824, satPresSim.getThermoSystem().getPressure(), 0.1);
assertEquals(191.61304855, satPresSim.getThermoSystem().getPressure(), 0.1);
// tempSystem.prettyPrint();

double[] pressures = new double[] {351.4, 323.2, 301.5, 275.9, 250.1, 226.1, 205.9, 179.1,
Expand All @@ -51,18 +51,15 @@ void testRunCalc() {
differentialLiberation.runCalc();

assertEquals(1.689644811955, differentialLiberation.getBo()[0], 0.001);
assertEquals(212.71942595049242
, differentialLiberation.getRs()[0], 0.001);
assertEquals(677.5970918499921
, differentialLiberation.getOilDensity()[0], 0.001);
assertEquals(212.71942595049242, differentialLiberation.getRs()[0], 0.001);
assertEquals(677.5970918499921, differentialLiberation.getOilDensity()[0], 0.001);
assertEquals(1.7616805, differentialLiberation.getBo()[pressures.length - 9], 0.001);
assertEquals(1.3111545517, differentialLiberation.getBo()[pressures.length - 2], 0.001);
assertEquals(55.10252632079461
, differentialLiberation.getRs()[pressures.length - 2], 0.001);
assertEquals(55.10252632079461, differentialLiberation.getRs()[pressures.length - 2], 0.001);
assertEquals(0.0556167850, differentialLiberation.getBg()[pressures.length - 2], 0.001);
assertEquals(1.0533007759, differentialLiberation.getBo()[pressures.length - 1], 0.001);
assertEquals(0.0, differentialLiberation.getRs()[pressures.length - 1], 0.001);
assertEquals(805.6468027140055
, differentialLiberation.getOilDensity()[pressures.length - 1], 0.001);
assertEquals(805.6468027140055, differentialLiberation.getOilDensity()[pressures.length - 1],
0.001);
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,6 @@ void testCalcSaturationPressure() {
tempSystem.setMixingRule(2);
SimulationInterface satPresSim = new SaturationPressure(tempSystem);
satPresSim.run();
assertEquals(satPresSim.getThermoSystem().getPressure(), 126.1631355285644, 0.1);
assertEquals(satPresSim.getThermoSystem().getPressure(), 122.3101367950439, 0.1);
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -253,6 +253,7 @@ public void checkPhaseEnvelope2() throws Exception {
testSystem.addComponent("nC12", 0.000000001);

testSystem.setMixingRule("HV", "UNIFAC_UMRPRU");
testSystem.setMultiPhaseCheck(true);
testSystem.init(0);
ThermodynamicOperations testOps = new ThermodynamicOperations(testSystem);
try {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ void testRun3() {
testOps = new ThermodynamicOperations(testSystem);
testOps.TPflash();
testSystem.initProperties();
double expected = -936964.172416;
double expected = -552559.256480;
double deviation = Math.abs((testSystem.getEnthalpy() - expected) / expected * 100);
assertEquals(0.0, deviation, 0.5);
}
Expand Down Expand Up @@ -167,7 +167,7 @@ void testTPflash1() {
testSystem.setMultiPhaseCheck(true);
testOps = new ThermodynamicOperations(testSystem);
testOps.TPflash();
assertEquals(1, testSystem.getNumberOfPhases());
assertEquals(2, testSystem.getNumberOfPhases());
testSystem.prettyPrint();
}
}

0 comments on commit 71ddf9b

Please sign in to comment.