Class PlusFractionModel.WhitsonGammaModel
java.lang.Object
neqsim.thermo.characterization.PlusFractionModel.PedersenPlusModel
neqsim.thermo.characterization.PlusFractionModel.WhitsonGammaModel
- All Implemented Interfaces:
Serializable, Cloneable, PlusFractionModelInterface
- Enclosing class:
PlusFractionModel
- Version:
- $Id: $Id
- Author:
- ESOL
-
Field Summary
FieldsModifier and TypeFieldDescriptiondoubleShape parameter (alpha) of the gamma distribution.private booleanFlag to auto-estimate alpha from fluid properties.doubleScale parameter (beta) of the gamma distribution, calculated from MPlus, eta, alfa.double[]private StringDensity model: "UOP" (Watson K-factor) or "Soreide" (Søreide 1989 correlation).doubleMinimum molecular weight (eta) in g/mol, default 90 for C7+.Calculation model type.double[]private static final longSerialization version UID.double[]Fields inherited from class PlusFractionModel.PedersenPlusModel
coefs, firsttime, numberOfPlusPseudocomponents, plusCoefs, PRcoefs, PVTsimDensities, PVTsimMolarMass, SRKcoefs -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidCalculate densities using the selected density model.booleancharacterizePlusFraction(TBPModelInterface TBPModel) characterizePlusFraction.voidvoidCalculate densities using Søreide (1989) correlation.voiddoubleestimateAlpha(double Mplus, double density) Estimate the gamma shape parameter (alpha) based on plus fraction properties.doublegamma(double X) doublegetAlpha()Get the gamma shape parameter (alpha).doublegetBeta()Get the calculated scale parameter (beta).doublegetCoef(int i) getCoef.double[]getCoefs()getCoefs.double[]getDens()getDens.Get the current density model.doublegetEta()Get the minimum molecular weight (eta) in g/mol.double[]double[]getM()getM.doubleGet the Watson K-factor for the plus fraction.double[]getZ()getZ.double[]P0P1(double MWB) voidsetAlpha(double alpha) Set the gamma shape parameter (alpha).voidsetAutoEstimateAlpha(boolean autoEstimate) Enable or disable automatic estimation of the alpha (shape) parameter.voidsetCalculationModel(String model) Set the calculation model type.voidsetDensityModel(String densityModel) Set the density correlation model.voidsetEta(double eta) Set the minimum molecular weight (eta) in g/mol.voidsetGammaParameters(double shape, double minMW) Set gamma distribution parameters.Methods inherited from class PlusFractionModel.PedersenPlusModel
getDensPlus, getFirstPlusFractionNumber, getFirstTBPFractionNumber, getLastPlusFractionNumber, getMaxPlusMolarMass, getMPlus, getName, getNumberOfPlusPseudocomponents, getPlusComponentNumber, getZPlus, hasPlusFraction, setCoefs, setCoefs, setLastPlusFractionNumber
-
Field Details
-
serialVersionUID
private static final long serialVersionUIDSerialization version UID.- See Also:
-
zValues
public double[] zValues -
molarMasses
public double[] molarMasses -
densities
public double[] densities -
eta
public double etaMinimum molecular weight (eta) in g/mol, default 90 for C7+. -
model
Calculation model type. -
alfa
public double alfaShape parameter (alpha) of the gamma distribution. -
betta
public double bettaScale parameter (beta) of the gamma distribution, calculated from MPlus, eta, alfa. -
densityModel
Density model: "UOP" (Watson K-factor) or "Soreide" (Søreide 1989 correlation). -
autoEstimateAlpha
private boolean autoEstimateAlphaFlag to auto-estimate alpha from fluid properties.
-
-
Constructor Details
-
WhitsonGammaModel
public WhitsonGammaModel()
-
-
Method Details
-
setCalculationModel
Set the calculation model type.- Parameters:
model- calculation model name
-
setDensityModel
Set the density correlation model.- Parameters:
densityModel- "UOP" for Watson K-factor or "Soreide" for Søreide (1989) correlation
-
getDensityModel
-
setAutoEstimateAlpha
public void setAutoEstimateAlpha(boolean autoEstimate) Enable or disable automatic estimation of the alpha (shape) parameter.- Parameters:
autoEstimate- true to auto-estimate alpha based on fluid properties
-
estimateAlpha
public double estimateAlpha(double Mplus, double density) Estimate the gamma shape parameter (alpha) based on plus fraction properties. Typical values: - Gas condensates: 0.5 - 1.0 - Black oils: 1.0 - 2.0 - Heavy oils: 2.0 - 4.0 Uses Watson K-factor as indicator of fluid character.- Parameters:
Mplus- plus fraction molecular weight (kg/mol)density- plus fraction density (kg/m³)- Returns:
- estimated alpha value
-
getWatsonKFactor
public double getWatsonKFactor()Get the Watson K-factor for the plus fraction.- Returns:
- Watson K-factor
-
characterizePlusFractionWhitsonGamma
public void characterizePlusFractionWhitsonGamma() -
gamma
public double gamma(double X) -
P0P1
public double[] P0P1(double MWB) -
densityUOP
public void densityUOP() -
densitySoreide
public void densitySoreide()Calculate densities using Søreide (1989) correlation. More accurate for heavy fractions (C20+) compared to the UOP method. Reference: Søreide, I. (1989). "Improved Phase Behavior Predictions of Petroleum Reservoir Fluids from a Cubic Equation of State." Dr.Ing. Thesis, Norwegian Institute of Technology. -
calculateDensities
public void calculateDensities()Calculate densities using the selected density model. -
characterizePlusFraction
characterizePlusFraction.
- Specified by:
characterizePlusFractionin interfacePlusFractionModelInterface- Overrides:
characterizePlusFractionin classPlusFractionModel.PedersenPlusModel- Parameters:
TBPModel- aTBPModelInterfaceobject- Returns:
- a boolean
-
setGammaParameters
public void setGammaParameters(double shape, double minMW) Set gamma distribution parameters.- Parameters:
shape- alpha (shape) parameter, typical values: 0.5-1.0 gas condensates, 1.0-2.0 black oils, 2.0-4.0 heavy oilsminMW- eta (minimum molecular weight) in g/mol, typically 84-90 for C7+
-
setAlpha
public void setAlpha(double alpha) Set the gamma shape parameter (alpha).- Parameters:
alpha- shape parameter
-
getAlpha
public double getAlpha()Get the gamma shape parameter (alpha).- Returns:
- alpha value
-
setEta
public void setEta(double eta) Set the minimum molecular weight (eta) in g/mol.- Parameters:
eta- minimum MW in g/mol
-
getEta
public double getEta()Get the minimum molecular weight (eta) in g/mol.- Returns:
- eta value in g/mol
-
getBeta
public double getBeta()Get the calculated scale parameter (beta).- Returns:
- beta value, or NaN if not yet calculated
-
getGammaParameters
public double[] getGammaParameters() -
getCoefs
public double[] getCoefs()getCoefs.
- Specified by:
getCoefsin interfacePlusFractionModelInterface- Overrides:
getCoefsin classPlusFractionModel.PedersenPlusModel- Returns:
- an array of type double
-
getCoef
public double getCoef(int i) getCoef.
- Specified by:
getCoefin interfacePlusFractionModelInterface- Overrides:
getCoefin classPlusFractionModel.PedersenPlusModel- Parameters:
i- a int- Returns:
- a double
-
getZ
public double[] getZ()getZ.
- Specified by:
getZin interfacePlusFractionModelInterface- Overrides:
getZin classPlusFractionModel.PedersenPlusModel- Returns:
- an array of type double
-
getM
public double[] getM()getM.
- Specified by:
getMin interfacePlusFractionModelInterface- Overrides:
getMin classPlusFractionModel.PedersenPlusModel- Returns:
- an array of type double
-
getDens
public double[] getDens()getDens.
- Specified by:
getDensin interfacePlusFractionModelInterface- Overrides:
getDensin classPlusFractionModel.PedersenPlusModel- Returns:
- an array of type double
-