-
Notifications
You must be signed in to change notification settings - Fork 30
/
Copy pathBubbleFlash.java
60 lines (53 loc) · 1.8 KB
/
BubbleFlash.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
package neqsim.thermo.util.example;
import org.apache.logging.log4j.LogManager;
import org.apache.logging.log4j.Logger;
import neqsim.thermo.system.SystemInterface;
import neqsim.thermo.system.SystemSrkCPAstatoil;
import neqsim.thermodynamicoperations.ThermodynamicOperations;
import neqsim.util.ExcludeFromJacocoGeneratedReport;
/**
* <p>
* BubbleFlash class.
* </p>
*
* @author esol
* @since 2.2.3
* @version $Id: $Id
*/
public class BubbleFlash {
/** Logger object for class. */
static Logger logger = LogManager.getLogger(BubbleFlash.class);
/**
* <p>
* main.
* </p>
*
* @param args an array of {@link java.lang.String} objects
*/
@ExcludeFromJacocoGeneratedReport
public static void main(String args[]) {
SystemInterface testSystem = new SystemSrkCPAstatoil(273.15 + 25.0, 1.0);
// SystemInterface testSystem = new SystemSrkEos(288, 26.9);
ThermodynamicOperations testOps = new ThermodynamicOperations(testSystem);
testSystem.addComponent("PG", 0.05175);
// testSystem.addComponent("n-butane", 0.5175);
// testSystem.addComponent("TEG", 0.0000000225);
// testSystem.addComponent("MEG", 30);
testSystem.createDatabase(true);
testSystem.setMixingRule(10);
// testSystem.setMixingRule("HV", "UNIFAC_PSRK");
try {
// testOps.dewPointPressureFlash();
// testOps.bubblePointTemperatureFlash();
testOps.TPflash();
// testSystem.display();
// testOps.constantPhaseFractionPressureFlash(1.0);
testSystem.display();
} catch (Exception ex) {
logger.error(ex.getMessage(), ex);
}
// System.out.println("wt% MEG " +
// 100*testSystem.getPhase(1).getComponent("MEG").getx()*testSystem.getPhase(1).getComponent("MEG").getMolarMass()/testSystem.getPhase(1).getMolarMass());
// testSystem.display();
}
}