Class PhaseGERG2008Eos
java.lang.Object
neqsim.thermo.phase.Phase
neqsim.thermo.phase.PhaseEos
neqsim.thermo.phase.PhaseGERG2008Eos
- All Implemented Interfaces:
Serializable, Cloneable, PhaseEosInterface, PhaseInterface, ThermodynamicConstantsInterface
- Direct Known Subclasses:
PhaseEOSCGEos
PhaseGERG2008Eos class.
- Version:
- $Id: $Id
- Author:
- victorigi
- See Also:
-
Field Summary
FieldsModifier and TypeFieldDescription(package private) org.netlib.util.doubleW[](package private) org.netlib.util.doubleW[][](package private) double(package private) double(package private) double(package private) doubleprivate GERG2008TypeThe GERG-2008 model variant to use.(package private) double(package private) double(package private) int(package private) double(package private) double(package private) booleanprivate static final longSerialization version UID.(package private) doubleFields 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.doublecalcPressure.doublecalcPressuredV.clone()clone.doubledFdN(int i) dFdN.doubledFdNdN(int i, int j) dFdNdN.doubledFdNdT(int i) dFdNdT.doubledFdNdV(int i) dFdNdV.doubledFdTdV()Calculate derivative of F per Temperature and Volume, i.e., dF/dT * 1/dV.doubledFdVdV()dFdVdV.org.netlib.util.doubleW[]Get cached ideal Helmholtz energy derivatives.org.netlib.util.doubleW[]Overloaded method to get the Leachman a0matrix with default hydrogen type ('normal').org.netlib.util.doubleW[][]Get cached residual Helmholtz energy derivatives.org.netlib.util.doubleW[][]Overloaded method to get the Leachman armatrix with default hydrogen type ('normal').doublegetCp()method to return specific heat capacity (Cp).doublegetCv()method to return specific heat capacity (Cv).doubleGet density of a phase note: does not use Peneloux volume correction.doubleGet density of a phase using the GERG-2008 EoS.doublegetdPdrho.doublegetdPdTVn.doublegetdPdVTn.doublemethod to return enthalpy of a phase in unit Joule.doublemethod to return entropy of the phase.Get the GERG-2008 model type used by this phase.doublegetGibbsEnergy.doublegetGresTP.doublegetHresTP.doublegetInternalEnergy.doubleGet the Joule Thomson Coefficient of a phase.double[]Get GERG properties of a phase using the GERG-2008 EoS.doublegetZ()getZ.voidinit.doublemolarVolume(double pressure, double temperature, double A, double B, PhaseType pt) molarVolume.voidsetGergModelType(GERG2008Type modelType) Set the GERG-2008 model type for this phase.Methods inherited from class PhaseEos
calcA, calcAi, calcAij, calcAiT, calcAT, calcATT, calcB, calcBi, calcBij, calcf, calcg, dFdT, dFdTdT, dFdV, 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, getCpres, getCvres, getdrhodN, getdrhodP, getdrhodT, getdTVndSVnJaobiMatrix, getdUdSdSVn, getdUdSdVn, getdUdSVn, getdUdVdVSn, getdUdVSn, getdVdrho, getEosMixingRule, getF, getf_loc, getg, getGradientVector, getHresdP, getKappa, getMixingRule, getMixingRuleName, getPressureAttractive, getPressureRepulsive, getSoundSpeed, getSresTP, getSresTV, getUSVHessianMatrix, gV, gVV, gVVV, 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_Leachman, getAlpha0_Leachman, getAlpha0_Vega, getAlphares_EOSCG, 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_Leachman, getDensity_Leachman, getDensity_Vega, getDiElectricConstant, getEnthalpy, getEnthalpydP, getEnthalpydT, getEntropy, getEntropydP, getEntropydT, getExcessGibbsEnergy, getExcessGibbsEnergySymetric, getFlowRate, getFugacity, getFugacity, getGamma, getHelmholtzEnergy, getHID, getInfiniteDiluteFugacity, getInfiniteDiluteFugacity, getInitType, 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_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, 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_Leachman, getAlpha0_Leachman, getAlpha0_Vega, getAlphares_EOSCG, 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_Leachman, getDensity_Leachman, getDensity_Vega, getEnthalpy, getEnthalpydP, getEnthalpydT, getEntropy, getEntropydP, getEntropydT, getExcessGibbsEnergy, getExcessGibbsEnergySymetric, getFlowRate, getFugacity, getFugacity, getGamma, getGamma2, getHelmholtzEnergy, getInfiniteDiluteFugacity, getInitType, 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_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, 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:
-
IPHASE
int IPHASE -
okVolume
boolean okVolume -
enthalpy
double enthalpy -
entropy
double entropy -
gibbsEnergy
double gibbsEnergy -
CpGERG2008
double CpGERG2008 -
CvGERG2008
double CvGERG2008 -
internalEnery
double internalEnery -
JTcoef
double JTcoef -
a0
org.netlib.util.doubleW[] a0 -
ar
org.netlib.util.doubleW[][] ar -
kappa
double kappa -
W
double W -
gergModelType
The GERG-2008 model variant to use. Default is STANDARD.
-
-
Constructor Details
-
PhaseGERG2008Eos
public PhaseGERG2008Eos()Constructor for PhaseGERG2008Eos.
-
-
Method Details
-
clone
clone.
- Specified by:
clonein interfacePhaseInterface- Overrides:
clonein classPhaseEos- Returns:
- a
PhaseInterfaceobject
-
getGergModelType
Get the GERG-2008 model type used by this phase.- Returns:
- the GERG model type
-
setGergModelType
Set the GERG-2008 model type for this phase.- Parameters:
modelType- the GERG model type to use
-
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()
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.
-
getGibbsEnergy
public double getGibbsEnergy()getGibbsEnergy.
- Specified by:
getGibbsEnergyin interfacePhaseInterface- Overrides:
getGibbsEnergyin classPhase- Returns:
- a double
-
getZ
public double getZ()getZ.
- Specified by:
getZin interfacePhaseInterface- Overrides:
getZin classPhase- Returns:
- a double
-
getJouleThomsonCoefficient
public double getJouleThomsonCoefficient()Get the Joule Thomson Coefficient of a phase.- Specified by:
getJouleThomsonCoefficientin interfacePhaseInterface- Overrides:
getJouleThomsonCoefficientin classPhaseEos- Returns:
- Joule Thomson coefficient in K/bar
-
getEnthalpy
public double getEnthalpy()method to return enthalpy of a phase in unit Joule.- Specified by:
getEnthalpyin interfacePhaseInterface- Overrides:
getEnthalpyin classPhase- Returns:
- a double
-
getEntropy
public double getEntropy()method to return entropy of the phase.- Specified by:
getEntropyin interfacePhaseInterface- Overrides:
getEntropyin classPhase- Returns:
- a double
-
getInternalEnergy
public double getInternalEnergy()getInternalEnergy.
- Specified by:
getInternalEnergyin interfacePhaseInterface- Overrides:
getInternalEnergyin classPhase- Returns:
- a double
-
getCp
public double getCp()method to return specific heat capacity (Cp).- Specified by:
getCpin interfacePhaseInterface- Overrides:
getCpin classPhase- Returns:
- Cp in unit J/K
-
getCv
public double getCv()method to return specific heat capacity (Cv).- Specified by:
getCvin interfacePhaseInterface- Overrides:
getCvin classPhase- Returns:
- Cv in unit J/K
-
molarVolume
public double molarVolume(double pressure, double temperature, double A, double B, PhaseType pt) throws IsNaNException, TooManyIterationsException molarVolume.
- Specified by:
molarVolumein interfacePhaseInterface- Overrides:
molarVolumein classPhaseEos- 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.
-
calcPressure
public double calcPressure()calcPressure.
- Specified by:
calcPressurein interfacePhaseEosInterface- Overrides:
calcPressurein classPhaseEos- Returns:
- a double
-
calcPressuredV
public double calcPressuredV()calcPressuredV.
- Specified by:
calcPressuredVin interfacePhaseEosInterface- Overrides:
calcPressuredVin classPhaseEos- Returns:
- a double
-
dFdN
public double dFdN(int i) dFdN.
- Specified by:
dFdNin interfacePhaseEosInterface- Overrides:
dFdNin classPhaseEos- Parameters:
i- a int- Returns:
- a double
-
dFdNdN
public double dFdNdN(int i, int j) dFdNdN.
- Specified by:
dFdNdNin interfacePhaseEosInterface- Overrides:
dFdNdNin classPhaseEos- Parameters:
i- a intj- a int- Returns:
- a double
-
dFdNdV
public double dFdNdV(int i) dFdNdV.
- Specified by:
dFdNdVin interfacePhaseEosInterface- Overrides:
dFdNdVin classPhaseEos- Parameters:
i- a int- Returns:
- a double
-
dFdNdT
public double dFdNdT(int i) dFdNdT.
- Specified by:
dFdNdTin interfacePhaseEosInterface- Overrides:
dFdNdTin classPhaseEos- Parameters:
i- a int- Returns:
- a double
-
dFdTdV
public double dFdTdV()Calculate derivative of F per Temperature and Volume, i.e., dF/dT * 1/dV.
- Specified by:
dFdTdVin interfacePhaseInterface- Overrides:
dFdTdVin classPhaseEos- Returns:
- a double
-
dFdVdV
public double dFdVdV()dFdVdV.
- Specified by:
dFdVdVin interfacePhaseInterface- Overrides:
dFdVdVin classPhaseEos- Returns:
- a double
-
getDensity
public double getDensity()Get density of a phase note: does not use Peneloux volume correction.- Specified by:
getDensityin interfacePhaseInterface- Overrides:
getDensityin classPhase- Returns:
- density with unit kg/m3
-
getdPdTVn
public double getdPdTVn()getdPdTVn.
- Specified by:
getdPdTVnin interfacePhaseInterface- Overrides:
getdPdTVnin classPhaseEos- Returns:
- a double
-
getdPdVTn
public double getdPdVTn()getdPdVTn.
- Specified by:
getdPdVTnin interfacePhaseInterface- Overrides:
getdPdVTnin classPhaseEos- Returns:
- a double
-
getdPdrho
public double getdPdrho()getdPdrho.
- Specified by:
getdPdrhoin interfacePhaseInterface- Overrides:
getdPdrhoin classPhaseEos- Returns:
- a double
-
getGresTP
public double getGresTP()getGresTP.
- Specified by:
getGresTPin interfacePhaseInterface- Overrides:
getGresTPin classPhaseEos- Returns:
- a double
-
getHresTP
public double getHresTP()getHresTP.
- Specified by:
getHresTPin interfacePhaseInterface- Overrides:
getHresTPin classPhaseEos- Returns:
- a double
-
getAlpha0
public org.netlib.util.doubleW[] getAlpha0()Get cached ideal Helmholtz energy derivatives.- Returns:
- array of
doubleWcontaining α₀ and its derivatives
-
getAlphaRes
public org.netlib.util.doubleW[][] getAlphaRes()Get cached residual Helmholtz energy derivatives.- Returns:
- matrix of
doubleWcontaining αᵣ and its derivatives
-
getDensity_GERG2008
public double getDensity_GERG2008()Get density of a phase using the GERG-2008 EoS.- Specified by:
getDensity_GERG2008in interfacePhaseInterface- Overrides:
getDensity_GERG2008in classPhase- Returns:
- density with unit kg/m3
-
getProperties_GERG2008
public double[] getProperties_GERG2008()Get GERG properties of a phase using the GERG-2008 EoS.
- Specified by:
getProperties_GERG2008in interfacePhaseInterface- Overrides:
getProperties_GERG2008in classPhase- Returns:
- an array of type double
-
getAlpha0_GERG2008
public org.netlib.util.doubleW[] getAlpha0_GERG2008()Overloaded method to get the Leachman a0matrix with default hydrogen type ('normal').- Specified by:
getAlpha0_GERG2008in interfacePhaseInterface- Overrides:
getAlpha0_GERG2008in classPhase- Returns:
- matrix of the reduced ideal helmholtz free energy and its derivatives
-
getAlphares_GERG2008
public org.netlib.util.doubleW[][] getAlphares_GERG2008()Overloaded method to get the Leachman armatrix with default hydrogen type ('normal').- Specified by:
getAlphares_GERG2008in interfacePhaseInterface- Overrides:
getAlphares_GERG2008in classPhase- Returns:
- matrix of the reduced residual helmholtz free energy and its derivatives
-