-
Notifications
You must be signed in to change notification settings - Fork 23
/
SolidFlash.java
65 lines (56 loc) · 1.77 KB
/
SolidFlash.java
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
package neqsim.thermodynamicOperations.util.example;
import org.apache.logging.log4j.LogManager;
import org.apache.logging.log4j.Logger;
import neqsim.thermo.system.SystemInterface;
import neqsim.thermo.system.SystemUMRPRUMCEos;
import neqsim.thermodynamicOperations.ThermodynamicOperations;
/**
* <p>
* SolidFlash class.
* </p>
*
* @author ESOL
* @version $Id: $Id
* @since 2.2.3
*/
public class SolidFlash {
static Logger logger = LogManager.getLogger(SolidFlash.class);
/**
* <p>
* main.
* </p>
*
* @param args an array of {@link java.lang.String} objects
*/
public static void main(String args[]) {
SystemInterface testSystem = new SystemUMRPRUMCEos(273.15 - 30, 18.0);
// testSystem.addComponent("nitrogen", 83.33);
// testSystem.addComponent("oxygen", 8.49);
// testSystem.addComponent("argon", 0.87);
// testSystem.addComponent("CO2", 7.3);
// testSystem.addComponent("nitrogen", 8.33);
// testSystem.addComponent("methane", 0.17);
// testSystem.addComponent("ethane", 0.87);
testSystem.addComponent("CO2", 1.83);
testSystem.createDatabase(true);
testSystem.setMixingRule(2);
// testSystem.setMixingRule("HV", null);
testSystem.setSolidPhaseCheck("CO2");
ThermodynamicOperations testOps = new ThermodynamicOperations(testSystem);
try {
testOps.TPflash();
testSystem.display();
testSystem.initProperties();
double enthalpy = testSystem.getEnthalpy();
testSystem.setPressure(1.0);
testOps.PHflash(enthalpy);
// testOps.TPflash();
// testOps.PHsolidFlash(enthalpy);
// // testOps.TPSolidflash();
// testOps.freezingPointTemperatureFlash();
testSystem.display();
} catch (Exception ex) {
logger.error(ex.getMessage(), ex);
}
}
}