Class MulticomponentNucleation
This class handles the common case in natural gas processing where multiple heavy hydrocarbon components co-condense simultaneously. Two approaches are supported:
- Pseudocomponent method: Lumps all condensable components into a single effective species with mole-fraction-weighted properties (MW, density, surface tension). This is the default and most robust approach.
- Independent nucleation: Treats each condensable component independently and sums nucleation rates. Less rigorous but useful for identifying the dominant nucleating species.
The model requires a flashed and initialized NeqSim thermodynamic system with at least one gas phase and one liquid phase. Components are classified as "condensable" if their liquid mole fraction exceeds a threshold.
Usage:
// Flash the system first
ThermodynamicOperations ops = new ThermodynamicOperations(system);
ops.TPflash();
system.initProperties();
// Create multicomponent nucleation model
MulticomponentNucleation mcn = new MulticomponentNucleation(system);
mcn.setHeterogeneous(true, 60.0); // pipe wall nucleation
mcn.setResidenceTime(0.5);
mcn.calculate();
double totalRate = mcn.getTotalNucleationRate();
double diameter = mcn.getMeanParticleDiameter();
String dominant = mcn.getDominantComponent();
References:
- Reiss, H. (1950). The kinetics of phase transitions in binary systems. J. Chem. Phys. 18, 840-848.
- Stauffer, D. (1976). Kinetic theory of two-component nucleation. J. Aerosol Sci. 7, 319-333.
- Wilemski, G. (1984). Composition of the critical nucleus in multicomponent vapor nucleation. J. Chem. Phys. 80, 1370-1372.
- Version:
- 1.0
- Author:
- esol
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic enumEnumeration of multicomponent nucleation approaches. -
Field Summary
FieldsModifier and TypeFieldDescriptionprivate booleanWhether calculation has been performed.private List<ClassicalNucleationTheory> Per-component CNT models (used in INDEPENDENT mode).Per-component condensation fractions (mole-fraction contribution to condensation).Per-component nucleation rates (independent mode).Per-component supersaturation ratios.List of condensable component indices.List of condensable component names.private doubleMinimum liquid mole fraction to classify a component as condensable.private doubleContact angle for heterogeneous nucleation in degrees.private StringName of the dominant condensing component.private doubleEffective pseudocomponent density in kg/m3.private doubleEffective pseudocomponent molecular weight in kg/mol.private doubleEffective supersaturation ratio.private doubleEffective pseudocomponent surface tension in N/m.private booleanWhether to use heterogeneous nucleation.private doubleMean particle diameter in m.Nucleation approach mode.private ClassicalNucleationTheoryThe pseudocomponent CNT model (used in PSEUDOCOMPONENT mode).private doubleResidence time in seconds.private SystemInterfaceThe NeqSim thermodynamic system (must be flashed and initialized).private doubleTotal nucleation rate in particles/(m3*s). -
Constructor Summary
ConstructorsConstructorDescriptionCreates a multicomponent nucleation model from a NeqSim thermodynamic system. -
Method Summary
Modifier and TypeMethodDescriptionvoidPerforms the multicomponent nucleation calculation.private voidCalculates nucleation treating each condensable component independently.private voidCalculates nucleation using the pseudocomponent approach.private voidFinds the dominant condensing component (highest supersaturation ratio).Returns the per-component condensation fractions (mole fraction contributions).Returns the per-component nucleation rates (INDEPENDENT mode only).Returns the per-component supersaturation ratios.Returns the list of condensable component names.Returns the name of the dominant condensing component.doubleReturns the effective pseudocomponent condensed-phase density.doubleReturns the effective pseudocomponent molecular weight.doubleReturns the effective pseudocomponent supersaturation ratio.doubleReturns the effective pseudocomponent surface tension.doubleReturns the mean particle diameter.getMode()Gets the current nucleation approach mode.intReturns the number of condensable components identified.Returns the pseudocomponent CNT model (PSEUDOCOMPONENT mode only).doubleReturns the total nucleation rate summed over all condensable components.private voidIdentifies condensable components by comparing fugacities between gas and liquid phases.booleanReturns whether the calculation has been performed.private voidResets all calculated results.voidsetCondensableThreshold(double threshold) Sets the minimum liquid mole fraction threshold for classifying a component as condensable.voidsetHeterogeneous(boolean isHeterogeneous, double angleDegrees) Enables or disables heterogeneous nucleation with a specified contact angle.voidSets the nucleation approach mode.voidsetResidenceTime(double timeSeconds) Sets the residence time in the supersaturated zone.toJson()Returns a JSON report of all results.toMap()Returns all results as a Map for serialization.toString()
-
Field Details
-
system
The NeqSim thermodynamic system (must be flashed and initialized). -
mode
Nucleation approach mode. -
condensableThreshold
private double condensableThresholdMinimum liquid mole fraction to classify a component as condensable. -
heterogeneous
private boolean heterogeneousWhether to use heterogeneous nucleation. -
contactAngleDegrees
private double contactAngleDegreesContact angle for heterogeneous nucleation in degrees. -
residenceTime
private double residenceTimeResidence time in seconds. -
condensableIndices
-
condensableNames
-
componentSupersaturations
-
componentNucleationRates
-
componentCondensationFractions
-
pseudoCNT
The pseudocomponent CNT model (used in PSEUDOCOMPONENT mode). -
componentCNTs
Per-component CNT models (used in INDEPENDENT mode). -
totalNucleationRate
private double totalNucleationRateTotal nucleation rate in particles/(m3*s). -
meanParticleDiameter
private double meanParticleDiameterMean particle diameter in m. -
dominantComponent
Name of the dominant condensing component. -
effectiveMW
private double effectiveMWEffective pseudocomponent molecular weight in kg/mol. -
effectiveDensity
private double effectiveDensityEffective pseudocomponent density in kg/m3. -
effectiveSurfaceTension
private double effectiveSurfaceTensionEffective pseudocomponent surface tension in N/m. -
effectiveSupersaturation
private double effectiveSupersaturationEffective supersaturation ratio. -
calculated
private boolean calculatedWhether calculation has been performed.
-
-
Constructor Details
-
MulticomponentNucleation
Creates a multicomponent nucleation model from a NeqSim thermodynamic system.The system must have been flashed (TPflash) and properties initialized (initProperties) before calling this constructor. The system should have at least two phases (gas + liquid) for meaningful nucleation analysis.
- Parameters:
system- the NeqSim thermodynamic system
-
-
Method Details
-
setMode
Sets the nucleation approach mode.- Parameters:
mode- PSEUDOCOMPONENT or INDEPENDENT
-
getMode
Gets the current nucleation approach mode.- Returns:
- the nucleation mode
-
setCondensableThreshold
public void setCondensableThreshold(double threshold) Sets the minimum liquid mole fraction threshold for classifying a component as condensable.- Parameters:
threshold- minimum liquid mole fraction (default 1e-6)
-
setHeterogeneous
public void setHeterogeneous(boolean isHeterogeneous, double angleDegrees) Enables or disables heterogeneous nucleation with a specified contact angle.- Parameters:
isHeterogeneous- true to enable heterogeneous nucleationangleDegrees- contact angle in degrees (0 to 180)
-
setResidenceTime
public void setResidenceTime(double timeSeconds) Sets the residence time in the supersaturated zone.- Parameters:
timeSeconds- residence time in seconds
-
calculate
public void calculate()Performs the multicomponent nucleation calculation.Steps:
- Identify condensable components from gas-liquid fugacity comparison
- Compute per-component supersaturation from fugacity ratio
- Either create pseudocomponent (PSEUDOCOMPONENT mode) or per-component CNT models (INDEPENDENT mode)
- Run nucleation calculations
- Determine dominant component and total nucleation rate
-
identifyCondensableComponents
private void identifyCondensableComponents()Identifies condensable components by comparing fugacities between gas and liquid phases. -
calculatePseudocomponent
private void calculatePseudocomponent()Calculates nucleation using the pseudocomponent approach.Creates an effective single component with mole-fraction-weighted properties from all condensable components, then delegates to ClassicalNucleationTheory.
-
calculateIndependent
private void calculateIndependent()Calculates nucleation treating each condensable component independently.Creates separate CNT models for each condensable component and sums the nucleation rates. The mean particle diameter is taken from the dominant component.
-
findDominantComponent
private void findDominantComponent()Finds the dominant condensing component (highest supersaturation ratio). -
resetResults
private void resetResults()Resets all calculated results. -
getTotalNucleationRate
public double getTotalNucleationRate()Returns the total nucleation rate summed over all condensable components.- Returns:
- total nucleation rate in particles/(m3*s)
-
getMeanParticleDiameter
public double getMeanParticleDiameter()Returns the mean particle diameter.- Returns:
- mean particle diameter in m
-
getDominantComponent
Returns the name of the dominant condensing component.- Returns:
- dominant component name
-
getNumberOfCondensableComponents
public int getNumberOfCondensableComponents()Returns the number of condensable components identified.- Returns:
- number of condensable components
-
getCondensableComponentNames
-
getComponentSupersaturations
-
getComponentCondensationFractions
-
getComponentNucleationRates
-
getEffectiveMW
public double getEffectiveMW()Returns the effective pseudocomponent molecular weight.- Returns:
- effective MW in kg/mol
-
getEffectiveDensity
public double getEffectiveDensity()Returns the effective pseudocomponent condensed-phase density.- Returns:
- effective density in kg/m3
-
getEffectiveSupersaturation
public double getEffectiveSupersaturation()Returns the effective pseudocomponent supersaturation ratio.- Returns:
- effective supersaturation ratio
-
getEffectiveSurfaceTension
public double getEffectiveSurfaceTension()Returns the effective pseudocomponent surface tension.- Returns:
- effective surface tension in N/m
-
getPseudocomponentCNT
Returns the pseudocomponent CNT model (PSEUDOCOMPONENT mode only).- Returns:
- the pseudocomponent CNT model, or null if not available
-
isCalculated
public boolean isCalculated()Returns whether the calculation has been performed.- Returns:
- true if calculated
-
toMap
-
toJson
-
toString
-