Class EOSComparison
java.lang.Object
neqsim.integration.EOSComparison
- All Implemented Interfaces:
Serializable
Side-by-side comparison of thermodynamic properties across multiple EOS models.
Evaluates a fluid composition at specified conditions using multiple equations of state, computes property deviations, and reports results as JSON. Useful for model selection, sensitivity studies, and validating that EOS choice does not significantly affect results.
Usage:
EOSComparison comp = new EOSComparison();
comp.addComponent("methane", 0.85);
comp.addComponent("ethane", 0.10);
comp.addComponent("propane", 0.05);
comp.setConditions(273.15 + 25.0, 60.0);
ComparisonResult result = comp.compare();
System.out.println(result.toJson());
- Version:
- 1.0
- Author:
- Even Solbraa
- See Also:
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic classComparative results across all EOS models.static classResults for a single EOS evaluation.static enumSupported equation of state types. -
Field Summary
FieldsModifier and TypeFieldDescriptionComponents and their mole fractions.private List<EOSComparison.EOSType> EOS types to compare.private static final org.apache.logging.log4j.LoggerLogger object for class.private booleanWhether to include multi-phase check.private doublePressure in bara.private static final longSerialization version.private doubleTemperature in Kelvin. -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionaddComponent(String name, double moleFraction) Adds a component with its mole fraction.compare()Runs the comparison across all configured EOS types.private SystemInterfaceCreates a SystemInterface for the specified EOS type.private EOSComparison.EOSResultEvaluates a single EOS type.setConditions(double temperatureK, double pressureBara) Sets the temperature and pressure conditions.setEOSTypes(EOSComparison.EOSType... types) Sets which EOS types to compare.setMultiPhaseCheck(boolean enable) Enables multi-phase check for all models.
-
Field Details
-
serialVersionUID
private static final long serialVersionUIDSerialization version.- See Also:
-
logger
private static final org.apache.logging.log4j.Logger loggerLogger object for class. -
components
-
temperature
private double temperatureTemperature in Kelvin. -
pressure
private double pressurePressure in bara. -
eosTypes
EOS types to compare. -
multiPhaseCheck
private boolean multiPhaseCheckWhether to include multi-phase check.
-
-
Constructor Details
-
EOSComparison
public EOSComparison()Creates a new EOS comparison utility.
-
-
Method Details
-
addComponent
Adds a component with its mole fraction.- Parameters:
name- component name (e.g., "methane")moleFraction- mole fraction (0-1)- Returns:
- this for chaining
-
setConditions
Sets the temperature and pressure conditions.- Parameters:
temperatureK- temperature in KelvinpressureBara- pressure in bara- Returns:
- this for chaining
-
setEOSTypes
Sets which EOS types to compare.- Parameters:
types- EOS types to include- Returns:
- this for chaining
-
setMultiPhaseCheck
Enables multi-phase check for all models.- Parameters:
enable- true to enable multi-phase check- Returns:
- this for chaining
-
compare
Runs the comparison across all configured EOS types.- Returns:
- comparison results for all models
-
evaluateEOS
Evaluates a single EOS type.- Parameters:
type- the EOS type to evaluate- Returns:
- property results for this EOS
- Throws:
Exception- if the evaluation fails
-
createSystem
Creates a SystemInterface for the specified EOS type.- Parameters:
type- the EOS type- Returns:
- a new SystemInterface instance
-