Class PhaseModifiedFurstElectrolyteEos
- All Implemented Interfaces:
Serializable, Cloneable, PhaseEosInterface, PhaseInterface, ThermodynamicConstantsInterface
- Direct Known Subclasses:
PhaseElectrolyteCPA, PhaseElectrolyteCPAOld
PhaseModifiedFurstElectrolyteEos class.
- Version:
- $Id: $Id
- Author:
- Even Solbraa
- See Also:
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic enumEnum for selecting dielectric constant mixing rules for mixed solvents. -
Field Summary
FieldsModifier and TypeFieldDescription(package private) double(package private) double(package private) double(package private) double(package private) double(package private) double(package private) double(package private) double(package private) double(package private) double(package private) double(package private) double(package private) doubleThe dielectric constant mixing rule to use for mixed solvents.(package private) ElectrolyteMixingRulesInterface(package private) double(package private) double(package private) double(package private) double(package private) double(package private) double(package private) double(package private) double(package private) static org.apache.logging.log4j.LoggerLogger object for class.(package private) doubleprivate static final longSerialization version UID.(package private) double(package private) double(package private) double(package private) double(package private) double(package private) double(package private) double(package private) double(package private) double(package private) double(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
ConstructorsConstructorDescriptionConstructor for PhaseModifiedFurstElectrolyteEos. -
Method Summary
Modifier and TypeMethodDescriptionvoidaddComponent(String name, double moles, double molesInPhase, int compNumber) Add component to component array and update moles variables.doublecalcBornX.doublecalcDiElectricConstant(double temperature) calcDiElectricConstant.doublecalcDiElectricConstantdT(double temperature) calcDiElectricConstantdT.doublecalcDiElectricConstantdTdT(double temperature) calcDiElectricConstantdTdT.doublecalcDiElectricConstantdTdV(double temperature) calcDiElectricConstantdTdV.doublecalcDiElectricConstantdV(double temperature) calcDiElectricConstantdV.doublecalcDiElectricConstantdVdV(double temperature) calcDiElectricConstantdVdV.doublecalcEps()calcEps.doublecalcEpsIonic.doublecalcEpsIonicdV.doublecalcEpsIonicdVdV.doublecalcEpsV()calcEpsV.doublecalcEpsVV.doublecalcGammaLRdV.doublecalcShieldingParameter.doubleCalculates the temperature derivative of the shielding parameter using implicit differentiation.doublecalcSolventDiElectricConstant(double temperature) calcSolventDiElectricConstant.doublecalcSolventDiElectricConstantdT(double temperature) calcSolventDiElectricConstantdT.doublecalcSolventDiElectricConstantdTdT(double temperature) calcSolventDiElectricConstantdTdT.private doublecalcSolventDiElectricConstantLooyenga(double temperature) Calculate solvent dielectric constant using Looyenga mixing rule. eps_mix^(1/3) = sum(phi_i * eps_i^(1/3))private doublecalcSolventDiElectricConstantMolarAvg(double temperature) Calculate solvent dielectric constant using molar average mixing rule.private doublecalcSolventDiElectricConstantVolumeAvg(double temperature) Calculate solvent dielectric constant using volume average mixing rule. eps_mix = sum(phi_i * eps_i) where phi_i = x_i*V_i/sum(x_j*V_j)doublecalcW(PhaseInterface phase, double temperature, double pressure, int numbcomp) calcW.doublecalcWi(int compNumb, PhaseInterface phase, double temperature, double pressure, int numbcomp) calcWi.doublecalcWij(int compNumb, int compNumbj, PhaseInterface phase, double temperature, double pressure, int numbcomp) calcWij.doublecalcWiT(int compNumb, PhaseInterface phase, double temperature, double pressure, int numbcomp) calcWiT.doublecalcXLR()calcXLR.doubleCalculates the temperature derivative of XLR using the chain rule.clone()clone.doubledFBorndT()dFBorndT.doubledFBorndTdT.doubledFdAlphaLR.doubledFdAlphaLRdAlphaLR.doubledFdAlphaLRdGamma.doubledFdAlphaLRdV.doubledFdAlphaLRdX.doubledFdT()Calculate derivative of F per Temperature, i.e., dF/dT.doubledFdTdT()dFdTdT.doubledFdTdV()Calculate derivative of F per Temperature and Volume, i.e., dF/dT * 1/dV.doubledFdV()Calculate derivative of F per Volume, i.e., dF/dV.doubledFdVdV()dFdVdV.doubledFdVdVdV()dFdVdVdV.doubledFLRdT()dFLRdT.doubledFLRdTdT()dFLRdTdT.doubledFLRdTdV()dFLRdTdV.doubledFLRdV()dFLRdV.doubledFLRdVdV()dFLRdVdV.doubledFLRdVdVdV.doubledFSR2dT()dFSR2dT.doubledFSR2dTdT.doubledFSR2dTdV.doubledFSR2dV()dFSR2dV.doubledFSR2dVdV.doubledFSR2dVdVdV.doubleFBorn()FBorn.doubleFBornD()FBornD.doubleFBornDD()FBornDD.doubleFBornDX()FBornDX.doubleFBornT()FBornT.doubleFBornTD()FBornTD.doubleFBornTT()FBornTT.doubleFBornTX()FBornTX.doubleFBornX()FBornX.doubleFBornXX()FBornXX.doubleFLR()FLR.doubleFLRGammaLR.doubleFLRV()FLRV.doubleFLRVV()FLRVV.doubleFLRXLR()FLRXLR.doubleFSR2()FSR2.doubleFSR2eps()FSR2eps.doubleFSR2epseps.doubleFSR2epsepseps.doubleFSR2epsepsV.doubleFSR2epsV()FSR2epsV.doubleFSR2epsW()FSR2epsW.doubleFSR2n()FSR2n.doubleFSR2neps()FSR2neps.doubleFSR2nn()FSR2nn.doubleFSR2nT()FSR2nT.doubleFSR2nV()FSR2nV.doubleFSR2nW()FSR2nW.doubleFSR2T()FSR2T.doubleFSR2Teps()FSR2Teps.doubleFSR2Tn()FSR2Tn.doubleFSR2TT()FSR2TT.doubleFSR2TV()FSR2TV.doubleFSR2TW()FSR2TW.doubleFSR2V()FSR2V.doubleFSR2VV()FSR2VV.doubleFSR2VVeps.doubleFSR2VVV()FSR2VVV.doubleFSR2VW()FSR2VW.doubleFSR2W()FSR2W.doubleFSR2WW()FSR2WW.doubleGetter for the fieldalphaLR2.doublegetAlphaLRT.doublegetAlphaLRV.doublegetDielectricConstant.doubleGetter for the fielddiElectricConstantdT.doubleGetter for the fielddiElectricConstantdV.Get the current dielectric constant mixing rule.doublegetDielectricT.doublegetDielectricV.Getter for the fieldelectrolyteMixingRule.doublegetEps()Getter for the fieldeps.doublegetEpsdV()Getter for the fieldepsdV.doubleGetter for the fieldepsdVdV.doubleGetter for the fieldepsIonic.doubleGetter for the fieldepsIonicdV.doubleGetter for the fieldepsIonicdVdV.doublegetF()getF.doubleGetter for the fieldshieldingParameter.doubleGetter for the fieldsolventDiElectricConstant.doubleGetter for the fieldsolventDiElectricConstantdT.doubleGetter for the fieldsolventDiElectricConstantdTdT.doublegetW()getW.doublegetWT()getWT.doublegetXLR()getXLR.voidinit.doublemolarVolume(double pressure, double temperature, double A, double B, PhaseType pt) molarVolume.voidreInitFurstParam.voidSet the dielectric constant mixing rule for mixed solvents.voidsetFurstIonicCoefficient(double[] params) setFurstIonicCoefficient.voidvolInit()volInit.doubleXBorndndn(int i, int j) XBorndndn.doubleXLRdGammaLR.doubleXLRdndn(int i, int j) XLRdndn.Methods inherited from class PhaseEos
calcA, calcAi, calcAij, calcAiT, calcAT, calcATT, calcB, calcBi, calcBij, calcf, calcg, calcPressure, calcPressuredV, dFdN, dFdNdN, dFdNdT, dFdNdV, 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, getdPdrho, getdPdTVn, getdPdVTn, getdrhodN, getdrhodP, getdrhodT, getdTVndSVnJaobiMatrix, getdUdSdSVn, getdUdSdVn, getdUdSVn, getdUdVdVSn, getdUdVSn, getdVdrho, getEosMixingRule, getf_loc, getg, getGradientVector, getGresTP, getHresdP, getHresTP, getJouleThomsonCoefficient, 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, 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, getCp, getCp0, getCv, getCv, getDensity, getDensity, getDensity_AGA8, getDensity_EOSCG, getDensity_GERG2008, getDensity_Leachman, getDensity_Leachman, getDensity_Vega, getDiElectricConstant, getEnthalpy, 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, getCp, getCp0, getCv, getCv, getDensity, getDensity, getDensity_AGA8, getDensity_EOSCG, getDensity_GERG2008, getDensity_Leachman, getDensity_Leachman, getDensity_Vega, getEnthalpy, 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:
-
logger
static org.apache.logging.log4j.Logger loggerLogger object for class. -
dielectricMixingRule
The dielectric constant mixing rule to use for mixed solvents. -
gammaold
double gammaold -
alphaLRdTdV
double alphaLRdTdV -
W
double W -
WT
double WT -
WTT
double WTT -
eps
double eps -
epsdV
double epsdV -
epsdVdV
double epsdVdV -
epsIonic
double epsIonic -
bornX
double bornX -
epsIonicdV
double epsIonicdV -
epsIonicdVdV
double epsIonicdVdV -
alphaLR2
double alphaLR2 -
alphaLRdT
double alphaLRdT -
alphaLRdTdT
double alphaLRdTdT -
alphaLRdV
double alphaLRdV -
XLR
double XLR -
XLRdT
double XLRdT -
shieldingParameterdT
double shieldingParameterdT -
solventDiElectricConstant
double solventDiElectricConstant -
solventDiElectricConstantdT
double solventDiElectricConstantdT -
solventDiElectricConstantdTdT
double solventDiElectricConstantdTdT -
shieldingParameter
double shieldingParameter -
gamma
double gamma -
diElectricConstantdV
double diElectricConstantdV -
diElectricConstantdVdV
double diElectricConstantdVdV -
alphaLRdVdV
double alphaLRdVdV -
diElectricConstantdT
double diElectricConstantdT -
diElectricConstantdTdT
double diElectricConstantdTdT -
diElectricConstantdTdV
double diElectricConstantdTdV -
electrolyteMixingRule
ElectrolyteMixingRulesInterface electrolyteMixingRule -
sr2On
double sr2On -
lrOn
double lrOn -
bornOn
double bornOn
-
-
Constructor Details
-
PhaseModifiedFurstElectrolyteEos
public PhaseModifiedFurstElectrolyteEos()Constructor for PhaseModifiedFurstElectrolyteEos.
-
-
Method Details
-
getElectrolyteMixingRule
Getter for the field
electrolyteMixingRule.- Returns:
- a
ElectrolyteMixingRulesInterfaceobject
-
reInitFurstParam
public void reInitFurstParam()reInitFurstParam.
-
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.
-
clone
clone.
- Specified by:
clonein interfacePhaseInterface- Overrides:
clonein classPhaseSrkEos- Returns:
- a
PhaseInterfaceobject
-
volInit
public void volInit()volInit.
-
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.
-
calcSolventDiElectricConstant
public double calcSolventDiElectricConstant(double temperature) calcSolventDiElectricConstant.
Calculates the dielectric constant of the solvent mixture using the selected mixing rule. For mixed solvents like water-glycol, the VOLUME_AVERAGE rule gives better accuracy (2.4% avg error) compared to MOLAR_AVERAGE (4.2% avg error) based on Ma et al. (2010) data for EG-water.
- Parameters:
temperature- a double- Returns:
- a double
-
calcSolventDiElectricConstantMolarAvg
private double calcSolventDiElectricConstantMolarAvg(double temperature) Calculate solvent dielectric constant using molar average mixing rule. This is the original NeqSim approach: eps_mix = sum(x_i * eps_i)- Parameters:
temperature- Temperature in K- Returns:
- Molar-average dielectric constant
-
calcSolventDiElectricConstantVolumeAvg
private double calcSolventDiElectricConstantVolumeAvg(double temperature) Calculate solvent dielectric constant using volume average mixing rule. eps_mix = sum(phi_i * eps_i) where phi_i = x_i*V_i/sum(x_j*V_j)This gives better accuracy for water-glycol mixtures (2.4% vs 4.2% for molar average).
- Parameters:
temperature- Temperature in K- Returns:
- Volume-average dielectric constant
-
calcSolventDiElectricConstantLooyenga
private double calcSolventDiElectricConstantLooyenga(double temperature) Calculate solvent dielectric constant using Looyenga mixing rule. eps_mix^(1/3) = sum(phi_i * eps_i^(1/3))This has theoretical basis for polar molecule mixtures.
- Parameters:
temperature- Temperature in K- Returns:
- Looyenga-rule dielectric constant
-
setDielectricMixingRule
Set the dielectric constant mixing rule for mixed solvents.Warning: Only MOLAR_AVERAGE is thermodynamically consistent with complete composition derivatives. VOLUME_AVERAGE and LOOYENGA are suitable for dielectric constant estimation but may cause fugacity coefficient inconsistencies in phase equilibrium calculations.
- Parameters:
rule- The mixing rule to use (MOLAR_AVERAGE, VOLUME_AVERAGE, or LOOYENGA)
-
getDielectricMixingRule
Get the current dielectric constant mixing rule.- Returns:
- The current mixing rule
-
calcSolventDiElectricConstantdT
public double calcSolventDiElectricConstantdT(double temperature) calcSolventDiElectricConstantdT.
- Parameters:
temperature- a double- Returns:
- a double
-
calcSolventDiElectricConstantdTdT
public double calcSolventDiElectricConstantdTdT(double temperature) calcSolventDiElectricConstantdTdT.
- Parameters:
temperature- a double- Returns:
- a double
-
calcEps
public double calcEps()calcEps.
- Returns:
- a double
-
calcEpsV
public double calcEpsV()calcEpsV.
- Returns:
- a double
-
calcEpsVV
public double calcEpsVV()calcEpsVV.
- Returns:
- a double
-
calcEpsIonic
public double calcEpsIonic()calcEpsIonic.
- Returns:
- a double
-
calcEpsIonicdV
public double calcEpsIonicdV()calcEpsIonicdV.
- Returns:
- a double
-
calcEpsIonicdVdV
public double calcEpsIonicdVdV()calcEpsIonicdVdV.
- Returns:
- a double
-
getF
-
dFdT
public double dFdT()Calculate derivative of F per Temperature, i.e., dF/dT.
- Specified by:
dFdTin interfacePhaseInterface- Overrides:
dFdTin classPhaseEos- 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
-
dFdV
public double dFdV()Calculate derivative of F per Volume, i.e., dF/dV.
- Specified by:
dFdVin interfacePhaseInterface- Overrides:
dFdVin classPhaseEos- Returns:
- a double
-
dFdVdV
public double dFdVdV()dFdVdV.
- Specified by:
dFdVdVin interfacePhaseInterface- Overrides:
dFdVdVin classPhaseEos- Returns:
- a double
-
dFdVdVdV
-
dFdTdT
public double dFdTdT()dFdTdT.
- Specified by:
dFdTdTin interfacePhaseInterface- Overrides:
dFdTdTin classPhaseEos- Returns:
- a double
-
calcXLR
public double calcXLR()calcXLR.
- Returns:
- a double
-
calcXLRdT
public double calcXLRdT()Calculates the temperature derivative of XLR using the chain rule. XLR depends on gamma (shielding parameter) which depends on temperature.- Returns:
- dXLR/dT
-
calcShieldingParameterdT
public double calcShieldingParameterdT()Calculates the temperature derivative of the shielding parameter using implicit differentiation. The shielding parameter gamma satisfies: f(γ) = 4γ²/NA - αLR2 * Σ(ni/V * zi²/(1+γσi)²) = 0 By implicit differentiation: dγ/dT = -∂f/∂T / (∂f/∂γ)- Returns:
- dγ/dT
-
calcGammaLRdV
public double calcGammaLRdV()calcGammaLRdV.
- Returns:
- a double
-
calcShieldingParameter
public double calcShieldingParameter()calcShieldingParameter.
- Returns:
- a double
-
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.
-
calcW
calcW.
- Parameters:
phase- aPhaseInterfaceobjecttemperature- a doublepressure- a doublenumbcomp- a int- Returns:
- a double
-
calcWi
public double calcWi(int compNumb, PhaseInterface phase, double temperature, double pressure, int numbcomp) calcWi.
- Parameters:
compNumb- a intphase- aPhaseInterfaceobjecttemperature- a doublepressure- a doublenumbcomp- a int- Returns:
- a double
-
calcWiT
public double calcWiT(int compNumb, PhaseInterface phase, double temperature, double pressure, int numbcomp) calcWiT.
- Parameters:
compNumb- a intphase- aPhaseInterfaceobjecttemperature- a doublepressure- a doublenumbcomp- a int- Returns:
- a double
-
calcWij
public double calcWij(int compNumb, int compNumbj, PhaseInterface phase, double temperature, double pressure, int numbcomp) calcWij.
- Parameters:
compNumb- a intcompNumbj- a intphase- aPhaseInterfaceobjecttemperature- a doublepressure- a doublenumbcomp- a int- Returns:
- a double
-
calcDiElectricConstant
public double calcDiElectricConstant(double temperature) calcDiElectricConstant.
- Overrides:
calcDiElectricConstantin classPhase- Parameters:
temperature- a double- Returns:
- a double
-
calcDiElectricConstantdV
public double calcDiElectricConstantdV(double temperature) calcDiElectricConstantdV.
- Parameters:
temperature- a double- Returns:
- a double
-
calcDiElectricConstantdVdV
public double calcDiElectricConstantdVdV(double temperature) calcDiElectricConstantdVdV.
- Parameters:
temperature- a double- Returns:
- a double
-
calcDiElectricConstantdT
public double calcDiElectricConstantdT(double temperature) calcDiElectricConstantdT.
- Overrides:
calcDiElectricConstantdTin classPhase- Parameters:
temperature- a double- Returns:
- a double
-
calcDiElectricConstantdTdT
public double calcDiElectricConstantdTdT(double temperature) calcDiElectricConstantdTdT.
- Overrides:
calcDiElectricConstantdTdTin classPhase- Parameters:
temperature- a double- Returns:
- a double
-
calcDiElectricConstantdTdV
public double calcDiElectricConstantdTdV(double temperature) calcDiElectricConstantdTdV.
- Parameters:
temperature- a double- Returns:
- a double
-
calcBornX
public double calcBornX()calcBornX.
- Returns:
- a double
-
FLR
public double FLR()FLR. MSA long-range ion-ion interaction contribution to Helmholtz free energy.
- Returns:
- a double
-
dFLRdT
public double dFLRdT()dFLRdT. Temperature derivative of the long-range MSA contribution at constant V.
FLR = -αLR*XLR/(4π) + n*V*γ³/(3π*NA) * 1e-5 dFLR/dT|V = -1/(4π) * (dαLR/dT * XLR + αLR * dXLR/dT) + n*V*1e-5/(3π*NA) * 3γ² * dγ/dT Note: This derivative is computed at constant V, which is correct for the Helmholtz free energy formulation. The relationship between constant-P and constant-V derivatives is handled through the pressure equation of state: dF/dT|P = dF/dT|V + (dF/dV)*dV/dT|P. Numerical tests at constant P will show ~15% difference which is expected behavior.- Returns:
- a double
-
dFLRdTdV
public double dFLRdTdV()dFLRdTdV.
- Returns:
- a double
-
dFLRdTdT
public double dFLRdTdT()dFLRdTdT. Second temperature derivative of the long-range MSA contribution.
Note: This is a simplified implementation that includes the main terms. The full second derivative would require d²γ/dT² and d²XLR/dT² which are not yet implemented.- Returns:
- a double
-
dFLRdV
public double dFLRdV()dFLRdV. Volume derivative of FLR.
- Returns:
- a double
-
dFLRdVdV
public double dFLRdVdV()dFLRdVdV. Second volume derivative of FLR.
- Returns:
- a double
-
dFLRdVdVdV
public double dFLRdVdVdV()dFLRdVdVdV.
- Returns:
- a double
-
FLRXLR
public double FLRXLR()FLRXLR. Derivative of FLR with respect to XLR.
- Returns:
- a double
-
FLRGammaLR
public double FLRGammaLR()FLRGammaLR. Derivative of FLR with respect to gamma (shielding parameter).
- Returns:
- a double
-
dFdAlphaLR
public double dFdAlphaLR()dFdAlphaLR. Derivative of FLR with respect to alphaLR.
- Returns:
- a double
-
dFdAlphaLRdV
public double dFdAlphaLRdV()dFdAlphaLRdV.
- Returns:
- a double
-
dFdAlphaLRdX
public double dFdAlphaLRdX()dFdAlphaLRdX.
- Returns:
- a double
-
dFdAlphaLRdGamma
public double dFdAlphaLRdGamma()dFdAlphaLRdGamma.
- Returns:
- a double
-
FLRV
public double FLRV()FLRV. Volume derivative helper for FLR.
- Returns:
- a double
-
FLRVV
public double FLRVV()FLRVV.
- Returns:
- a double
-
dFdAlphaLRdAlphaLR
public double dFdAlphaLRdAlphaLR()dFdAlphaLRdAlphaLR.
- Returns:
- a double
-
XLRdndn
public double XLRdndn(int i, int j) XLRdndn.
- Parameters:
i- a intj- a int- Returns:
- a double
-
XLRdGammaLR
public double XLRdGammaLR()XLRdGammaLR.
- Returns:
- a double
-
XBorndndn
public double XBorndndn(int i, int j) XBorndndn.
- Parameters:
i- a intj- a int- Returns:
- a double
-
FSR2
public double FSR2()FSR2. Short-range ion-solvent and ion-ion interaction contribution to Helmholtz free energy.
- Returns:
- a double
-
dFSR2dT
public double dFSR2dT()dFSR2dT.
- Returns:
- a double
-
dFSR2dTdT
public double dFSR2dTdT()dFSR2dTdT.
- Returns:
- a double
-
dFSR2dV
public double dFSR2dV()dFSR2dV.
- Returns:
- a double
-
dFSR2dTdV
public double dFSR2dTdV()dFSR2dTdV.
- Returns:
- a double
-
dFSR2dVdV
public double dFSR2dVdV()dFSR2dVdV.
- Returns:
- a double
-
dFSR2dVdVdV
public double dFSR2dVdVdV()dFSR2dVdVdV.
- Returns:
- a double
-
FSR2W
public double FSR2W()FSR2W. Partial derivative of FSR2 with respect to W.
- Returns:
- a double
-
FSR2V
public double FSR2V()FSR2V. Partial derivative of FSR2 with respect to V.
- Returns:
- a double
-
FSR2T
public double FSR2T()FSR2T.
- Returns:
- a double
-
FSR2n
public double FSR2n()FSR2n.
- Returns:
- a double
-
FSR2eps
public double FSR2eps()FSR2eps. Partial derivative of FSR2 with respect to epsilon.
- Returns:
- a double
-
FSR2nn
public double FSR2nn()FSR2nn.
- Returns:
- a double
-
FSR2nT
public double FSR2nT()FSR2nT.
- Returns:
- a double
-
FSR2nV
public double FSR2nV()FSR2nV.
- Returns:
- a double
-
FSR2neps
public double FSR2neps()FSR2neps.
- Returns:
- a double
-
FSR2nW
public double FSR2nW()FSR2nW.
- Returns:
- a double
-
FSR2Tn
public double FSR2Tn()FSR2Tn.
- Returns:
- a double
-
FSR2TT
public double FSR2TT()FSR2TT.
- Returns:
- a double
-
FSR2TV
public double FSR2TV()FSR2TV.
- Returns:
- a double
-
FSR2Teps
public double FSR2Teps()FSR2Teps.
- Returns:
- a double
-
FSR2TW
public double FSR2TW()FSR2TW.
- Returns:
- a double
-
FSR2VV
public double FSR2VV()FSR2VV. Second partial derivative of FSR2 with respect to V.
- Returns:
- a double
-
FSR2epsV
public double FSR2epsV()FSR2epsV. Mixed partial derivative of FSR2 with respect to epsilon and V.
- Returns:
- a double
-
FSR2epsW
public double FSR2epsW()FSR2epsW. Mixed partial derivative of FSR2 with respect to epsilon and W.
- Returns:
- a double
-
FSR2WW
public double FSR2WW()FSR2WW.
- Returns:
- a double
-
FSR2VW
public double FSR2VW()FSR2VW. Mixed partial derivative of FSR2 with respect to V and W.
- Returns:
- a double
-
FSR2epseps
public double FSR2epseps()FSR2epseps. Second partial derivative of FSR2 with respect to epsilon.
- Returns:
- a double
-
FSR2VVV
public double FSR2VVV()FSR2VVV. Third partial derivative of FSR2 with respect to V.
- Returns:
- a double
-
FSR2epsepsV
public double FSR2epsepsV()FSR2epsepsV.
- Returns:
- a double
-
FSR2VVeps
public double FSR2VVeps()FSR2VVeps.
- Returns:
- a double
-
FSR2epsepseps
public double FSR2epsepseps()FSR2epsepseps.
- Returns:
- a double
-
FBorn
public double FBorn()FBorn. Born solvation contribution to Helmholtz free energy.
- Returns:
- a double
-
dFBorndT
public double dFBorndT()dFBorndT.
- Returns:
- a double
-
dFBorndTdT
public double dFBorndTdT()dFBorndTdT.
- Returns:
- a double
-
FBornT
public double FBornT()FBornT. Temperature derivative of Born term.
- Returns:
- a double
-
FBornX
public double FBornX()FBornX. Derivative of Born term with respect to bornX sum.
- Returns:
- a double
-
FBornD
public double FBornD()FBornD. Derivative of Born term with respect to dielectric constant.
- Returns:
- a double
-
FBornTT
public double FBornTT()FBornTT. Second temperature derivative of Born term.
- Returns:
- a double
-
FBornTD
public double FBornTD()FBornTD. Mixed temperature-dielectric derivative of Born term.
- Returns:
- a double
-
FBornTX
public double FBornTX()FBornTX. Mixed temperature-bornX derivative of Born term.
- Returns:
- a double
-
FBornDD
public double FBornDD()FBornDD. Second dielectric derivative of Born term.
- Returns:
- a double
-
FBornDX
public double FBornDX()FBornDX. Mixed dielectric-bornX derivative of Born term.
- Returns:
- a double
-
FBornXX
public double FBornXX()FBornXX.
- Returns:
- a double
-
getEps
public double getEps()Getter for the field
eps.- Returns:
- a double
-
getEpsIonic
public double getEpsIonic()Getter for the field
epsIonic.- Returns:
- a double
-
getEpsIonicdV
public double getEpsIonicdV()Getter for the field
epsIonicdV.- Returns:
- a double
-
getEpsdV
public double getEpsdV()Getter for the field
epsdV.- Returns:
- a double
-
getEpsdVdV
public double getEpsdVdV()Getter for the field
epsdVdV.- Returns:
- a double
-
getSolventDiElectricConstant
public double getSolventDiElectricConstant()Getter for the field
solventDiElectricConstant.- Returns:
- a double
-
getSolventDiElectricConstantdT
public double getSolventDiElectricConstantdT()Getter for the field
solventDiElectricConstantdT.- Returns:
- a double
-
getSolventDiElectricConstantdTdT
public double getSolventDiElectricConstantdTdT()Getter for the field
solventDiElectricConstantdTdT.- Returns:
- a double
-
getAlphaLR2
public double getAlphaLR2()Getter for the field
alphaLR2.- Returns:
- a double
-
getW
public double getW()getW.
- Returns:
- a double
-
getWT
public double getWT()getWT.
- Returns:
- a double
-
getDiElectricConstantdT
public double getDiElectricConstantdT()Getter for the field
diElectricConstantdT.- Returns:
- a double
-
getDiElectricConstantdV
public double getDiElectricConstantdV()Getter for the field
diElectricConstantdV.- Returns:
- a double
-
getXLR
public double getXLR()getXLR.
- Returns:
- a double
-
getShieldingParameter
public double getShieldingParameter()Getter for the field
shieldingParameter.- Returns:
- a double
-
getAlphaLRT
public double getAlphaLRT()getAlphaLRT.
- Returns:
- a double
-
getAlphaLRV
public double getAlphaLRV()getAlphaLRV.
- Returns:
- a double
-
getDielectricT
public double getDielectricT()getDielectricT.
- Returns:
- a double
-
getDielectricV
public double getDielectricV()getDielectricV.
- Returns:
- a double
-
getDielectricConstant
public double getDielectricConstant()getDielectricConstant.
- Returns:
- a double
-
setFurstIonicCoefficient
public void setFurstIonicCoefficient(double[] params) setFurstIonicCoefficient.
- Parameters:
params- an array of type double
-
getEpsIonicdVdV
public double getEpsIonicdVdV()Getter for the field
epsIonicdVdV.- Returns:
- a double
-