primaryEosName
Name of primary EoS.
SerializablePer TR1244 best practice, process design should cross-check results between SRK and PR78 equations of state to identify cases where EoS choice significantly affects separation predictions, compressor duties, phase envelopes or hydrate curves. This class runs both EoS on the same composition and conditions and flags deviations above configurable thresholds.
Usage example:
SystemInterface baseFluid = new SystemSrkEos(273.15 + 25, 60.0);
baseFluid.addComponent("methane", 0.85);
baseFluid.addComponent("ethane", 0.10);
baseFluid.addComponent("propane", 0.05);
baseFluid.setMixingRule("classic");
DualEosComparison comp = new DualEosComparison(baseFluid);
comp.addCondition(273.15 + 25, 60.0);
comp.addCondition(273.15 + 5, 30.0);
comp.run();
System.out.println(comp.toJson());
static class private String[]private List<double[]> private doubleprivate Stringprivate double[]private Stringprivate List<DualEosComparison.ComparisonResult> private Stringprivate static final longDualEosComparison(String[] componentNames,
double[] molarComposition,
String mixingRule) DualEosComparison(SystemInterface baseFluid) voidaddCondition(double temperatureKelvin,
double pressureBara) voidaddConditionCelsius(double temperatureCelsius,
double pressureBara) doublebooleanvoidrun()voidsetDeviationThreshold(double threshold) toJson()The composition is extracted from the supplied system. Both SRK and PR78 fluids will be built internally with the same composition. The base fluid's EoS type does not matter.
baseFluid - the base fluid to extract composition fromcomponentNames - array of component namesmolarComposition - array of molar fractions (must sum to ~1.0)mixingRule - mixing rule name (e.g., "classic")threshold - fractional deviation threshold (e.g., 0.05 = 5%)temperatureKelvin - temperature in KelvinpressureBara - pressure in baratemperatureCelsius - temperature in CelsiuspressureBara - pressure in bara