Class PhaseIdealGas
java.lang.Object
neqsim.thermo.phase.Phase
neqsim.thermo.phase.PhaseIdealGas
- All Implemented Interfaces:
Serializable, Cloneable, PhaseInterface, ThermodynamicConstantsInterface
Phase model for an ideal gas. Compressibility is fixed to unity and thermodynamic properties are
calculated from ideal-gas relations.
- Author:
- esol
- See Also:
-
Field Summary
FieldsFields inherited from class Phase
beta, calcMolarVolume, chemSyst, componentArray, diElectricConstant, logger, 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.clone()clone.doublegetCpres()getCpres.doublegetCvres()getCvres.doublegetDensity(String unit) Get density of a fluid note: with Peneloux volume correction.doublegetHresTP.doubleGet the Joule Thomson Coefficient of a phase.getMixingRule.doubleGet the speed of sound of a phase note: implemented in phaseEos.doublegetSresTP.doublegetZ()getZ.voidinit.doublemolarVolume(double pressure, double temperature, double A, double B, PhaseType pt) molarVolume.voidresetMixingRule.voidsetMixingRule.voidsetMixingRuleGEModel(String name) setMixingRuleGEModel.voidsetPressure(double pres) Set the pressure in bara (absolute pressure in bar).voidsetTemperature(double temp) Set the temperature of the phase.private voidMethods inherited from class Phase
addComponent, addMoles, addMolesChemReac, calcA, calcA, calcAi, calcAij, calcAiT, calcAT, calcB, calcBi, calcBij, calcDiElectricConstant, calcDiElectricConstantdT, calcDiElectricConstantdTdT, calcMolarVolume, calcR, 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, 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, getAT, getATT, getb, getB, getBeta, getBi, getComponent, getComponent, getcomponentArray, getComponentNames, getComponents, getComponentWithIndex, getComposition, getCompressibilityX, getCompressibilityY, getCorrectedVolume, getCp, getCp, getCp0, getCv, getCv, getDensity, getDensity_AGA8, getDensity_EOSCG, getDensity_GERG2008, getDensity_Leachman, getDensity_Leachman, getDensity_Vega, getDiElectricConstant, getdPdrho, getdPdTVn, getdPdVTn, getdrhodN, getdrhodP, getdrhodT, getEnthalpy, getEnthalpy, getEnthalpydP, getEnthalpydT, getEntropy, getEntropy, getEntropydP, getEntropydT, getExcessGibbsEnergy, getExcessGibbsEnergySymetric, getFlowRate, getFugacity, getFugacity, getg, getGamma, getGibbsEnergy, getGresTP, getHelmholtzEnergy, getHID, getHresdP, getInfiniteDiluteFugacity, getInfiniteDiluteFugacity, getInitType, getInternalEnergy, getInternalEnergy, getIsobaricThermalExpansivity, getIsothermalCompressibility, getJouleThomsonCoefficient, getKappa, 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, getSresTV, 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, setProperties, setRefPhase, setRefPhase, 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 serialVersionUID- See Also:
-
-
Constructor Details
-
PhaseIdealGas
public PhaseIdealGas()Constructor for PhaseIdealGas.
-
-
Method Details
-
getZ
public double getZ()getZ.
- Specified by:
getZin interfacePhaseInterface- Overrides:
getZin classPhase- Returns:
- a double
-
clone
clone.
- Specified by:
clonein interfacePhaseInterface- Overrides:
clonein classPhase- Returns:
- a
PhaseInterfaceobject
-
addComponent
Add component to component array and update moles variables.
- Specified by:
addComponentin interfacePhaseInterface- 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.
-
getMixingRule
getMixingRule.
- Specified by:
getMixingRulein interfacePhaseInterface- Returns:
- a
EosMixingRulesInterfaceobject
-
init
public void init(double totalNumberOfMoles, int numberOfComponents, int initType, PhaseType pt, double beta) init.
initType used in component.init()
- Specified by:
initin interfacePhaseInterface- Overrides:
initin classPhase- 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.
-
setMixingRuleGEModel
setMixingRuleGEModel.
- Specified by:
setMixingRuleGEModelin interfacePhaseInterface- Parameters:
name- aStringobject
-
setMixingRule
setMixingRule.
- Specified by:
setMixingRulein interfacePhaseInterface- Parameters:
mr- aMixingRuleTypeInterfaceobject
-
resetMixingRule
resetMixingRule.
- Specified by:
resetMixingRulein interfacePhaseInterface- Parameters:
mr- a int
-
molarVolume
public double molarVolume(double pressure, double temperature, double A, double B, PhaseType pt) throws IsNaNException, TooManyIterationsException molarVolume.
- Specified by:
molarVolumein interfacePhaseInterface- 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.
-
updateMolarVolume
private void updateMolarVolume() -
setTemperature
public void setTemperature(double temp) Set the temperature of the phase.- Specified by:
setTemperaturein interfacePhaseInterface- Overrides:
setTemperaturein classPhase- Parameters:
temp- in unit Kelvin
-
setPressure
public void setPressure(double pres) Set the pressure in bara (absolute pressure in bar).
- Specified by:
setPressurein interfacePhaseInterface- Overrides:
setPressurein classPhase- Parameters:
pres- a double
-
getDensity
Get density of a fluid note: with Peneloux volume correction.- Specified by:
getDensityin interfacePhaseInterface- Overrides:
getDensityin classPhase- Parameters:
unit- Supported units are kg/m3, mol/m3- Returns:
- density in specified unit
-
getSoundSpeed
public double getSoundSpeed()Get the speed of sound of a phase note: implemented in phaseEos.- Specified by:
getSoundSpeedin interfacePhaseInterface- Specified by:
getSoundSpeedin classPhase- Returns:
- speed of sound in m/s
-
getCpres
public double getCpres()getCpres.
- Specified by:
getCpresin interfacePhaseInterface- Overrides:
getCpresin classPhase- Returns:
- a double
-
getCvres
-
getHresTP
public double getHresTP()getHresTP.
- Specified by:
getHresTPin interfacePhaseInterface- Overrides:
getHresTPin classPhase- Returns:
- a double
-
getSresTP
public double getSresTP()getSresTP.
- Specified by:
getSresTPin interfacePhaseInterface- Overrides:
getSresTPin classPhase- Returns:
- a double
-
getJouleThomsonCoefficient
public double getJouleThomsonCoefficient()Get the Joule Thomson Coefficient of a phase.- Specified by:
getJouleThomsonCoefficientin interfacePhaseInterface- Overrides:
getJouleThomsonCoefficientin classPhase- Returns:
- Joule Thomson coefficient in K/bar
-