Class PhasePitzer
java.lang.Object
neqsim.thermo.phase.Phase
neqsim.thermo.phase.PhaseGE
neqsim.thermo.phase.PhasePitzer
- All Implemented Interfaces:
Serializable, Cloneable, PhaseGEInterface, PhaseInterface, ThermodynamicConstantsInterface
Phase implementation for the Pitzer activity coefficient model.
- Author:
- esol
- See Also:
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate double[][]private double[][]private double[][]private static final longSerialization version UID.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.doublegetActivityCoefficient(int k) getActivityCoefficient.doublegetBeta0ij(int i, int j) Get beta0 parameter.doublegetBeta1ij(int i, int j) Get beta1 parameter.doublegetCp()method to return specific heat capacity (Cp).doublegetCphiij(int i, int j) Get Cphi parameter.doublegetCpres()getCpres.doublegetCv()method to return specific heat capacity (Cv).doublegetCvres()getCvres.doublegetExcessGibbsEnergy(PhaseInterface phase, int numberOfComponents, double temperature, double pressure, PhaseType pt) getExcessGibbsEnergy.doublegetHresdP.doublegetHresTP.doubleCalculate ionic strength.doubleGet mass of solvent in kilograms.doublegetSresTP.doublegetSresTV.doublemolarVolume(double pressure, double temperature, double A, double B, PhaseType pt) molarVolume.voidsetAlpha(double[][] alpha) setAlpha.voidsetBinaryParameters(int i, int j, double b0, double b1, double c) Set binary Pitzer parameters.voidsetDij(double[][] Dij) setDij.voidsetDijT(double[][] DijT) setDijT.voidsetMixingRule.Methods inherited from class PhaseGE
getActivityCoefficientInfDil, getActivityCoefficientInfDilWater, getActivityCoefficientSymetric, getDensity, getEnthalpy, getEntropy, getJouleThomsonCoefficient, getMixingRule, getMolarVolume, getSoundSpeed, getZ, init, init, resetMixingRule, setMixingRuleGEModelMethods inherited from class Phase
addComponent, addMoles, addMolesChemReac, calcA, calcA, calcAi, calcAij, calcAiT, calcAT, calcB, calcBi, calcBij, calcDiElectricConstant, calcDiElectricConstantdT, calcDiElectricConstantdTdT, calcMolarVolume, calcR, clone, 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, 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, getCp0, getCv, getDensity, getDensity_AGA8, getDensity_EOSCG, getDensity_GERG2008, getDensity_Leachman, getDensity_Leachman, getDensity_Vega, getDiElectricConstant, getdPdrho, getdPdTVn, getdPdVTn, getdrhodN, getdrhodP, getdrhodT, getEnthalpy, getEnthalpydP, getEnthalpydT, getEntropy, getEntropydP, getEntropydT, getExcessGibbsEnergy, getExcessGibbsEnergySymetric, getFlowRate, getFugacity, getFugacity, getg, getGamma, getGibbsEnergy, getGresTP, getHelmholtzEnergy, getHID, getInfiniteDiluteFugacity, getInfiniteDiluteFugacity, getInitType, getInternalEnergy, getInternalEnergy, getIsobaricThermalExpansivity, getIsothermalCompressibility, getJouleThomsonCoefficient, getKappa, getLogActivityCoefficient, getLogInfiniteDiluteFugacity, getLogInfiniteDiluteFugacity, getLogPureComponentFugacity, getLogPureComponentFugacity, getMass, getMeanIonicActivity, getMixGibbsEnergy, getMixingRuleType, getModelName, getMolalMeanIonicActivity, getMolarComposition, getMolarMass, getMolarMass, 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, 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:
-
beta0
private double[][] beta0 -
beta1
private double[][] beta1 -
cphi
private double[][] cphi
-
-
Constructor Details
-
PhasePitzer
public PhasePitzer()Constructor for PhasePitzer.
-
-
Method Details
-
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.
-
getExcessGibbsEnergy
public double getExcessGibbsEnergy(PhaseInterface phase, int numberOfComponents, double temperature, double pressure, PhaseType pt) getExcessGibbsEnergy.
- Parameters:
phase- aPhaseInterfaceobjectnumberOfComponents- a inttemperature- a doublepressure- a doublept- the PhaseType of the phase- Returns:
- a double
-
setMixingRule
setMixingRule.
- Specified by:
setMixingRulein interfacePhaseInterface- Overrides:
setMixingRulein classPhaseGE- Parameters:
mr- a MixingRuleTypeInterface
-
setAlpha
public void setAlpha(double[][] alpha) setAlpha.
- Parameters:
alpha- an array of type double
-
setDij
public void setDij(double[][] Dij) setDij.
- Parameters:
Dij- an array of type double
-
setDijT
public void setDijT(double[][] DijT) setDijT.
- Parameters:
DijT- an array of type double
-
setBinaryParameters
public void setBinaryParameters(int i, int j, double b0, double b1, double c) Set binary Pitzer parameters.- Parameters:
i- component ij- component jb0- beta0 parameterb1- beta1 parameterc- cPhi parameter
-
getBeta0ij
public double getBeta0ij(int i, int j) Get beta0 parameter.- Parameters:
i- component index ij- component index j- Returns:
- beta0 parameter for components i and j
-
getBeta1ij
public double getBeta1ij(int i, int j) Get beta1 parameter.- Parameters:
i- component index ij- component index j- Returns:
- beta1 parameter for components i and j
-
getCphiij
public double getCphiij(int i, int j) Get Cphi parameter.- Parameters:
i- component index ij- component index j- Returns:
- Cphi parameter for components i and j
-
getIonicStrength
public double getIonicStrength()Calculate ionic strength.- Returns:
- ionic strength
-
getSolventWeight
public double getSolventWeight()Get mass of solvent in kilograms.- Returns:
- solvent mass
-
getActivityCoefficient
public double getActivityCoefficient(int k) getActivityCoefficient.
- Specified by:
getActivityCoefficientin interfacePhaseInterface- Overrides:
getActivityCoefficientin classPhaseGE- Parameters:
k- a int- Returns:
- a double
-
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.
-
getHresTP
public double getHresTP()getHresTP.
- Specified by:
getHresTPin interfacePhaseInterface- Overrides:
getHresTPin classPhase- Returns:
- a double
-
getHresdP
-
getSresTV
-
getSresTP
public double getSresTP()getSresTP.
- Specified by:
getSresTPin interfacePhaseInterface- Overrides:
getSresTPin classPhase- Returns:
- a double
-
getCpres
public double getCpres()getCpres.
Calculates the excess heat capacity via finite-difference temperature derivatives of the activity coefficients. In the current implementation the Pitzer binary parameters are temperature independent, so the residual contribution evaluates to zero.
- Specified by:
getCpresin interfacePhaseInterface- Overrides:
getCpresin classPhase- Returns:
- a double
-
getCvres
-
getCp
public double getCp()method to return specific heat capacity (Cp).- Specified by:
getCpin interfacePhaseInterface- Overrides:
getCpin classPhaseGE- Returns:
- Cp in unit J/K
-
getCv
public double getCv()method to return specific heat capacity (Cv).- Specified by:
getCvin interfacePhaseInterface- Overrides:
getCvin classPhaseGE- Returns:
- Cv in unit J/K
-