Interface PhaseCPAInterface
- All Superinterfaces:
Cloneable, PhaseEosInterface, PhaseInterface, Serializable, ThermodynamicConstantsInterface
- All Known Implementing Classes:
PhaseElectrolyteCPA, PhaseElectrolyteCPAMM, PhaseElectrolyteCPAOld, PhaseElectrolyteCPAstatoil, PhasePCSAFTa, PhasePrCPA, PhaseSrkCPA, PhaseSrkCPAs, PhaseUMRCPA
PhaseCPAInterface interface.
This interface defines the contract for CPA (Cubic Plus Association) phase implementations. It provides default implementations for the radial distribution function and its derivatives, which are the same for all cubic equations of state (SRK, PR, UMR) based on the simplified Carnahan-Starling hard-sphere model.
- Version:
- $Id: $Id
- Author:
- Even Solbraa
-
Field Summary
Fields inherited from interface ThermodynamicConstantsInterface
atm, avagadroNumber, boltzmannConstant, electronCharge, faradayConstant, gravity, molarMassAir, normalStateTemperature, pi, planckConstant, R, referencePressure, referenceTemperature, standardStateTemperature, vacumPermittivity -
Method Summary
Modifier and TypeMethodDescriptiondefault doublecalc_g()Calculate radial distribution function g at contact using simplified Carnahan-Starling.default doubleCalculate the sum of (1 - X_i) over all association sites, weighted by moles.default doubleCalculate first volume derivative of ln(g).default doubleCalculate second volume derivative of ln(g).default doubleCalculate third volume derivative of ln(g).getCpaMixingRule.intgetCrossAssosiationScheme(int comp1, int comp2, int site1, int site2) getCrossAssosiationScheme.doublegetGcpa()getGcpa.doublegetGcpav()getGcpav.doubleGetter for property hcpatot.intgetTotalNumberOfAccociationSites.voidsetTotalNumberOfAccociationSites(int totalNumberOfAccociationSites) setTotalNumberOfAccociationSites.Methods inherited from interface PhaseEosInterface
calcPressure, calcPressuredV, dFdN, dFdNdN, dFdNdT, dFdNdV, displayInteractionCoefficients, F, getAresTV, getEosMixingRule, getMixingRuleName, getMolarVolume, getPressureAttractive, getPressureRepulsive, getSresTVMethods inherited from interface PhaseInterface
addComponent, addMoles, addMolesChemReac, addMolesChemReac, calcA, calcAi, calcAij, calcAiT, calcAT, calcB, calcBi, calcBij, calcMolarVolume, calcR, clone, dFdT, dFdTdT, dFdTdV, dFdV, dFdVdV, 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, 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, getComponent, getComponent, getcomponentArray, getComponentNames, getComponents, getComponentWithIndex, getComposition, getCompressibilityX, getCompressibilityY, getCorrectedVolume, getCp, getCp, getCp0, getCpres, getCv, getCv, getDensity, getDensity, getDensity_AGA8, getDensity_EOSCG, getDensity_GERG2008, getDensity_Leachman, getDensity_Leachman, getDensity_Vega, getdPdrho, getdPdTVn, getdPdVTn, getdrhodN, getdrhodP, getdrhodT, getEnthalpy, getEnthalpy, getEnthalpydP, getEnthalpydT, getEntropy, getEntropy, getEntropydP, getEntropydT, getExcessGibbsEnergy, getExcessGibbsEnergySymetric, getFlowRate, getFugacity, getFugacity, getg, getGamma, getGamma2, getGibbsEnergy, getGresTP, getHelmholtzEnergy, getHresTP, getInfiniteDiluteFugacity, getInitType, getInternalEnergy, getInternalEnergy, getIsobaricThermalExpansivity, getIsothermalCompressibility, getJouleThomsonCoefficient, getJouleThomsonCoefficient, getKappa, getLogActivityCoefficient, getLogInfiniteDiluteFugacity, getLogInfiniteDiluteFugacity, getLogPureComponentFugacity, getMass, getMeanIonicActivity, getMixGibbsEnergy, getMixingRule, 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, getSoundSpeed, getSresTP, getTemperature, getTemperature, getThermalConductivity, getThermalConductivity, getTotalVolume, getType, getViscosity, getViscosity, getVolume, getVolume, getWaterDensity, getWtFrac, getWtFrac, getWtFraction, getWtFractionOfWaxFormingComponents, getZ, getZvolcorr, gV, gVV, hasComponent, hasComponent, hasPlusFraction, hasTBPFraction, init, init, init, initPhysicalProperties, initPhysicalProperties, initPhysicalProperties, initRefPhases, isAsphalteneRich, isConstantPhaseVolume, isMixingRuleDefined, molarVolume, normalize, removeComponent, resetMixingRule, resetPhysicalProperties, setAttractiveTerm, setBeta, setComponentArray, setConstantPhaseVolume, setEmptyFluid, setInitType, setMixingRule, setMixingRule, setMixingRuleGEModel, setMolarVolume, setMoleFractions, setNumberOfComponents, setParams, setPhaseTypeName, setPhysicalProperties, setPhysicalProperties, setPhysicalPropertyModel, setPpm, setPressure, setProperties, setRefPhase, setRefPhase, setTemperature, setTotalVolume, setType, useVolumeCorrection, useVolumeCorrection
-
Method Details
-
getHcpatot
double getHcpatot()Getter for property hcpatot.
- Returns:
- a double
-
getCrossAssosiationScheme
int getCrossAssosiationScheme(int comp1, int comp2, int site1, int site2) getCrossAssosiationScheme.
- Parameters:
comp1- a intcomp2- a intsite1- a intsite2- a int- Returns:
- a int
-
getGcpa
double getGcpa()getGcpa.
- Returns:
- a double
-
getGcpav
double getGcpav()getGcpav.
- Returns:
- a double
-
getTotalNumberOfAccociationSites
int getTotalNumberOfAccociationSites()getTotalNumberOfAccociationSites.
- Returns:
- a int
-
setTotalNumberOfAccociationSites
void setTotalNumberOfAccociationSites(int totalNumberOfAccociationSites) setTotalNumberOfAccociationSites.
- Parameters:
totalNumberOfAccociationSites- a int
-
getCpaMixingRule
CPAMixingRulesInterface getCpaMixingRule()getCpaMixingRule.
- Returns:
- a
CPAMixingRulesInterfaceobject
-
calc_hCPA
default double calc_hCPA()Calculate the sum of (1 - X_i) over all association sites, weighted by moles. This is used in the CPA contribution to Helmholtz energy.- Returns:
- hCPA value
-
calc_g
default double calc_g()Calculate radial distribution function g at contact using simplified Carnahan-Starling.g = (2 - b/4V) / (2 * (1 - b/4V)³)
This formula is the same for all cubic EOS (SRK, PR, UMR) since it depends only on the co-volume parameter b, not on the attraction parameter a.
- Returns:
- g value
-
calc_lngV
default double calc_lngV()Calculate first volume derivative of ln(g).d(ln g)/dV
- Returns:
- d(ln g)/dV
-
calc_lngVV
default double calc_lngVV()Calculate second volume derivative of ln(g).d²(ln g)/dV²
- Returns:
- d²(ln g)/dV²
-
calc_lngVVV
default double calc_lngVVV()Calculate third volume derivative of ln(g).d³(ln g)/dV³
- Returns:
- d³(ln g)/dV³
-