|
5 | 5 | import org.junit.jupiter.api.BeforeAll;
|
6 | 6 | import org.junit.jupiter.api.Disabled;
|
7 | 7 | import org.junit.jupiter.api.Test;
|
| 8 | +import neqsim.process.equipment.stream.Stream; |
8 | 9 | import neqsim.thermo.system.SystemInterface;
|
9 | 10 | import neqsim.thermo.system.SystemSrkEos;
|
10 | 11 | import neqsim.thermodynamicoperations.ThermodynamicOperations;
|
@@ -164,6 +165,44 @@ void testCalculate2() {
|
164 | 165 | */
|
165 | 166 | }
|
166 | 167 |
|
| 168 | + |
| 169 | + @Test |
| 170 | + void testCalculate3() { |
| 171 | + SystemInterface testSystem = new SystemSrkEos(273.15, 1.0); |
| 172 | + testSystem.addComponent("methane", 0.92470); |
| 173 | + testSystem.addComponent("ethane", 0.035); |
| 174 | + testSystem.addComponent("propane", 0.0098); |
| 175 | + testSystem.addComponent("n-butane", 0.00220); |
| 176 | + testSystem.addComponent("i-butane", 0.0034); |
| 177 | + testSystem.addComponent("n-pentane", 0.0006); |
| 178 | + testSystem.addComponent("nitrogen", 0.0175); |
| 179 | + testSystem.addComponent("CO2", 0.0068); |
| 180 | + testSystem.createDatabase(true); |
| 181 | + testSystem.setMixingRule(2); |
| 182 | + |
| 183 | + testSystem.init(0); |
| 184 | + Standard_ISO6976 standard = new Standard_ISO6976(testSystem, 15, 15, "volume"); |
| 185 | + standard.setReferenceState("real"); |
| 186 | + standard.setReferenceType("volume"); |
| 187 | + standard.calculate(); |
| 188 | + Assertions.assertEquals(0.99764929782, standard.getValue("CompressionFactor"), 1e-3); |
| 189 | + Assertions.assertEquals(35144.8789915, standard.getValue("InferiorCalorificValue"), 5); |
| 190 | + Assertions.assertEquals(38959.473378295, standard.getValue("GCV"), 1e-5); |
| 191 | + |
| 192 | + Assertions.assertEquals(50107.49824498, standard.getValue("SuperiorWobbeIndex"), 1e-5); |
| 193 | + Assertions.assertEquals(45201.380041, standard.getValue("InferiorWobbeIndex"), 1e-5); |
| 194 | + |
| 195 | + Assertions.assertEquals(0.60453397833045, standard.getValue("RelativeDensity"), 1e-5); |
| 196 | + Assertions.assertEquals(0.99770997554, standard.getValue("CompressionFactor"), 1e-5); |
| 197 | + Assertions.assertEquals(17.477845, standard.getValue("MolarMass"), 1e-5); |
| 198 | + |
| 199 | + Stream testStream = new Stream("testStream", testSystem); |
| 200 | + testStream.run(); |
| 201 | + Assertions.assertEquals(50107.49824498, testStream.getWI("volume", 15, 15) / 1e3, 1e-5); |
| 202 | + Assertions.assertEquals(38959.473378, testStream.getGCV("volume", 15, 15) / 1e3, 1e-5); |
| 203 | + |
| 204 | + } |
| 205 | + |
167 | 206 | @Test
|
168 | 207 | @Disabled
|
169 | 208 | void testDisplay() {
|
|
0 commit comments