Class PhaseSolid
- All Implemented Interfaces:
Serializable, Cloneable, PhaseEosInterface, PhaseInterface, ThermodynamicConstantsInterface
- Direct Known Subclasses:
PhasePureComponentSolid, PhaseSolidComplex, PhaseWax
Abstract PhaseSolid class.
- Version:
- $Id: $Id
- Author:
- esol
- See Also:
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate static final longSerialization version UID.private booleanFlag to control whether EOS-based properties should be used instead of literature-based values.Fields inherited from class Phase
beta, calcMolarVolume, chemSyst, componentArray, diElectricConstant, mixingRuleType, molarVolume, numberOfComponents, numberOfMolesInPhase, phaseVolume, physicalPropertyHandler, pressure, pt, refPhase, temperature, thermoPropertyModelName, useVolumeCorrection, ZFields inherited from interface ThermodynamicConstantsInterface
atm, avagadroNumber, boltzmannConstant, electronCharge, faradayConstant, gravity, molarMassAir, normalStateTemperature, pi, planckConstant, R, referencePressure, referenceTemperature, standardStateTemperature, vacumPermittivity -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidaddComponent(String name, double moles, double molesInPhase, int compNumber) Add component to component array and update moles variables.clone()clone.private doubleGet asphaltene density based on literature values.doublegetCp()method to return specific heat capacity (Cp).doublegetCpres()getCpres.doublegetCv()method to return specific heat capacity (Cv).doublegetCvres()getCvres.doubleGet density of a phase note: does not use Peneloux volume correction.doubleGet density of a phase note: at the moment return density of water (997 kg/m3).doublemethod to return enthalpy of a phase in unit Joule.doublegetHresTP.doubleGet the Joule Thomson Coefficient of a phase.doubleGet the speed of sound of a phase note: implemented in phaseEos.doublegetSresTP.voidinit.booleanChecks if this solid phase is predominantly asphaltene (> 50 mol% asphaltene).booleanCheck if EOS-based properties are used for this solid phase.voidsetSolidRefFluidPhase(PhaseInterface refPhase) setSolidRefFluidPhase.voidsetUseEosProperties(boolean useEosProperties) Set whether to use EOS-based properties for this solid phase.voidUpdates the phase type to ASPHALTENE if this phase is predominantly asphaltene.Methods inherited from class PhaseEos
calcA, calcAi, calcAij, calcAiT, calcAT, calcATT, calcB, calcBi, calcBij, calcf, calcg, calcPressure, calcPressuredV, dFdN, dFdNdN, dFdNdT, dFdNdV, dFdT, dFdTdT, dFdTdV, dFdV, dFdVdV, dFdVdVdV, dFdxdxMatrix, dFdxdxMatrixSimple, dFdxMatrix, dFdxMatrixSimple, displayInteractionCoefficients, equals, F, fb, FB, fBB, FBB, FBD, FBT, fBV, FBV, FD, FDT, FDV, Fn, FnB, FnV, FT, FTT, FTV, fv, FV, fVV, FVV, fVVV, FVVV, gb, gBB, gBV, geta, geta, getA, getAresTV, getAT, getATT, getb, getb, getB, getdPdrho, getdPdTVn, getdPdVTn, getdrhodN, getdrhodP, getdrhodT, getdTVndSVnJaobiMatrix, getdUdSdSVn, getdUdSdVn, getdUdSVn, getdUdVdVSn, getdUdVSn, getdVdrho, getEosMixingRule, getF, getf_loc, getg, getGradientVector, getGresTP, getHresdP, getKappa, getMixingRule, getMixingRuleName, getPressureAttractive, getPressureRepulsive, getSresTV, getUSVHessianMatrix, gV, gVV, gVVV, molarVolume, molarVolume2, resetMixingRule, setMixingRule, setMixingRuleGEModelMethods inherited from class Phase
addComponent, addMoles, addMolesChemReac, calcA, calcAT, calcDiElectricConstant, calcDiElectricConstantdT, calcDiElectricConstantdTdT, calcMolarVolume, calcR, getActivityCoefficient, getActivityCoefficient, getActivityCoefficient, getActivityCoefficientSymetric, getActivityCoefficientUnSymetric, getAiT, getAlpha0_EOSCG, getAlpha0_GERG2008, getAlpha0_Leachman, getAlpha0_Leachman, getAlpha0_Vega, getAlphares_EOSCG, getAlphares_GERG2008, getAlphares_Leachman, getAlphares_Leachman, getAlphares_Vega, getAntoineVaporPressure, getBeta, getBi, getComponent, getComponent, getcomponentArray, getComponentNames, getComponents, getComponentWithIndex, getComposition, getCompressibilityX, getCompressibilityY, getCorrectedVolume, getCp, getCp0, getCv, getDensity, getDensity_AGA8, getDensity_EOSCG, getDensity_GERG2008, getDensity_Leachman, getDensity_Leachman, getDensity_Vega, getDiElectricConstant, getEnthalpy, getEnthalpydP, getEnthalpydT, getEntropy, getEntropy, getEntropydP, getEntropydT, getExcessGibbsEnergy, getExcessGibbsEnergySymetric, getFlowRate, getFugacity, getFugacity, getGamma, getGibbsEnergy, getHelmholtzEnergy, getHID, getInfiniteDiluteFugacity, getInfiniteDiluteFugacity, getInitType, getInternalEnergy, getInternalEnergy, getIsobaricThermalExpansivity, getIsothermalCompressibility, getJouleThomsonCoefficient, getLogActivityCoefficient, getLogInfiniteDiluteFugacity, getLogInfiniteDiluteFugacity, getLogPureComponentFugacity, getLogPureComponentFugacity, getMass, getMeanIonicActivity, getMixGibbsEnergy, getMixingRuleType, getModelName, getMolalMeanIonicActivity, getMolarComposition, getMolarMass, getMolarMass, getMolarVolume, getMolarVolume, getMoleFraction, getNumberOfComponents, getNumberOfIonicComponents, getNumberOfMolecularComponents, getNumberOfMolesInPhase, getOsmoticCoefficient, getOsmoticCoefficientOfWater, getOsmoticCoefficientOfWaterMolality, getpH, getpH, getPhase, getPhysicalProperties, getPhysicalPropertyModel, getPressure, getPressure, getProperties_EOSCG, getProperties_GERG2008, getProperties_Leachman, getProperties_Leachman, getProperties_Vega, getPseudoCriticalPressure, getPseudoCriticalTemperature, getPureComponentFugacity, getPureComponentFugacity, getRefPhase, getRefPhase, getSoundSpeed, getTemperature, getTemperature, getThermalConductivity, getThermalConductivity, getThermoPropertyModelName, getTotalVolume, getType, getViscosity, getViscosity, getVolume, getVolume, getWaterDensity, getWtFrac, getWtFrac, getWtFraction, getWtFractionOfWaxFormingComponents, getZ, getZvolcorr, groupTBPfractions, hasComponent, hasPlusFraction, hasTBPFraction, initPhysicalProperties, initPhysicalProperties, initRefPhases, initRefPhases, isConstantPhaseVolume, isMixingRuleDefined, normalize, removeComponent, resetPhysicalProperties, setAttractiveTerm, setBeta, setComponentArray, setConstantPhaseVolume, setEmptyFluid, setInitType, setMolarVolume, setMoleFractions, setNumberOfComponents, setParams, setPhysicalProperties, setPhysicalPropertyModel, setPpm, setPressure, setProperties, setRefPhase, setRefPhase, setTemperature, setTotalVolume, setType, useVolumeCorrection, useVolumeCorrectionMethods inherited from class Object
finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface PhaseEosInterface
getMolarVolumeMethods inherited from interface PhaseInterface
addMoles, addMolesChemReac, addMolesChemReac, calcAT, calcMolarVolume, calcR, getActivityCoefficient, getActivityCoefficient, getActivityCoefficient, getActivityCoefficientSymetric, getActivityCoefficientUnSymetric, getAlpha0_EOSCG, getAlpha0_GERG2008, getAlpha0_Leachman, getAlpha0_Leachman, getAlpha0_Vega, getAlphares_EOSCG, getAlphares_GERG2008, getAlphares_Leachman, getAlphares_Leachman, getAlphares_Vega, getAntoineVaporPressure, getBeta, getComponent, getComponent, getcomponentArray, getComponentNames, getComponents, getComponentWithIndex, getComposition, getCompressibilityX, getCompressibilityY, getCorrectedVolume, getCp, getCp0, getCv, getDensity, getDensity_AGA8, getDensity_EOSCG, getDensity_GERG2008, getDensity_Leachman, getDensity_Leachman, getDensity_Vega, getEnthalpy, getEnthalpydP, getEnthalpydT, getEntropy, getEntropy, getEntropydP, getEntropydT, getExcessGibbsEnergy, getExcessGibbsEnergySymetric, getFlowRate, getFugacity, getFugacity, getGamma, getGamma2, getGibbsEnergy, getHelmholtzEnergy, getInfiniteDiluteFugacity, getInitType, getInternalEnergy, getInternalEnergy, getIsobaricThermalExpansivity, getIsothermalCompressibility, getJouleThomsonCoefficient, getLogActivityCoefficient, getLogInfiniteDiluteFugacity, getLogInfiniteDiluteFugacity, getLogPureComponentFugacity, getMass, getMeanIonicActivity, getMixGibbsEnergy, getMixingRuleType, getModelName, getMolalMeanIonicActivity, getMolarComposition, getMolarMass, getMolarMass, getMolarVolume, getMoleFraction, getNumberOfComponents, getNumberOfIonicComponents, getNumberOfMolecularComponents, getNumberOfMolesInPhase, getOsmoticCoefficient, getOsmoticCoefficientOfWater, getOsmoticCoefficientOfWaterMolality, getpH, getpH, getPhase, getPhaseFraction, getPhaseTypeName, getPhysicalProperties, getPhysicalPropertyModel, getPressure, getPressure, getProperties_EOSCG, getProperties_GERG2008, getProperties_Leachman, getProperties_Leachman, getProperties_Vega, getPseudoCriticalPressure, getPseudoCriticalTemperature, getPureComponentFugacity, getPureComponentFugacity, getRefPhase, getRefPhase, getSoundSpeed, getTemperature, getTemperature, getThermalConductivity, getThermalConductivity, getTotalVolume, getType, getViscosity, getViscosity, getVolume, getVolume, getWaterDensity, getWtFrac, getWtFrac, getWtFraction, getWtFractionOfWaxFormingComponents, getZ, getZvolcorr, hasComponent, hasComponent, hasPlusFraction, hasTBPFraction, init, init, initPhysicalProperties, initPhysicalProperties, initPhysicalProperties, initRefPhases, isAsphalteneRich, isConstantPhaseVolume, isMixingRuleDefined, normalize, removeComponent, resetPhysicalProperties, setAttractiveTerm, setBeta, setComponentArray, setConstantPhaseVolume, setEmptyFluid, setInitType, setMixingRule, setMolarVolume, setMoleFractions, setNumberOfComponents, setParams, setPhaseTypeName, setPhysicalProperties, setPhysicalProperties, setPhysicalPropertyModel, setPpm, setPressure, setProperties, setRefPhase, setRefPhase, setTemperature, setTotalVolume, setType, useVolumeCorrection, useVolumeCorrection
-
Field Details
-
serialVersionUID
private static final long serialVersionUIDSerialization version UID.- See Also:
-
useEosProperties
private boolean useEosPropertiesFlag to control whether EOS-based properties should be used instead of literature-based values.When true, thermodynamic properties (density, entropy, enthalpy, heat capacities) are calculated using the underlying equation of state (SRK EOS). This is useful for Pedersen's approach where asphaltene is modeled as a heavy liquid phase with EOS-calculable properties.
When false (default), solid-specific literature values are used for properties like density (e.g., 1150 kg/m³ for asphaltene), and residual properties return 0 as is typical for solids.
-
-
Constructor Details
-
PhaseSolid
public PhaseSolid()Constructor for PhaseSolid.
-
-
Method Details
-
clone
clone.
- Specified by:
clonein interfacePhaseInterface- Overrides:
clonein classPhaseSrkEos- Returns:
- a
PhaseInterfaceobject
-
init
public void init(double totalNumberOfMoles, int numberOfComponents, int initType, PhaseType pt, double beta) init.
initType used in component.init()
Calls component.init(initType)
- Specified by:
initin interfacePhaseInterface- Overrides:
initin classPhaseEos- Parameters:
totalNumberOfMoles- Total number of moles in all phases of Stream.numberOfComponents- Number of components in system.initType- a int. Use 0 to init, and 1 to reset.pt- Type of phase.beta- Mole fraction of this phase in system.
-
addComponent
Add component to component array and update moles variables.
- Specified by:
addComponentin interfacePhaseInterface- Overrides:
addComponentin classPhaseSrkEos- Parameters:
name- Name of component.moles- Total number of moles of component.molesInPhase- Number of moles in phase.compNumber- Index number of component in phase object component array.
-
getEnthalpy
public double getEnthalpy()method to return enthalpy of a phase in unit Joule.- Specified by:
getEnthalpyin interfacePhaseInterface- Overrides:
getEnthalpyin classPhase- Returns:
- a double
-
setSolidRefFluidPhase
setSolidRefFluidPhase.
- Parameters:
refPhase- aPhaseInterfaceobject
-
getDensityTemp
public double getDensityTemp()Get density of a phase note: at the moment return density of water (997 kg/m3).- Returns:
- density with unit kg/m3
-
isAsphaltenePhase
public boolean isAsphaltenePhase()Checks if this solid phase is predominantly asphaltene (> 50 mol% asphaltene).- Returns:
- true if phase contains majority asphaltene
-
updatePhaseTypeForAsphaltene
public void updatePhaseTypeForAsphaltene()Updates the phase type to ASPHALTENE if this phase is predominantly asphaltene. Call this after flash calculations to properly identify asphaltene-rich solid phases. -
getAsphaltenePhaseAltDensity
private double getAsphaltenePhaseAltDensity()Get asphaltene density based on literature values. Asphaltene density is typically 1100-1200 kg/m³.- Returns:
- asphaltene density in kg/m3
-
isUseEosProperties
public boolean isUseEosProperties()Check if EOS-based properties are used for this solid phase.- Returns:
- true if EOS properties are used, false if literature-based values are used
-
setUseEosProperties
public void setUseEosProperties(boolean useEosProperties) Set whether to use EOS-based properties for this solid phase.When enabled, thermodynamic properties (density, entropy, enthalpy, heat capacities) are calculated using the underlying equation of state. This is useful for Pedersen's approach where asphaltene behaves more like a heavy liquid phase.
- Parameters:
useEosProperties- true to use EOS properties, false to use literature-based values
-
getSresTP
public double getSresTP()getSresTP.
For solids, the residual entropy is approximated as zero since there is no PVT contribution for incompressible solids at their reference state. When
isUseEosProperties()is true, EOS-based calculation is used instead.- Specified by:
getSresTPin interfacePhaseInterface- Overrides:
getSresTPin classPhaseEos- Returns:
- a double
-
getHresTP
public double getHresTP()getHresTP.
For solids, the residual enthalpy is approximated as zero since the PVT contribution for incompressible solids is negligible. When
isUseEosProperties()is true, EOS-based calculation is used instead.- Specified by:
getHresTPin interfacePhaseInterface- Overrides:
getHresTPin classPhaseEos- Returns:
- a double
-
getCpres
public double getCpres()getCpres.
For solids, the residual heat capacity at constant pressure is approximated as zero. When
isUseEosProperties()is true, EOS-based calculation is used instead.- Specified by:
getCpresin interfacePhaseInterface- Overrides:
getCpresin classPhaseEos- Returns:
- a double
-
getCvres
public double getCvres()getCvres.
For solids, the residual heat capacity at constant volume is approximated as zero. When
isUseEosProperties()is true, EOS-based calculation is used instead. -
getCp
public double getCp()method to return specific heat capacity (Cp).For solids, the heat capacity is taken as the sum of component heat capacities.
- Specified by:
getCpin interfacePhaseInterface- Overrides:
getCpin classPhase- Returns:
- Cp in unit J/K
-
getCv
public double getCv()method to return specific heat capacity (Cv).For solids, Cv is approximately equal to Cp since solids are nearly incompressible.
- Specified by:
getCvin interfacePhaseInterface- Overrides:
getCvin classPhase- Returns:
- Cv in unit J/K
-
getSoundSpeed
public double getSoundSpeed()Get the speed of sound of a phase note: implemented in phaseEos.Speed of sound in solids is typically 1500-4000 m/s for organic solids.
- Specified by:
getSoundSpeedin interfacePhaseInterface- Overrides:
getSoundSpeedin classPhaseEos- Returns:
- speed of sound in m/s
-
getJouleThomsonCoefficient
public double getJouleThomsonCoefficient()Get the Joule Thomson Coefficient of a phase.For solids, the Joule-Thomson coefficient is typically very small since solids are nearly incompressible. When
isUseEosProperties()is true, EOS-based calculation is used instead.- Specified by:
getJouleThomsonCoefficientin interfacePhaseInterface- Overrides:
getJouleThomsonCoefficientin classPhaseEos- Returns:
- Joule Thomson coefficient in K/bar
-
getDensity
public double getDensity()Get density of a phase note: does not use Peneloux volume correction.For asphaltene phases, returns a realistic density based on literature values. For other solid phases, uses the standard EOS-based calculation. When
isUseEosProperties()is true, always uses EOS-based calculation regardless of phase type.- Specified by:
getDensityin interfacePhaseInterface- Overrides:
getDensityin classPhase- Returns:
- density with unit kg/m3
-