Skip to content

Commit

Permalink
update UMR
Browse files Browse the repository at this point in the history
  • Loading branch information
EvenSol committed Dec 31, 2024
1 parent 0986c9c commit e4015aa
Show file tree
Hide file tree
Showing 2 changed files with 26 additions and 1 deletion.
2 changes: 1 addition & 1 deletion src/main/java/neqsim/thermo/system/SystemThermo.java
Original file line number Diff line number Diff line change
Expand Up @@ -1392,7 +1392,7 @@ public void createDatabase(boolean reset) {

try (neqsim.util.database.NeqSimDataBase database = new neqsim.util.database.NeqSimDataBase()) {
String names = new String();

NeqSimDataBase.setCreateTemporaryTables(reset);
for (int k = 0; k < getPhase(0).getNumberOfComponents() - 1; k++) {
names += "'" + this.getComponentNames()[k] + "', ";
}
Expand Down
25 changes: 25 additions & 0 deletions src/test/java/neqsim/thermo/system/SystemUMRPRUMCEosNewTest.java
Original file line number Diff line number Diff line change
Expand Up @@ -273,4 +273,29 @@ public void checkPhaseEnvelope2() throws Exception {
satPresSim.run();
assertEquals(104.7532901763, satPresSim.getThermoSystem().getPressure(), 0.001);
}

/**
* <p>
* checkPhaseEnvelope2.
* </p>
*
* @throws Exception
*/
@Test
@DisplayName("test UMR with pseudo comp")
public void testPseudoComptest() {
SystemInterface testSystem = new SystemUMRPRUMCEos(273.15 + 15, 10.0);
ThermodynamicOperations testOps = new ThermodynamicOperations(testSystem);
testSystem.addComponent("methane", 80);
testSystem.addTBPfraction("C7", .0010, 85.5 / 1000.0, 0.66533);
testSystem.createDatabase(true);
testSystem.setMixingRule("HV", "UNIFAC_UMRPRU");
try {
testOps.TPflash();
} catch (Exception ex) {
logger.error(ex.getMessage(), ex);
}
testSystem.initPhysicalProperties("density");
assertEquals(6.84959007, testSystem.getDensity("kg/m3"), 0.00001);
}
}

0 comments on commit e4015aa

Please sign in to comment.