Class PhaseHydrate
- All Implemented Interfaces:
Serializable, Cloneable, PhaseInterface, ThermodynamicConstantsInterface
PhaseHydrate class.
- Version:
- $Id: $Id
- Author:
- esol
- See Also:
-
Field Summary
FieldsModifier and TypeFieldDescription(package private) Stringprivate static final longSerialization version UID.Fields inherited from class Phase
beta, calcMolarVolume, chemSyst, componentArray, diElectricConstant, logger, 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
ConstructorsConstructorDescriptionConstructor for PhaseHydrate.PhaseHydrate(String fluidModel) Constructor for PhaseHydrate. -
Method Summary
Modifier and TypeMethodDescriptionvoidaddComponent(String name, double moles, double molesInPhase, int compNumber) Add component to component array and update moles variables.clone()clone.doublegetCavityOccupancy(String componentName, int structure, int cavityType) Get the cavity occupancy for a specific component in a specific cavity type.doublegetCpres()getCpres.doublegetCvres()getCvres.doubleGet density of a phase note: does not use Peneloux volume correction.doublegetDensity(String unit) Get density of a fluid note: with Peneloux volume correction.doublegetHresTP.doubleGet the hydration number for the hydrate at current conditions.doubleGet the Joule Thomson Coefficient of a phase.doublegetLargeCavityOccupancy(int structure) Get the total cavity occupancy for large cavities.Get mixing rule.doublegetSmallCavityOccupancy(int structure) Get the total cavity occupancy for small cavities.doubleGet the speed of sound of a phase note: implemented in phaseEos.doublegetSresTP.intGet the stable hydrate structure type.doublemethod to return conductivity of a phase.doublemethod to return viscosity of the phase.voidinit.doublemolarVolume(double pressure, double temperature, double A, double B, PhaseType pt) molarVolume.voidresetMixingRule.voidsetMixingRule.voidsetMixingRuleGEModel(String name) setMixingRuleGEModel.voidsetSolidRefFluidPhase(PhaseInterface refPhase) setSolidRefFluidPhase.Methods inherited from class Phase
addComponent, addMoles, addMolesChemReac, calcA, calcA, calcAi, calcAij, calcAiT, calcAT, calcB, calcBi, calcBij, calcDiElectricConstant, calcDiElectricConstantdT, calcDiElectricConstantdTdT, calcMolarVolume, calcR, dFdT, dFdTdT, dFdTdV, dFdV, dFdVdV, equals, fb, FB, fBB, FBB, FBD, FBT, fBV, FBV, FD, FDT, FDV, Fn, FnB, FnV, FT, FTT, FTV, fv, FV, fVV, FVV, gb, gBB, gBV, geta, getA, 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, getAT, getATT, getb, getB, getBeta, getBi, getComponent, getComponent, getcomponentArray, getComponentNames, getComponents, getComponentWithIndex, getComposition, getCompressibilityX, getCompressibilityY, getCorrectedVolume, getCp, getCp, getCp0, getCv, getCv, getDensity_AGA8, getDensity_EOSCG, getDensity_GERG2008, getDensity_Leachman, getDensity_Leachman, getDensity_Vega, getDiElectricConstant, getdPdrho, getdPdTVn, getdPdVTn, getdrhodN, getdrhodP, getdrhodT, getEnthalpy, getEnthalpy, getEnthalpydP, getEnthalpydT, getEntropy, getEntropy, getEntropydP, getEntropydT, getExcessGibbsEnergy, getExcessGibbsEnergySymetric, getFlowRate, getFugacity, getFugacity, getg, getGamma, getGibbsEnergy, getGresTP, getHelmholtzEnergy, getHID, getHresdP, getInfiniteDiluteFugacity, getInfiniteDiluteFugacity, getInitType, getInternalEnergy, getInternalEnergy, getIsobaricThermalExpansivity, getIsothermalCompressibility, getJouleThomsonCoefficient, getKappa, 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, getSresTV, getTemperature, getTemperature, getThermalConductivity, getThermoPropertyModelName, getTotalVolume, getType, getViscosity, getVolume, getVolume, getWaterDensity, getWtFrac, getWtFrac, getWtFraction, getWtFractionOfWaxFormingComponents, getZ, getZvolcorr, groupTBPfractions, gV, gVV, 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 PhaseInterface
addMolesChemReac, getGamma2, getPhaseFraction, getPhaseTypeName, hasComponent, init, init, initPhysicalProperties, isAsphalteneRich, setMixingRule, setPhaseTypeName, setPhysicalProperties
-
Field Details
-
serialVersionUID
private static final long serialVersionUIDSerialization version UID.- See Also:
-
hydrateModel
String hydrateModel
-
-
Constructor Details
-
PhaseHydrate
public PhaseHydrate()Constructor for PhaseHydrate.
-
PhaseHydrate
-
-
Method Details
-
clone
clone.
- Specified by:
clonein interfacePhaseInterface- Overrides:
clonein classPhase- Returns:
- a
PhaseInterfaceobject
-
molarVolume
public double molarVolume(double pressure, double temperature, double A, double B, PhaseType pt) throws IsNaNException, TooManyIterationsException molarVolume.
- Parameters:
pressure- a doubletemperature- a doubleA- a doubleB- a doublept- the PhaseType of the phase- Returns:
- a double
- Throws:
IsNaNException- if any.TooManyIterationsException- if any.
-
addComponent
Add component to component array and update moles variables.
- 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.
-
init
public void init(double totalNumberOfMoles, int numberOfComponents, int initType, PhaseType pt, double beta) init.
initType used in component.init()
- Specified by:
initin interfacePhaseInterface- Overrides:
initin classPhase- 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.
-
getMixingRule
-
setMixingRuleGEModel
-
resetMixingRule
resetMixingRule.
Not relevant for PhaseHydrate
- Parameters:
mr- a int
-
setMixingRule
setMixingRule.
Not relevant for PhaseHydrate
- Parameters:
mr- a MixingRuleTypeInterface
-
setSolidRefFluidPhase
setSolidRefFluidPhase.
- Parameters:
refPhase- aPhaseInterfaceobject
-
getStableHydrateStructure
public int getStableHydrateStructure()Get the stable hydrate structure type.Returns the hydrate structure (1 for Structure I, 2 for Structure II) that is thermodynamically stable at the current conditions. Structure I has small (5^12) and large (5^12 6^2) cavities, while Structure II has small (5^12) and large (5^12 6^4) cavities.
- Returns:
- 1 for Structure I, 2 for Structure II
-
getCavityOccupancy
Get the cavity occupancy for a specific component in a specific cavity type.Cavity occupancy (θ) represents the fraction of cavities of a given type that are occupied by a specific guest molecule. Values range from 0 (empty) to 1 (fully occupied).
- Parameters:
componentName- the name of the guest componentstructure- the hydrate structure (1 for Structure I, 2 for Structure II)cavityType- the cavity type (0 for small cavity, 1 for large cavity)- Returns:
- the cavity occupancy fraction (0 to 1), or 0 if component not found
-
getSmallCavityOccupancy
public double getSmallCavityOccupancy(int structure) Get the total cavity occupancy for small cavities.- Parameters:
structure- the hydrate structure (1 for Structure I, 2 for Structure II)- Returns:
- the total small cavity occupancy (sum of all guest occupancies)
-
getLargeCavityOccupancy
public double getLargeCavityOccupancy(int structure) Get the total cavity occupancy for large cavities.- Parameters:
structure- the hydrate structure (1 for Structure I, 2 for Structure II)- Returns:
- the total large cavity occupancy (sum of all guest occupancies)
-
getHydrationNumber
public double getHydrationNumber()Get the hydration number for the hydrate at current conditions.The hydration number is the ratio of water molecules to guest molecules in the hydrate. It depends on the cavity occupancy and hydrate structure.
- Returns:
- the hydration number (water molecules per guest molecule)
-
getSoundSpeed
public double getSoundSpeed()Get the speed of sound of a phase note: implemented in phaseEos.- Specified by:
getSoundSpeedin interfacePhaseInterface- Specified by:
getSoundSpeedin classPhase- Returns:
- speed of sound in m/s
-
getDensity
public double getDensity()Get density of a phase note: does not use Peneloux volume correction.For gas hydrates, returns a realistic density based on hydrate structure. Structure I methane hydrate has a density of approximately 910 kg/m³, while Structure II hydrates are slightly denser at approximately 940 kg/m³.
- Specified by:
getDensityin interfacePhaseInterface- Overrides:
getDensityin classPhase- Returns:
- density with unit kg/m3
-
getDensity
Get density of a fluid note: with Peneloux volume correction.For gas hydrates, returns a realistic density based on hydrate structure with unit conversion.
- Specified by:
getDensityin interfacePhaseInterface- Overrides:
getDensityin classPhase- Parameters:
unit- Supported units are kg/m3, mol/m3- Returns:
- density in specified unit
-
getViscosity
public double getViscosity()method to return viscosity of the phase.For gas hydrates, viscosity is not a meaningful property since hydrates are crystalline solids. Returns a very high value to indicate solid behavior (effectively infinite for flow calculations).
- Specified by:
getViscosityin interfacePhaseInterface- Overrides:
getViscosityin classPhase- Returns:
- viscosity in unit kg/msec
-
getThermalConductivity
public double getThermalConductivity()method to return conductivity of a phase.For gas hydrates, thermal conductivity is approximately 0.5-0.6 W/(m·K), similar to ice but slightly lower due to the clathrate structure.
- Specified by:
getThermalConductivityin interfacePhaseInterface- Overrides:
getThermalConductivityin classPhase- Returns:
- conductivity in unit W/m*K
-
getHresTP
public double getHresTP()getHresTP.
For gas hydrates, the residual enthalpy is approximated as zero since the PVT contribution for incompressible solids is negligible.
- Specified by:
getHresTPin interfacePhaseInterface- Overrides:
getHresTPin classPhase- Returns:
- a double
-
getSresTP
public double getSresTP()getSresTP.
For gas hydrates, the residual entropy is approximated as zero since the PVT contribution for incompressible solids is negligible.
- Specified by:
getSresTPin interfacePhaseInterface- Overrides:
getSresTPin classPhase- Returns:
- a double
-
getCpres
public double getCpres()getCpres.
For gas hydrates, the residual heat capacity at constant pressure is approximated as zero.
- Specified by:
getCpresin interfacePhaseInterface- Overrides:
getCpresin classPhase- Returns:
- a double
-
getCvres
-
getJouleThomsonCoefficient
public double getJouleThomsonCoefficient()Get the Joule Thomson Coefficient of a phase.For gas hydrates, the Joule-Thomson coefficient is approximated as zero since hydrates are nearly incompressible solids.
- Specified by:
getJouleThomsonCoefficientin interfacePhaseInterface- Overrides:
getJouleThomsonCoefficientin classPhase- Returns:
- Joule Thomson coefficient in K/bar
-