Class CPAContribution
java.lang.Object
neqsim.thermo.phase.CPAContribution
- All Implemented Interfaces:
Serializable
CPAContribution provides utility methods for CPA (Cubic Plus Association) calculations that are
common across different cubic EOS implementations (SRK-CPA, PR-CPA, UMR-CPA, etc.).
In CPA theory, the radial distribution function at contact is based on the Carnahan-Starling hard-sphere model and is the same for all cubic equations of state. The formulas depend only on the co-volume parameter (b) and volume, not on the attraction parameter (a) which differs between SRK and PR.
This class provides methods for calculating the radial distribution function and its volume derivatives, which can be used for verification and comparison between different CPA implementations.
- Version:
- 1.0
- Author:
- Even Solbraa
- See Also:
-
Field Summary
FieldsModifier and TypeFieldDescription(package private) static org.apache.logging.log4j.LoggerLogger object for class.private final PhaseEosReference to the parent phase.private static final longSerialization version UID.(package private) doubleTemporary molar volume storage. -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptiondoublecalc_g()Calculate radial distribution function g at contact.doubleCalculate first volume derivative of ln(g).doubleCalculate second volume derivative of ln(g).doubleCalculate third volume derivative of ln(g).static doublecalcG(double molarVolume, double molarB) Calculate radial distribution function g given molar volume and molar b parameter.static doublecalcLngV(double totalVolume, double totalB) Calculate first volume derivative of ln(g).
-
Field Details
-
serialVersionUID
private static final long serialVersionUIDSerialization version UID.- See Also:
-
logger
static org.apache.logging.log4j.Logger loggerLogger object for class. -
phase
Reference to the parent phase. Must be a PhaseEos subclass. -
tempTotVol
double tempTotVolTemporary molar volume storage.
-
-
Constructor Details
-
CPAContribution
Constructor for CPAContribution.- Parameters:
phase- the parent EOS phase that this CPA contribution belongs to
-
-
Method Details
-
calc_g
public double calc_g()Calculate radial distribution function g at contact.Uses the simplified Carnahan-Starling expression: g = (2 - η/2) / (2 * (1 - η/2)³) where η = b/(4V) is the packing fraction.
- Returns:
- g value
-
calc_lngV
public double calc_lngV()Calculate first volume derivative of ln(g).- Returns:
- d(ln g)/dV
-
calc_lngVV
public double calc_lngVV()Calculate second volume derivative of ln(g).- Returns:
- d²(ln g)/dV²
-
calc_lngVVV
public double calc_lngVVV()Calculate third volume derivative of ln(g).- Returns:
- d³(ln g)/dV³
-
calcG
public static double calcG(double molarVolume, double molarB) Calculate radial distribution function g given molar volume and molar b parameter.This is a static utility method for standalone calculations.
- Parameters:
molarVolume- molar volume in m³/molmolarB- molar co-volume parameter b in m³/mol- Returns:
- g value
-
calcLngV
public static double calcLngV(double totalVolume, double totalB) Calculate first volume derivative of ln(g).- Parameters:
totalVolume- total volume in m³totalB- total co-volume parameter B in m³- Returns:
- d(ln g)/dV
-