Skip to content

Commit 579e8c1

Browse files
authored
add vol correction test (#1041)
1 parent 5b99a15 commit 579e8c1

File tree

1 file changed

+21
-0
lines changed

1 file changed

+21
-0
lines changed

src/test/java/neqsim/thermo/component/NewComponentTest.java

+21
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@
77
import neqsim.thermo.ThermodynamicConstantsInterface;
88
import neqsim.thermo.phase.PhaseSrkEos;
99
import neqsim.thermo.system.SystemInterface;
10+
import neqsim.thermo.system.SystemPrEos;
1011
import neqsim.thermo.system.SystemSrkEos;
1112

1213
public class NewComponentTest extends neqsim.NeqSimTest {
@@ -95,4 +96,24 @@ public void setTCPC_test() {
9596
assertEquals(85.0, thermoSystem.getPhase(0).getComponent(0).getMolarMass("gr/mol"), 0.01);
9697

9798
}
99+
100+
@Test
101+
public void volTransTtest() {
102+
thermoSystem = new SystemPrEos(318.0, 20.01325);
103+
thermoSystem.addComponent("CO2", 1.0);
104+
thermoSystem.init(0);
105+
thermoSystem.init(1);
106+
thermoSystem.initPhysicalProperties("density");
107+
assertEquals(36.68212551, thermoSystem.getDensity("kg/m3"), 0.01);
108+
109+
thermoSystem.getComponent("CO2").setVolumeCorrectionT(0.2);
110+
111+
thermoSystem.initPhysicalProperties("density");
112+
assertEquals(37.6425616, thermoSystem.getDensity("kg/m3"), 0.01);
113+
114+
thermoSystem.getComponent("CO2").setRacketZ(0.3);
115+
116+
thermoSystem.initPhysicalProperties("density");
117+
assertEquals(37.557573, thermoSystem.getDensity("kg/m3"), 0.01);
118+
}
98119
}

0 commit comments

Comments
 (0)