Class SystemThermo
- All Implemented Interfaces:
Serializable, Cloneable, SystemInterface
- Direct Known Subclasses:
SystemEos, SystemIdealGas
- Author:
- Even Solbraa
- See Also:
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected intprotected booleanprotected intprotected double[]Fraction of moles_in_phase / moles_in_system.protected String[]protected String[]protected booleanprotected ChemicalReactionOperationsprotected booleanprotected doubleCritical pressure in bara.protected doubleCritical temperature in Kelvin.protected booleanprotected Stringprotected Stringprivate booleanprotected booleanprivate booleanprivate booleanprivate booleanprotected InterphasePropertiesInterface(package private) boolean(package private) static org.apache.logging.log4j.LoggerLogger object for class.private static final intintMaximum allowed number of phases.private MixingRuleTypeInterfaceprotected Stringprotected booleanprivate booleanprotected intprotected intNumber of phases in use/existing.protected booleanprotected OilAssayCharacterisationprotected PhaseInterface[]Array containing all phases of System.protected int[]Array of indexes to phaseArray keeping track of the creation order of the phases where 0 is the first created phase and the lowest number is the phase created last.protected PhaseType[]protected String[][]private static final longSerialization version UID.protected booleanprotected StandardInterfaceprivate doubleprivate booleanprotected WaxCharacterise -
Constructor Summary
ConstructorsConstructorDescriptionConstructor for SystemThermo.SystemThermo(double T, double P, boolean checkForSolids) Constructor for SystemThermo. -
Method Summary
Modifier and TypeMethodDescriptionvoidaddCapeOpenProperty(String propertyName) addCapeOpenProperty.voidaddCharacterized(String[] charNames, double[] charFlowrate, double[] molarMass, double[] relativedensity) addCharacterized.voidaddComponent(int index, double moles) addComponent.voidaddComponent(int index, double moles, int phaseNumber) addComponent.voidaddComponent(String componentName, double moles) add a component to a fluid.voidaddComponent(String componentName, double moles, double TC, double PC, double acs) addComponent.voidaddComponent(String componentName, double moles, int phaseNumber) add a component to a fluid.voidaddComponent(String componentName, double value, String unitName) add a component to a fluid.voidaddComponent(String componentName, double value, String name, int phaseNum) add a component to a fluid.voidaddComponent(ComponentInterface inComponent) add a component to a fluid.addFluid(SystemInterface addSystem) addFluid.addFluid(SystemInterface addSystem, int phaseNum) addFluid.voidaddGasToLiquid(double fraction) addGasToLiquid.voidaddHydratePhase.voidaddHydratePhase2.voidaddLiquidToGas(double fraction) addLiquidToGas.voidaddOilFractions(String[] charNames, double[] charFlowrate, double[] molarMass, double[] relativedensity, boolean lastIsPlusFraction) addCharacterized.voidaddOilFractions(String[] charNames, double[] charFlowrate, double[] molarMass, double[] relativedensity, boolean lastIsPlusFraction, boolean lumpComponents, int numberOfPseudoComponents) addCharacterized.voidaddPhase()Add phase to SystemInterface object.voidaddPhaseFractionToPhase(double fraction, String specification, String fromPhaseName, String toPhaseName) addPhaseFractionToPhase.voidaddPhaseFractionToPhase(double fraction, String specification, String specifiedStream, String fromPhaseName, String toPhaseName) addPhaseFractionToPhase.voidaddPlusFraction(String componentName, double numberOfMoles, double molarMass, double density) addPlusFraction.voidaddSalt.voidaddSolidComplexPhase(String type) addSolidComplexPhase.voidaddSolidPhase.voidaddTBPfraction(String componentName, double numberOfMoles, double molarMass, double density) method to add true boiling point fraction.voidaddTBPfraction(String componentName, double numberOfMoles, double molarMass, double density, double criticalTemperature, double criticalPressure, double acentricFactor) addTBPfraction.voidaddTBPfraction2(String componentName, double numberOfMoles, double molarMass, double boilingPoint) addTBPfraction2.voidaddTBPfraction3(String componentName, double numberOfMoles, double density, double boilingPoint) Adds a TBP fraction to the system.voidaddTBPfraction4(String componentName, double numberOfMoles, double molarMass, double density, double boilingPoint) Adds a TBP fraction to the system.voidaddToComponentNames(String postfix) Add to component names.booleanGetter for property allowPhaseShift.voidallowPhaseShift(boolean allowPhaseShift) Setter for property allowPhaseShift.voidautoSelectMixingRule.autoSelectModel.final voidcalc_x_y()calc_x_y.final voidcalc_x_y_nonorm.doublecalcHenrysConstant(String component) calcHenrysConstant.voidcalcInterfaceProperties.voidcalcKIJ(boolean ok) calcKIJ.doublecalculateDensityFromBoilingPoint(double molarMass, double boilingPoint) Calculate density from boiling point and molar mass using TBP correlation.doublecalculateMolarMassFromDensityAndBoilingPoint(double density, double boilingPoint) calculateMolarMassFromDensityAndBoilingPoint.voidchangeComponentName(String name, String newName) changeComponentName.booleancheckStability.voidcheckStability(boolean val) checkStability.voidchemicalReactionInit.voidclearAll()clearAll.clone()clone.voidcreateDatabase(boolean reset) method to read pure component and interaction parameters from the NeqSim database and create temporary tables with parameters for active fluid.String[][]createTable(String name) createTable.voiddeleteFluidPhase(int phaseNum) deleteFluidPhase.voiddisplay.booleanCheck if enhanced stability analysis is enabled.booleanGetter for propertymultiPhaseCheck.final booleandoSolidPhaseCheck.booleandoublegetAntoineVaporPressure(double temp) getAntoineVaporPressure.final doublegetBeta()Getter for propertybeta.final doublegetBeta(int phaseNum) Getter for propertybetafor a specific phase.String[]getCapeOpenProperties10.String[]getCapeOpenProperties11.String[]getCASNumbers.Getter for property characterization.getChemicalReactionOperations.String[]getCompFormulaes.String[]getCompIDs.String[]Get normalized names of all components in System.private intgetComponentIndex(String componentName) getComponentNameTag.doublemethod to return fluid volume with Peneloux volume correction.doublegetCorrectedVolumeFraction(int phaseNumber) method to return the volume fraction of a phase note: with Peneloux volume correction.doublegetCp()method to return specific heat capacity (Cp).doubleCalculates the heat capacity at constant pressure (Cp) in the specified units.doublegetCv()method to return specific heat capacity (Cv).doubleCalculates the heat capacity at constant volume (Cv) in the specified units.doubleGet density of a fluid note: without Peneloux volume correction.doublegetDensity(String unit) Get density of a fluid note: with Peneloux volume correction.doublegetPdVtn.doublegetdVdPtn.doublegetdVdTpn.private doublegetEffectiveDensityForOrdering(int phaseNum) Get effective density for phase ordering.getEmptySystemClone.doubleGet the total enthalpy of a fluid.doublegetEnthalpy(String unit) Calculates the enthalpy in the specified units.doublemethod to return total entropy of the fluid.doublegetEntropy(String unit) Calculates the entropy in the specified units.doublegetExergy(double temperatureOfSurroundings) method to return exergy defined as (h1-T0*s1) in a unit Joule.doublemethod to return exergy in a specified unit.doublegetFlowRate(String flowunit) method to return flow rate of fluid.Getter for property info.getFluidName.doublegetGamma()method to return heat capacity ratio/adiabatic index/Poisson constant.final PhaseInterfacegetGasPhase.doublegetGibbsEnergy.doublegetHeatOfVaporization.doublegetHelmholtzEnergy.booleanGetter for property hydrateCheck.doublegetIdealLiquidDensity(String unit) Get ideal liquid density of fluid in given unit.doublegetInterfacialTension(int phase1, int phase2) method to return interfacial tension between two phases.doublegetInterfacialTension(int phase1, int phase2, String unit) getInterfacialTension.doublegetInterfacialTension(String phase1, String phase2) method to return interfacial tension between two phases.doublemethod to return internal energy (U) in unit J.doublegetInternalEnergy(String unit) method to return internal energy (U) in a specified unit.getInterphaseProperties.doubleGet the Joule Thomson Coefficient of a system.doubleGet the Joule Thomson Coefficient of a system.doublegetKappa()method to return heat capacity ratio/adiabatic index/Poisson constant.doublegetKinematicViscosity.doublegetKinematicViscosity(String unit) method to return kinematic viscosity in a specified unit.double[]getKvector - return vector of equilibrium constants.final PhaseInterfacegetLiquidPhase.doublegetLiquidVolume.getLowestGibbsEnergyPhase.doublemethod to return mass of fluid.intGetter for propertymaxNumberOfPhases.getMixingRule.getMixingRuleName.Getter for propertymodelName.double[]Returns the overall mole composition vector in unit mole fraction.doubleGet molar mass of system.doublegetMolarMass(String unit) Get molar mass of a fluid phase.double[]Get the total molar flow rate of individual components in a fluid.doublemethod to return molar volume of the fluid note: without Peneloux volume correction.doublegetMolarVolume(String unit) method to return molar volume of the fluid: eventual volume correction included.double[]getMolecularWeights.doublegetMoleFraction(int phaseNumber) getMoleFraction.doubleGet sum of mole fractions for all components.double[]getNormalBoilingPointTemperatures.intGet number of components added to System.intgetNumberOfOilFractionComponents.final intGetter for propertynumberOfPhases.getOilAssayCharacterisation.int[]getOilFractionIDs.double[]getOilFractionLiquidDensityAt25C.double[]getOilFractionMolecularMass.double[]getOilFractionNormalBoilingPoints.final doublegetPC()Getter for propertyPC.final PhaseInterfacegetPhase(int i) Get phase number i from SystemInterface object.getPhase.getPhase.final doublegetPhaseFraction(String phaseTypeName, String unit) method to return phase fraction of selected phase.final intgetPhaseIndex(int index) Indexed getter for property phaseIndex.intgetPhaseIndex(String phaseTypeName) Get property phaseIndex corresponding to a phase.intgetPhaseIndex(PhaseInterface phase) Get property phaseIndex corresponding to a phase.intGet phase number of phase of specific type.getPhaseOfType(String phaseTypeName) return the phase of to specified type if the phase does not exist, the method will return null.final PhaseInterface[]getPhases.final doublemethod to return pressure.final doublegetPressure(int phaseNumber) method to return pressure of phase.final doublegetPressure(String unit) method to return pressure in a specified unit.Get physical properties of System.doublegetProperty(String prop) getProperty.doublegetProperty(String prop, int phaseNum) getProperty.doublegetProperty(String prop, String compName, int phaseNum) getProperty.String[][]getResultTable.doubleGet the speed of sound of a system.doublegetSoundSpeed(String unit) Get the speed of sound of a system.Getter for property standard.getStandard(String standardName) Getter for property standard.final doubleGet sum of phasebetavalues.final doublegetTC()Get critical temperature.final doubleGet temperature.doublegetTemperature(int phaseNumber) method to return temperature from a specific phase.final doublegetTemperature(String unit) method to return temperature in a specified unit.doublemethod to return conductivity of a fluid.doublegetThermalConductivity(String unit) method to return thermal conductivity in a specified unit.doubleGetter for propertytotalNumberOfMoles.doublemethod to return viscosity of a fluid.doublegetViscosity(String unit) method to return viscosity in a specified unit.final doublemethod to return fluid volume.doublemethod to return fluid volume.doublegetVolumeFraction(int phaseNumber) method to return the volume fraction of a phase note: without Peneloux volume correction.getWaxCharacterisation.getWaxModel.double[]Returns the overall composition vector in unit mass fraction.doublegetWtFraction(int phaseNumber) getWtFraction.doublegetZ()method to return compressibility factor of a fluid compressibility factor is defined in EoS from PV=ZnRT where V is total volume of fluid.double[]getzvector - return vector of total molar composition.doublemethod to return Z volume corrected gas compressibility.booleanVerify if system has a phase of a specific type.booleanGetter for property hasPlusFraction.booleanhasTBPFraction.voidinit(int initType) method to calculate thermodynamic properties of the fluid.voidinit(int type, int phaseNum) method to calculate thermodynamic properties of the selected phase.final voidinit_x_y()init_x_y.voidinitAnalytic(int type) initAnalytic.voidinitAnalytic(int type, int phaseNum) initAnalytic.final voidinitBeta()Calculate system beta values using Phase.getNumberOfMolesInPhase and getTotalNumberOfMoles.voidinitNumeric.voidinitNumeric(int type) initNumeric.voidinitNumeric(int initType, int phasen) initNumeric.voidInitialize / calculate all physical properties for all phases and interfaces.voidInitialize / calculate a specified physical properties for all phases and interfaces.voidinitRefPhases.final voidinitTotalNumberOfMoles(double change) initTotalNumberOfMoles.voidinvertPhaseTypes.booleanVerify if sum of beta is 1.final booleanisChemicalSystem.final voidisChemicalSystem(boolean temp) isChemicalSystem.booleanisForcePhaseTypes.booleanisImplementedCompositionDeriativesofFugacity.voidisImplementedCompositionDeriativesofFugacity(boolean isImpl) isImplementedCompositionDeriativesofFugacity.booleanisImplementedPressureDeriativesofFugacity.booleanisImplementedTemperatureDeriativesofFugacity.booleanisInitialized.booleanisMultiphaseWaxCheck.booleanGetter for property numericDerivatives.booleanisPhase(int i) Returns true if phase exists and is not null.voidnormalizeBeta.voidOrder phases 0-3, as many as there are, by density such that getPhase(0) is lightest.phaseToSystem(int phaseNumber) phaseToSystem.phaseToSystem(int phaseNumber1, int phaseNumber2) phaseToSystem.phaseToSystem(String phaseName) phaseToSystem.phaseToSystem(PhaseInterface newPhase) phaseToSystem.voidreadFluid.readObject(int ID) readObject.readObjectFromFile(String filePath, String fluidName) readObjectFromFile.voidRe-initialize phasetype, beta and phaseindex arrays, same initialization which is used in constructor.voidreInitPhaseType.voidremoveComponent(String name) removeComponent.voidremovePhase(int specPhase) removePhase.voidremovePhaseKeepTotalComposition(int specPhase) removePhaseKeepTotalComposition.voidrenameComponent(String oldName, String newName) renameComponent.voidreplacePhase(int repPhase, PhaseInterface newPhase) replacePhase.voidreset()Set mole fractions of all components to 0.voidreset_x_y.voidresetCharacterisation.voidresetDatabase.voidresetPhysicalProperties.voidSave System object to file.voidsaveFluid(int ID) saveFluid.voidsaveFluid.voidsaveObject(int ID, String text) saveObject.voidsaveObjectToFile(String filePath, String fluidName) saveObjectToFile.voidsaveToDataBase.voidsetAllComponentsInPhase(int phaseNum) setAllComponentsInPhase.voidSet phase type of all phases.voidsetAttractiveTerm(int i) setAttractiveTerm.final voidsetBeta(double b) Setter for propertybeta.final voidsetBeta(int phaseNum, double b) Setter for propertybetafor a given phase.voidsetBinaryInteractionParameter(int component1, int component2, double value) Set binary interaction parameter for all phase mixing rules.voidsetBinaryInteractionParameter(String component1, String component2, double value) Set binary interaction parameter for all phase mixing rules.voidsetBmixType(int bmixType) setBmixType.voidsetComponentCriticalParameters(int componentIndex, double tc, double pc, double acentricFactor) Set critical properties and acentric factor for a component in all phases.voidsetComponentCriticalParameters(String componentName, double tc, double pc, double acentricFactor) Set critical properties and acentric factor for a component in all phases.voidsetComponentFlowRates(double[] componentFlowRates, String unit) setComponentFlowRates.voidsetComponentNames(String[] componentNames) setComponentNames.voidsetComponentNameTag(String nameTag) setComponentNameTag.voidsetComponentNameTagOnNormalComponents.voidsetComponentVolumeCorrection(int componentIndex, double volumeCorrection) Set Peneloux volume correction for a component in all phases.voidsetComponentVolumeCorrection(String componentName, double volumeCorrection) Set Peneloux volume correction for a component in all phases.voidSet the flow rate (moles) of all components to zero.voidsetEnhancedMultiPhaseCheck(boolean enhancedMultiPhaseCheck) Enable or disable enhanced stability analysis for flash calculations.voidsetFluidInfo(String info) Setter for property info. .voidsetFluidName(String fluidName) setFluidName.voidsetForcePhaseTypes(boolean forcePhaseTypes) setForcePhaseTypes.voidsetForceSinglePhase(String phasetype) setForceSinglePhase - force the fluid to be single phase of type as spesified by phasetype input. phasetypename can be GAS, OIL and AQUEOUSvoidsetForceSinglePhase(PhaseType phasetype) setForceSinglePhase - force the fluid to be single phase of type as spesified by phasetype input.booleansetHeavyTBPfractionAsPlusFraction.voidsetHydrateCheck(boolean hydrateCheck) setHydrateCheck.voidsetImplementedCompositionDeriativesofFugacity(boolean implementedCompositionDeriativesofFugacity) setImplementedCompositionDeriativesofFugacity.voidsetImplementedPressureDeriativesofFugacity(boolean implementedPressureDeriativesofFugacity) setImplementedPressureDeriativesofFugacity.voidsetImplementedTemperatureDeriativesofFugacity(boolean implementedTemperatureDeriativesofFugacity) setImplementedTemperatureDeriativesofFugacity.booleansetLastTBPasPlus.voidsetMaxNumberOfPhases(int maxNumberOfPhases) Setter for propertymaxNumberOfPhases.voidsetMixingRule(String typename, String GEmodel) setMixingRule.final voidmethod to set mixing rule used for the fluid.voidsetMixingRuleGEmodel(String name) setMixingRuleGEmodel.voidsetMixingRuleParametersForComponent(String compName) setMixingRuleParametersForComponent.setModel.voidsetModelName(String modelName) Setter for property modelName.voidsetMolarComposition(double[] molefractions) This method is used to set the total molar composition of a fluid.voidsetMolarCompositionOfNamedComponents(String nameDef, double[] molarComposition) Sets the molar composition of components whose names contain the specified definition.voidsetMolarCompositionOfPlusFluid(double[] molefractions) This method is used to set the total molar composition of a characterized fluid.voidsetMolarCompositionPlus(double[] molefractions) This method is used to set the total molar composition of a plus fluid.voidsetMolarFlowRates(double[] moles) setMolarFlowRates.private voidsetMolarFractions(double[] molefractions, String type) Wrapper function for addComponent to set fluid type and specify mole fractions.voidsetMultiPhaseCheck(boolean multiPhaseCheck) method to specify if calculations should check for more than two fluid phases.voidsetMultiphaseWaxCheck(boolean multiphaseWaxCheck) setMultiphaseWaxCheck.voidsetNumberOfPhases(int number) Setter for propertynumberOfPhases.voidsetNumericDerivatives(boolean numericDerivatives) Setter for property numericDerivatives.final voidsetPC(double PC) Getter for propertyPC.voidsetPhase(PhaseInterface phase, int index) SetphaseArray[phaseIndex] = phase.final voidsetPhaseIndex(int index, int phaseIndex) Indexed setter for propertyphaseIndex.voidsetPhaseType(int phaseToChange, String phaseName) Change the phase type of a given phase.voidsetPhaseType(int phaseToChange, PhaseType pt) Change the phase type of a given phase.final voidsetPressure(double newPressure) method to set the pressure of a fluid (same pressure for all phases).final voidsetPressure(double newPressure, String unit) method to set the pressure of a fluid (same pressure for all phases).voidsetSolidPhaseCheck(boolean solidPhaseCheck) Setter for property solidPhaseCheck.voidsetSolidPhaseCheck(String solidComponent) setSolidPhaseCheck.voidsetStandard(String standardName) Setter for property standard.final voidsetTC(double TC) Getter for propertyTC.voidsetTemperature(double newTemperature) Set the temperature of a fluid (same temperature for all phases).final voidsetTemperature(double newTemperature, int phaseNum) Set the temperature of a single phase in the fluid.voidsetTemperature(double newTemperature, String unit) method to set the temperature of a fluid (same temperature for all phases).voidsetTotalFlowRate(double flowRate, String flowunit) setTotalFlowRate.voidsetTotalNumberOfMoles(double totalNumberOfMoles) Setter for propertytotalNumberOfMoles.voidsetUseTVasIndependentVariables(boolean useTVasIndependentVariables) setUseTVasIndependentVariables.toCompJson - return String with json inormation of pure component properties of fluid.toJson()toJson - return String with json inormation of fluid.voidtuneModel.booleanuseTVasIndependentVariables.voiduseVolumeCorrection(boolean volcor) useVolumeCorrection.write()write.voidwrite.Methods inherited from class Object
finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface SystemInterface
addComponent, addComponents, addComponents, calcResultTable, display, getComponent, getComponent, getComponentNames, getGamma2, getHydrateFraction, getHydratePhase, getNumberOfMoles, getPhaseNumberOfPhase, hasComponent, hasComponent, hashCode, hasHydratePhase, hasPhaseType, hasSolidPhase, initPhysicalProperties, initProperties, initThermoProperties, prettyPrint, setMixingRule, setMixingRule, setPhysicalPropertyModel, setPhysicalPropertyModel, validateSetup
-
Field Details
-
serialVersionUID
private static final long serialVersionUIDSerialization version UID.- See Also:
-
logger
static org.apache.logging.log4j.Logger loggerLogger object for class. -
MAX_PHASES
private static final int MAX_PHASES- See Also:
-
a
protected int a -
allowPhaseShift
protected boolean allowPhaseShift -
attractiveTermNumber
protected int attractiveTermNumber -
beta
protected double[] betaFraction of moles_in_phase / moles_in_system. Cached. -
CapeOpenProperties10
-
CapeOpenProperties11
-
characterization
-
checkStability
protected boolean checkStability -
chemicalReactionOperations
-
chemicalSystem
protected boolean chemicalSystem -
componentNames
-
componentNameTag
-
criticalPressure
protected double criticalPressureCritical pressure in bara. -
criticalTemperature
protected double criticalTemperatureCritical temperature in Kelvin. -
fluidInfo
-
fluidName
-
forcePhaseTypes
private boolean forcePhaseTypes -
hydrateCheck
protected boolean hydrateCheck -
implementedCompositionDeriativesofFugacity
private boolean implementedCompositionDeriativesofFugacity -
implementedPressureDeriativesofFugacity
private boolean implementedPressureDeriativesofFugacity -
implementedTemperatureDeriativesofFugacity
private boolean implementedTemperatureDeriativesofFugacity -
interfaceProp
-
isInitialized
boolean isInitialized -
maxNumberOfPhases
public int maxNumberOfPhasesMaximum allowed number of phases. -
mixingRuleType
-
modelName
-
multiPhaseCheck
protected boolean multiPhaseCheck -
enhancedMultiPhaseCheck
protected boolean enhancedMultiPhaseCheck -
multiphaseWaxCheck
private boolean multiphaseWaxCheck -
numberOfComponents
protected int numberOfComponents -
numberOfPhases
protected int numberOfPhasesNumber of phases in use/existing. -
numericDerivatives
protected boolean numericDerivatives -
phaseArray
Array containing all phases of System. NB! Phases are reorered according to density, use phaseIndex to keep track of the creation order. -
phaseIndex
protected int[] phaseIndexArray of indexes to phaseArray keeping track of the creation order of the phases where 0 is the first created phase and the lowest number is the phase created last. -
phaseType
-
resultTable
-
solidPhaseCheck
protected boolean solidPhaseCheck -
standard
-
totalNumberOfMoles
private double totalNumberOfMoles -
useTVasIndependentVariables
private boolean useTVasIndependentVariables -
waxCharacterisation
-
oilAssayCharacterisation
-
-
Constructor Details
-
SystemThermo
public SystemThermo()Constructor for SystemThermo.
-
SystemThermo
public SystemThermo(double T, double P, boolean checkForSolids) Constructor for SystemThermo.
- Parameters:
T- The temperature in unit KelvinP- The pressure in unit bara (absolute pressure)checkForSolids- Set true to do solid phase check and calculations
-
-
Method Details
-
addCapeOpenProperty
addCapeOpenProperty.
- Specified by:
addCapeOpenPropertyin interfaceSystemInterface- Parameters:
propertyName- aStringobject
-
addCharacterized
public void addCharacterized(String[] charNames, double[] charFlowrate, double[] molarMass, double[] relativedensity) addCharacterized.
- Specified by:
addCharacterizedin interfaceSystemInterface- Parameters:
charNames- an array ofStringobjectscharFlowrate- an array of type doublemolarMass- an array of type doublerelativedensity- an array of type double
-
addComponent
add a component to a fluid. If component already exists, the moles will be added to the existing component.- Specified by:
addComponentin interfaceSystemInterface- Parameters:
inComponent- Component object to add.
-
addComponent
public void addComponent(int index, double moles) addComponent.
- Specified by:
addComponentin interfaceSystemInterface- Parameters:
index- Component number to addmoles- number of moles (per second) of the component to be added to the fluid
-
addComponent
public void addComponent(int index, double moles, int phaseNumber) addComponent.
- Specified by:
addComponentin interfaceSystemInterface- Parameters:
index- Component number to addmoles- number of moles (per second) of the component to be added to the fluidphaseNumber- Number of the phase to add the component to
-
addComponent
add a component to a fluid. If component already exists, the moles will be added to the existing component.- Specified by:
addComponentin interfaceSystemInterface- Parameters:
componentName- Name of the component to add. See NeqSim database for component in the database.moles- number of moles (per second) of the component to be added to the fluid
-
addComponent
addComponent.
- Specified by:
addComponentin interfaceSystemInterface- Parameters:
componentName- Name of the component to add. See NeqSim database for component in the database.moles- number of moles (per second) of the component to be added to the fluidTC- Critical temperature [K]PC- Critical pressure [bara]acs- a double
-
addComponent
add a component to a fluid. If component already exists, the moles will be added to the existing component.- Specified by:
addComponentin interfaceSystemInterface- Parameters:
componentName- Name of the component to add. See NeqSim database for component in the database.moles- number of moles (per second) of the component to be added to the fluidphaseNumber- Number of the phase to add the component to
-
addComponent
add a component to a fluid. If component already exists, the amount will be added to the existing component.- Specified by:
addComponentin interfaceSystemInterface- Parameters:
componentName- Name of the component to add. See NeqSim database for component in the database.value- The amount.unitName- the unit of rate (sported units are kg/sec, mol/sec, Nlitre/min, kg/hr, Sm^3/hr, Sm^3/day, MSm^3/day ..
-
addComponent
add a component to a fluid. I component already exists, it will be added to the component- Specified by:
addComponentin interfaceSystemInterface- Parameters:
componentName- Name of the component to add. See NeqSim database for component in the database.value- rate of the component to add to the fluidname- the unit of the flow rate (eg. mol/sec, kg/sec, etc.)phaseNum- Number of the phase to add the component to
-
addFluid
addFluid.
- Specified by:
addFluidin interfaceSystemInterface- Parameters:
addSystem- aSystemInterfaceobject- Returns:
- SystemInterface
-
addFluid
addFluid.
- Specified by:
addFluidin interfaceSystemInterface- Parameters:
addSystem- aSystemInterfaceobjectphaseNum- phase number of phase to add fluid to- Returns:
- SystemInterface
-
addGasToLiquid
public void addGasToLiquid(double fraction) addGasToLiquid.
- Specified by:
addGasToLiquidin interfaceSystemInterface- Parameters:
fraction- a double
-
addHydratePhase
public void addHydratePhase()addHydratePhase.
-
addHydratePhase2
public void addHydratePhase2()addHydratePhase2.
-
addLiquidToGas
public void addLiquidToGas(double fraction) addLiquidToGas.
- Specified by:
addLiquidToGasin interfaceSystemInterface- Parameters:
fraction- a double
-
addOilFractions
public void addOilFractions(String[] charNames, double[] charFlowrate, double[] molarMass, double[] relativedensity, boolean lastIsPlusFraction) addCharacterized.
- Specified by:
addOilFractionsin interfaceSystemInterface- Parameters:
charNames- an array ofStringobjectscharFlowrate- an array of type doublemolarMass- an array of type doublerelativedensity- an array of type doublelastIsPlusFraction- True if last fraction is a Plus fraction
-
addOilFractions
public void addOilFractions(String[] charNames, double[] charFlowrate, double[] molarMass, double[] relativedensity, boolean lastIsPlusFraction, boolean lumpComponents, int numberOfPseudoComponents) addCharacterized.
- Specified by:
addOilFractionsin interfaceSystemInterface- Parameters:
charNames- an array ofStringobjectscharFlowrate- an array of type doublemolarMass- an array of type doublerelativedensity- an array of type doublelastIsPlusFraction- True if last fraction is a Plus fractionlumpComponents- True if component should be lumpednumberOfPseudoComponents- number of pseudo components
-
addPhase
public void addPhase()Add phase to SystemInterface object.- Specified by:
addPhasein interfaceSystemInterface
-
addPhaseFractionToPhase
public void addPhaseFractionToPhase(double fraction, String specification, String fromPhaseName, String toPhaseName) addPhaseFractionToPhase.
- Specified by:
addPhaseFractionToPhasein interfaceSystemInterface- Parameters:
fraction- a doublespecification- aStringobjectfromPhaseName- aStringobjecttoPhaseName- aStringobject
-
addPhaseFractionToPhase
public void addPhaseFractionToPhase(double fraction, String specification, String specifiedStream, String fromPhaseName, String toPhaseName) addPhaseFractionToPhase.
- Specified by:
addPhaseFractionToPhasein interfaceSystemInterface- Parameters:
fraction- a doublespecification- aStringobjectspecifiedStream- aStringobjectfromPhaseName- aStringobjecttoPhaseName- aStringobject
-
addPlusFraction
public void addPlusFraction(String componentName, double numberOfMoles, double molarMass, double density) addPlusFraction.
- Specified by:
addPlusFractionin interfaceSystemInterface- Parameters:
componentName- aStringobjectnumberOfMoles- a doublemolarMass- a doubledensity- a double
-
addSalt
addSalt.
- Specified by:
addSaltin interfaceSystemInterface- Parameters:
componentName- aStringobjectvalue- a double
-
addSolidComplexPhase
addSolidComplexPhase.
- Specified by:
addSolidComplexPhasein interfaceSystemInterface- Parameters:
type- aStringobject
-
addSolidPhase
public void addSolidPhase()addSolidPhase.
-
addTBPfraction
public void addTBPfraction(String componentName, double numberOfMoles, double molarMass, double density) method to add true boiling point fraction.- Specified by:
addTBPfractionin interfaceSystemInterface- Parameters:
componentName- selected name of the component to be addednumberOfMoles- number of moles to be addedmolarMass- molar mass of the component in kg/moldensity- density of the component in g/cm3
-
addTBPfraction
public void addTBPfraction(String componentName, double numberOfMoles, double molarMass, double density, double criticalTemperature, double criticalPressure, double acentricFactor) addTBPfraction.
- Specified by:
addTBPfractionin interfaceSystemInterface- Parameters:
componentName- aStringobjectnumberOfMoles- a doublemolarMass- a doubledensity- a doublecriticalTemperature- a doublecriticalPressure- a doubleacentricFactor- a double
-
addToComponentNames
Add to component names.- Specified by:
addToComponentNamesin interfaceSystemInterface- Parameters:
postfix- Component name to add
-
allowPhaseShift
public boolean allowPhaseShift()Getter for property allowPhaseShift.
- Specified by:
allowPhaseShiftin interfaceSystemInterface- Returns:
- a boolean
-
allowPhaseShift
public void allowPhaseShift(boolean allowPhaseShift) Setter for property allowPhaseShift.
- Specified by:
allowPhaseShiftin interfaceSystemInterface- Parameters:
allowPhaseShift- a boolean
-
autoSelectMixingRule
public void autoSelectMixingRule()autoSelectMixingRule.
- Specified by:
autoSelectMixingRulein interfaceSystemInterface
-
autoSelectModel
autoSelectModel.
- Specified by:
autoSelectModelin interfaceSystemInterface- Returns:
- a
SystemInterfaceobject
-
calc_x_y
-
calc_x_y_nonorm
public final void calc_x_y_nonorm()calc_x_y_nonorm.
- Specified by:
calc_x_y_nonormin interfaceSystemInterface
-
calcHenrysConstant
calcHenrysConstant.
- Specified by:
calcHenrysConstantin interfaceSystemInterface- Parameters:
component- aStringobject- Returns:
- a double
-
calcInterfaceProperties
public void calcInterfaceProperties()calcInterfaceProperties.
- Specified by:
calcInterfacePropertiesin interfaceSystemInterface
-
calcKIJ
public void calcKIJ(boolean ok) calcKIJ.
- Specified by:
calcKIJin interfaceSystemInterface- Parameters:
ok- a boolean
-
changeComponentName
changeComponentName.
- Specified by:
changeComponentNamein interfaceSystemInterface- Parameters:
name- aStringobjectnewName- aStringobject
-
checkStability
public boolean checkStability()checkStability.
- Specified by:
checkStabilityin interfaceSystemInterface- Returns:
- a boolean
-
checkStability
public void checkStability(boolean val) checkStability.
- Specified by:
checkStabilityin interfaceSystemInterface- Parameters:
val- a boolean
-
chemicalReactionInit
public void chemicalReactionInit()chemicalReactionInit.
- Specified by:
chemicalReactionInitin interfaceSystemInterface
-
clearAll
-
clone
clone.
- Specified by:
clonein interfaceSystemInterface- Overrides:
clonein classObject- Returns:
- a
SystemInterfaceobject
-
createDatabase
public void createDatabase(boolean reset) method to read pure component and interaction parameters from the NeqSim database and create temporary tables with parameters for active fluid.NB! Resets the mixing rule of each phase.
- Specified by:
createDatabasein interfaceSystemInterface- Parameters:
reset- If reset is set to true, new temporary tables with parameters for the added components will be created. When parameters are needed (eg. when adding components or when setting a mixing rule) it will try to find them in the temporary tables first eg. COMPTEMP (for pure component parameters) and INTERTEMP (for interaction parameters). If reset is set to false it will not create new temporary tables. If a fluid is created with the same components many times, performance improvements will be obtained, if temporary tables are created the first time (reset=true), and then the same tables is used when creating new fluids with the same temporary tables (reset=false)
-
createTable
createTable.
- Specified by:
createTablein interfaceSystemInterface- Parameters:
name- aStringobject- Returns:
- an array of
Stringobjects
-
addTBPfraction2
public void addTBPfraction2(String componentName, double numberOfMoles, double molarMass, double boilingPoint) addTBPfraction2.
- Specified by:
addTBPfraction2in interfaceSystemInterface- Parameters:
componentName- aStringobjectnumberOfMoles- a doublemolarMass- a doubleboilingPoint- a double
-
calculateDensityFromBoilingPoint
public double calculateDensityFromBoilingPoint(double molarMass, double boilingPoint) Calculate density from boiling point and molar mass using TBP correlation.- Specified by:
calculateDensityFromBoilingPointin interfaceSystemInterface- Parameters:
molarMass- molar mass in kg/molboilingPoint- boiling point in K- Returns:
- density in g/cm3
-
addTBPfraction3
public void addTBPfraction3(String componentName, double numberOfMoles, double density, double boilingPoint) Adds a TBP fraction to the system. Add TBP fraction using density and boiling point, calculating molar mass.- Specified by:
addTBPfraction3in interfaceSystemInterface- Parameters:
componentName- the name of the componentnumberOfMoles- number of molesdensity- density of the componentboilingPoint- boiling point
-
calculateMolarMassFromDensityAndBoilingPoint
public double calculateMolarMassFromDensityAndBoilingPoint(double density, double boilingPoint) calculateMolarMassFromDensityAndBoilingPoint.
Calculates molar mass from density and boiling point- Specified by:
calculateMolarMassFromDensityAndBoilingPointin interfaceSystemInterface- Parameters:
density- a doubleboilingPoint- a double- Returns:
- a double
-
addTBPfraction4
public void addTBPfraction4(String componentName, double numberOfMoles, double molarMass, double density, double boilingPoint) Adds a TBP fraction to the system. Add TBP fraction using density and boiling point, calculating molar mass.- Specified by:
addTBPfraction4in interfaceSystemInterface- Parameters:
componentName- the name of the componentnumberOfMoles- number of molesmolarMass- molar massdensity- density of the componentboilingPoint- boiling point
-
deleteFluidPhase
public void deleteFluidPhase(int phaseNum) deleteFluidPhase.
- Specified by:
deleteFluidPhasein interfaceSystemInterface- Parameters:
phaseNum- a int
-
display
display.
- Specified by:
displayin interfaceSystemInterface- Parameters:
name- aStringobject
-
doMultiPhaseCheck
public boolean doMultiPhaseCheck()Getter for property
multiPhaseCheck.- Specified by:
doMultiPhaseCheckin interfaceSystemInterface- Returns:
- a boolean
-
doSolidPhaseCheck
public final boolean doSolidPhaseCheck()doSolidPhaseCheck.
- Specified by:
doSolidPhaseCheckin interfaceSystemInterface- Returns:
- a boolean
-
getAntoineVaporPressure
public double getAntoineVaporPressure(double temp) getAntoineVaporPressure.
- Parameters:
temp- a double- Returns:
- a double
-
getBeta
public final double getBeta()Getter for property
beta. Gets value for heaviest phase.- Specified by:
getBetain interfaceSystemInterface- Returns:
- Beta value
-
getBeta
public final double getBeta(int phaseNum) Getter for property
betafor a specific phase.- Specified by:
getBetain interfaceSystemInterface- Parameters:
phaseNum- Number of phase to get beta for.- Returns:
- Beta value for
-
getCapeOpenProperties10
getCapeOpenProperties10.
- Specified by:
getCapeOpenProperties10in interfaceSystemInterface- Returns:
- an array of
Stringobjects
-
getCapeOpenProperties11
getCapeOpenProperties11.
- Specified by:
getCapeOpenProperties11in interfaceSystemInterface- Returns:
- an array of
Stringobjects
-
getCASNumbers
getCASNumbers.
- Specified by:
getCASNumbersin interfaceSystemInterface- Returns:
- an array of
Stringobjects
-
getCharacterization
Getter for property characterization.
- Specified by:
getCharacterizationin interfaceSystemInterface- Returns:
- a
Characteriseobject
-
getChemicalReactionOperations
getChemicalReactionOperations.
- Specified by:
getChemicalReactionOperationsin interfaceSystemInterface- Returns:
- a
ChemicalReactionOperationsobject
-
getCompFormulaes
getCompFormulaes.
- Specified by:
getCompFormulaesin interfaceSystemInterface- Returns:
- an array of
Stringobjects
-
getCompIDs
getCompIDs.
- Specified by:
getCompIDsin interfaceSystemInterface- Returns:
- an array of
Stringobjects
-
getCompNames
Get normalized names of all components in System.- Specified by:
getCompNamesin interfaceSystemInterface- Returns:
- Array of names of components in System.
-
getComponentNameTag
getComponentNameTag.
- Specified by:
getComponentNameTagin interfaceSystemInterface- Returns:
- a
Stringobject
-
getCorrectedVolume
public double getCorrectedVolume()method to return fluid volume with Peneloux volume correction.need to call initPhysicalProperties() before this method is called
- Specified by:
getCorrectedVolumein interfaceSystemInterface- Returns:
- volume in unit m3
-
getCorrectedVolumeFraction
public double getCorrectedVolumeFraction(int phaseNumber) method to return the volume fraction of a phase note: with Peneloux volume correction.- Specified by:
getCorrectedVolumeFractionin interfaceSystemInterface- Parameters:
phaseNumber- number of the phase to get volume fraction for- Returns:
- volume fraction
-
getCp
public double getCp()method to return specific heat capacity (Cp).- Specified by:
getCpin interfaceSystemInterface- Returns:
- Cp in unit J/K
-
getCp
Calculates the heat capacity at constant pressure (Cp) in the specified units. method to return specific heat capacity (Cp) in a specified unit.- Specified by:
getCpin interfaceSystemInterface- Parameters:
unit- Supported units are J/K, J/molK, J/kgK and kJ/kgK- Returns:
- Cp in specified unit
-
getCv
public double getCv()method to return specific heat capacity (Cv).- Specified by:
getCvin interfaceSystemInterface- Returns:
- Cv in unit J/K
-
getCv
Calculates the heat capacity at constant volume (Cv) in the specified units. method to return specific heat capacity (Cp) in a specified unit.- Specified by:
getCvin interfaceSystemInterface- Parameters:
unit- Supported units are J/K, J/molK, J/kgK and kJ/kgK- Returns:
- Cp in specified unit
-
getDensity
public double getDensity()Get density of a fluid note: without Peneloux volume correction.- Specified by:
getDensityin interfaceSystemInterface- Returns:
- density with unit kg/m3
-
getDensity
Get density of a fluid note: with Peneloux volume correction.- Specified by:
getDensityin interfaceSystemInterface- Parameters:
unit- Supported units are kg/m3, mol/m3- Returns:
- density in specified unit
-
getdPdVtn
public double getdPdVtn()getPdVtn.- Returns:
- dpdv
-
getdVdPtn
public double getdVdPtn()getdVdPtn.
- Specified by:
getdVdPtnin interfaceSystemInterface- Returns:
- a double
-
getdVdTpn
public double getdVdTpn()getdVdTpn.
- Specified by:
getdVdTpnin interfaceSystemInterface- Returns:
- a double
-
getEmptySystemClone
getEmptySystemClone.
- Specified by:
getEmptySystemClonein interfaceSystemInterface- Returns:
- a
SystemInterfaceobject
-
getEnthalpy
public double getEnthalpy()Get the total enthalpy of a fluid.- Specified by:
getEnthalpyin interfaceSystemInterface- Returns:
- molar mass in unit J (Joule)
-
getEnthalpy
Calculates the enthalpy in the specified units. method to return total enthalpy in a specified unit.- Specified by:
getEnthalpyin interfaceSystemInterface- Parameters:
unit- Supported units are 'J', 'J/mol', 'kJ/kmol', 'J/kg' and 'kJ/kg'- Returns:
- enthalpy in specified unit
-
getEntropy
public double getEntropy()method to return total entropy of the fluid.- Specified by:
getEntropyin interfaceSystemInterface- Returns:
- entropy in unit J/K (Joule/Kelvin)
-
getEntropy
Calculates the entropy in the specified units. method to return total entropy of the fluid.- Specified by:
getEntropyin interfaceSystemInterface- Parameters:
unit- unit supported units are J/K, J/molK, J/kgK and kJ/kgK- Returns:
- entropy in specified unit
-
getExergy
public double getExergy(double temperatureOfSurroundings) method to return exergy defined as (h1-T0*s1) in a unit Joule.- Specified by:
getExergyin interfaceSystemInterface- Parameters:
temperatureOfSurroundings- in Kelvin- Returns:
- a double
-
getExergy
method to return exergy in a specified unit.- Specified by:
getExergyin interfaceSystemInterface- Parameters:
temperatureOfSurroundings- in KelvinexergyUnit- aStringobject- Returns:
- exergy in specified unit
-
getFlowRate
method to return flow rate of fluid.- Specified by:
getFlowRatein interfaceSystemInterface- Parameters:
flowunit- Supported units are kg/sec, kg/min, kg/hr, kg/day, m3/sec, m3/min, m3/hr, idSm3/hr, Sm3/sec, Sm3/hr, Sm3/day, MSm3/day, mole/sec, mole/min, mole/hr- Returns:
- flow rate in specified unit
-
getFluidInfo
Getter for property info.
- Specified by:
getFluidInfoin interfaceSystemInterface- Returns:
- a
Stringobject
-
getFluidName
getFluidName.
- Specified by:
getFluidNamein interfaceSystemInterface- Returns:
- a
Stringobject
-
getGamma
public double getGamma()method to return heat capacity ratio/adiabatic index/Poisson constant.- Specified by:
getGammain interfaceSystemInterface- Returns:
- kappa
-
getGasPhase
getGasPhase.
- Specified by:
getGasPhasein interfaceSystemInterface- Returns:
- a
PhaseInterfaceobject
-
getGibbsEnergy
public double getGibbsEnergy()getGibbsEnergy.
- Specified by:
getGibbsEnergyin interfaceSystemInterface- Returns:
- a double
-
getHeatOfVaporization
public double getHeatOfVaporization()getHeatOfVaporization.
- Specified by:
getHeatOfVaporizationin interfaceSystemInterface- Returns:
- a double
-
getHelmholtzEnergy
public double getHelmholtzEnergy()getHelmholtzEnergy.
- Specified by:
getHelmholtzEnergyin interfaceSystemInterface- Returns:
- a double
-
getHydrateCheck
public boolean getHydrateCheck()Getter for property hydrateCheck.
- Specified by:
getHydrateCheckin interfaceSystemInterface- Returns:
- a boolean
-
getIdealLiquidDensity
Get ideal liquid density of fluid in given unit.- Specified by:
getIdealLiquidDensityin interfaceSystemInterface- Parameters:
unit-StringSupported units are kg/m3 and gr/cm3- Returns:
- a double
-
getInterfacialTension
public double getInterfacialTension(int phase1, int phase2) method to return interfacial tension between two phases.- Specified by:
getInterfacialTensionin interfaceSystemInterface- Parameters:
phase1- phase number of phase1phase2- phase number of phase2- Returns:
- interfacial tension with unit N/m
-
getInterfacialTension
getInterfacialTension.
- Specified by:
getInterfacialTensionin interfaceSystemInterface- Parameters:
phase1- phase number of phase1phase2- phase number of phase2unit- aStringobject- Returns:
- interfacial tension with specified unit
-
getInterfacialTension
method to return interfacial tension between two phases.- Specified by:
getInterfacialTensionin interfaceSystemInterface- Parameters:
phase1- phase type of phase1 as string (valid phases are gas, oil, aqueous)phase2- phase type of phase2 as string (valid phases are gas, oil, aqueous)- Returns:
- interfacial tension with unit N/m. If one or both phases does not exist - the method will return NaN
-
getInternalEnergy
public double getInternalEnergy()method to return internal energy (U) in unit J.- Specified by:
getInternalEnergyin interfaceSystemInterface- Returns:
- internal energy in unit Joule (J)
-
getInternalEnergy
method to return internal energy (U) in a specified unit.- Specified by:
getInternalEnergyin interfaceSystemInterface- Parameters:
unit- Supported units are 'J', 'J/mol', 'J/kg' and 'kJ/kg'- Returns:
- enthalpy in specified unit
-
getInterphaseProperties
getInterphaseProperties.
- Specified by:
getInterphasePropertiesin interfaceSystemInterface- Returns:
- a
InterphasePropertiesInterfaceobject
-
getJouleThomsonCoefficient
public double getJouleThomsonCoefficient()Get the Joule Thomson Coefficient of a system. Based on a phase mole fraction basis average- Specified by:
getJouleThomsonCoefficientin interfaceSystemInterface- Returns:
- Joule Thomson coefficient in K/bar
-
getJouleThomsonCoefficient
Get the Joule Thomson Coefficient of a system. Based on a phase mole fraction basis average.- Specified by:
getJouleThomsonCoefficientin interfaceSystemInterface- Parameters:
unit- Supported units are K/bar, C/bar- Returns:
- Joule Thomson coefficient in specified unit
-
getKappa
public double getKappa()method to return heat capacity ratio/adiabatic index/Poisson constant.- Specified by:
getKappain interfaceSystemInterface- Returns:
- kappa
-
getKinematicViscosity
public double getKinematicViscosity()getKinematicViscosity.
- Specified by:
getKinematicViscosityin interfaceSystemInterface- Returns:
- a double
-
getKinematicViscosity
method to return kinematic viscosity in a specified unit.- Specified by:
getKinematicViscosityin interfaceSystemInterface- Parameters:
unit- Supported units are m2/sec- Returns:
- kinematic viscosity in specified unit
-
getLiquidPhase
getLiquidPhase.
- Specified by:
getLiquidPhasein interfaceSystemInterface- Returns:
- a
PhaseInterfaceobject
-
getLiquidVolume
public double getLiquidVolume()getLiquidVolume.
- Specified by:
getLiquidVolumein interfaceSystemInterface- Returns:
- a double
-
getLowestGibbsEnergyPhase
getLowestGibbsEnergyPhase.
- Specified by:
getLowestGibbsEnergyPhasein interfaceSystemInterface- Returns:
- a
PhaseInterfaceobject
-
getMass
method to return mass of fluid.- Specified by:
getMassin interfaceSystemInterface- Parameters:
unit- Supported units are kg, gr, tons- Returns:
- mass in specified unit
-
getMaxNumberOfPhases
public int getMaxNumberOfPhases()Getter for property
maxNumberOfPhases.- Specified by:
getMaxNumberOfPhasesin interfaceSystemInterface- Returns:
- Gets the maximum allowed number of phases to use.
-
getMixingRule
getMixingRule.
- Specified by:
getMixingRulein interfaceSystemInterface- Returns:
- A MixingRuleTypeInterface
-
getMixingRuleName
getMixingRuleName.
- Specified by:
getMixingRuleNamein interfaceSystemInterface- Returns:
- a
Stringobject
-
getModelName
Getter for property
modelName.- Specified by:
getModelNamein interfaceSystemInterface- Returns:
- a
Stringobject
-
getMolarComposition
public double[] getMolarComposition()Returns the overall mole composition vector in unit mole fraction.
- Specified by:
getMolarCompositionin interfaceSystemInterface- Returns:
- an array of type double
-
getWeightBasedComposition
public double[] getWeightBasedComposition()Returns the overall composition vector in unit mass fraction.
- Specified by:
getWeightBasedCompositionin interfaceSystemInterface- Returns:
- an array of type double
-
getMolarMass
public double getMolarMass()Get molar mass of system.- Specified by:
getMolarMassin interfaceSystemInterface- Returns:
- molar mass in unit kg/mol
-
getMolarMass
Get molar mass of a fluid phase.- Specified by:
getMolarMassin interfaceSystemInterface- Parameters:
unit- Supported units are kg/mol, gr/mol- Returns:
- molar mass in specified unit
-
getMolarRate
public double[] getMolarRate()Get the total molar flow rate of individual components in a fluid.- Specified by:
getMolarRatein interfaceSystemInterface- Returns:
- molar flow of individual components in unit mol/sec
-
getMolarVolume
public double getMolarVolume()method to return molar volume of the fluid note: without Peneloux volume correction.- Specified by:
getMolarVolumein interfaceSystemInterface- Returns:
- molar volume volume in unit m3/mol*1e5
-
getMolarVolume
method to return molar volume of the fluid: eventual volume correction included.- Specified by:
getMolarVolumein interfaceSystemInterface- Parameters:
unit- Supported units are m3/mol, litre/mol- Returns:
- molar volume volume in unit
-
getMolecularWeights
public double[] getMolecularWeights()getMolecularWeights.
- Specified by:
getMolecularWeightsin interfaceSystemInterface- Returns:
- an array of type double
-
getMoleFraction
public double getMoleFraction(int phaseNumber) getMoleFraction.
- Specified by:
getMoleFractionin interfaceSystemInterface- Parameters:
phaseNumber- a int- Returns:
- a double
-
getMoleFractionsSum
public double getMoleFractionsSum()Get sum of mole fractions for all components. NB! init(0) must be called first.
- Specified by:
getMoleFractionsSumin interfaceSystemInterface- Returns:
- a double
-
getNormalBoilingPointTemperatures
public double[] getNormalBoilingPointTemperatures()getNormalBoilingPointTemperatures.
- Specified by:
getNormalBoilingPointTemperaturesin interfaceSystemInterface- Returns:
- an array of type double
-
getNumberOfComponents
public int getNumberOfComponents()Get number of components added to System.
- Specified by:
getNumberOfComponentsin interfaceSystemInterface- Returns:
- the number of components in System.
-
getNumberOfOilFractionComponents
public int getNumberOfOilFractionComponents()getNumberOfOilFractionComponents.
- Specified by:
getNumberOfOilFractionComponentsin interfaceSystemInterface- Returns:
- a int
-
getNumberOfPhases
public final int getNumberOfPhases()Getter for property
numberOfPhases.- Specified by:
getNumberOfPhasesin interfaceSystemInterface- Returns:
- Number of phases used
-
getOilFractionIDs
public int[] getOilFractionIDs()getOilFractionIDs.
- Specified by:
getOilFractionIDsin interfaceSystemInterface- Returns:
- an array of
objects
invalid reference
int
-
getOilFractionLiquidDensityAt25C
public double[] getOilFractionLiquidDensityAt25C()getOilFractionLiquidDensityAt25C.
- Specified by:
getOilFractionLiquidDensityAt25Cin interfaceSystemInterface- Returns:
- an array of type double
-
getOilFractionMolecularMass
public double[] getOilFractionMolecularMass()getOilFractionMolecularMass.
- Specified by:
getOilFractionMolecularMassin interfaceSystemInterface- Returns:
- an array of type double
-
getOilFractionNormalBoilingPoints
public double[] getOilFractionNormalBoilingPoints()getOilFractionNormalBoilingPoints.
- Specified by:
getOilFractionNormalBoilingPointsin interfaceSystemInterface- Returns:
- an array of type double
-
getPC
public final double getPC()Getter for property
PC.- Specified by:
getPCin interfaceSystemInterface- Returns:
- Critical pressure in unit bara.
-
getPhase
Get phase number i from SystemInterface object.- Specified by:
getPhasein interfaceSystemInterface- Parameters:
i- Phase number- Returns:
- a
PhaseInterfaceobject
-
getPhase
getPhase.
- Specified by:
getPhasein interfaceSystemInterface- Parameters:
pt- aPhaseTypeobject- Returns:
- a
PhaseInterfaceobject
-
getPhase
getPhase.
- Specified by:
getPhasein interfaceSystemInterface- Parameters:
phaseTypeName- aStringobject- Returns:
- a
PhaseInterfaceobject
-
getPhaseFraction
method to return phase fraction of selected phase.- Specified by:
getPhaseFractionin interfaceSystemInterface- Parameters:
phaseTypeName- gas/oil/aqueousunit- mole/volume/weight- Returns:
- phase: fraction in specified unit
-
getPhaseIndex
public final int getPhaseIndex(int index) Indexed getter for property phaseIndex.
- Specified by:
getPhaseIndexin interfaceSystemInterface- Parameters:
index- Phase number- Returns:
- PhaseIndex to index into phaseArray.
-
getPhaseIndex
Get property phaseIndex corresponding to a phase.- Specified by:
getPhaseIndexin interfaceSystemInterface- Parameters:
phase- Phase object to search for.- Returns:
- PhaseIndex to index into phaseArray.
-
getPhaseIndex
Get property phaseIndex corresponding to a phase.
- Specified by:
getPhaseIndexin interfaceSystemInterface- Parameters:
phaseTypeName- aStringobject- Returns:
- PhaseIndex to index into phaseArray.
-
getPhaseNumberOfPhase
Get phase number of phase of specific type.
- Specified by:
getPhaseNumberOfPhasein interfaceSystemInterface- Parameters:
pt- Phase type to look for.- Returns:
- Phase number
-
getPhaseOfType
return the phase of to specified type if the phase does not exist, the method will return null.- Specified by:
getPhaseOfTypein interfaceSystemInterface- Parameters:
phaseTypeName- the phase type to be returned (gas, oil, aqueous, wax, hydrate are supported)- Returns:
- a
PhaseInterfaceobject
-
getPhases
getPhases.
- Specified by:
getPhasesin interfaceSystemInterface- Returns:
- an array of
PhaseInterfaceobjects
-
getPressure
public final double getPressure()method to return pressure.- Specified by:
getPressurein interfaceSystemInterface- Returns:
- pressure in unit bara
-
getPressure
public final double getPressure(int phaseNumber) method to return pressure of phase.
- Specified by:
getPressurein interfaceSystemInterface- Parameters:
phaseNumber- Number of the phase to get pressure for- Returns:
- pressure in unit bara
-
getPressure
method to return pressure in a specified unit.- Specified by:
getPressurein interfaceSystemInterface- Parameters:
unit- Supported units are bara, barg, Pa, MPa, psi, psia, psig- Returns:
- pressure in specified unit
-
getProperties
Get physical properties of System.- Specified by:
getPropertiesin interfaceSystemInterface- Returns:
- System properties
-
getProperty
getProperty.
- Specified by:
getPropertyin interfaceSystemInterface- Parameters:
prop- aStringobject- Returns:
- a double
-
getProperty
getProperty.
- Specified by:
getPropertyin interfaceSystemInterface- Parameters:
prop- aStringobjectphaseNum- a int- Returns:
- a double
-
getProperty
getProperty.
- Specified by:
getPropertyin interfaceSystemInterface- Parameters:
prop- aStringobjectcompName- aStringobjectphaseNum- a int- Returns:
- a double
-
getResultTable
getResultTable.
- Specified by:
getResultTablein interfaceSystemInterface- Returns:
- an array of
Stringobjects
-
getSoundSpeed
public double getSoundSpeed()Get the speed of sound of a system. The sound speed is implemented based on a molar average over the phases- Specified by:
getSoundSpeedin interfaceSystemInterface- Returns:
- speed of sound in m/s
-
getSoundSpeed
Get the speed of sound of a system. The sound speed is implemented based on a molar average over the phases- Specified by:
getSoundSpeedin interfaceSystemInterface- Parameters:
unit- Supported units are m/s, km/h- Returns:
- speed of sound in m/s
-
getStandard
Getter for property standard.
- Specified by:
getStandardin interfaceSystemInterface- Returns:
- a
StandardInterfaceobject
-
getStandard
Getter for property standard.
- Specified by:
getStandardin interfaceSystemInterface- Parameters:
standardName- aStringobject- Returns:
- a
StandardInterfaceobject
-
getSumBeta
public final double getSumBeta()Get sum of phasebetavalues.- Returns:
- Sum of
betabeta values
-
isBetaValid
public boolean isBetaValid()Verify if sum of beta is 1. Used to check if System needs to be flashed.- Returns:
- True if the sum of beta is close to 1.
-
getTC
public final double getTC()Get critical temperature.
- Specified by:
getTCin interfaceSystemInterface- Returns:
- Critical temperature in unit Kelvin
-
getTemperature
public final double getTemperature()Get temperature.- Specified by:
getTemperaturein interfaceSystemInterface- Returns:
- temperature in unit Kelvin
-
getTemperature
public double getTemperature(int phaseNumber) method to return temperature from a specific phase.
- Specified by:
getTemperaturein interfaceSystemInterface- Parameters:
phaseNumber- phase to get temperature of- Returns:
- temperature in unit Kelvin
-
getTemperature
method to return temperature in a specified unit.- Specified by:
getTemperaturein interfaceSystemInterface- Parameters:
unit- Supported units are K, C, R- Returns:
- temperature in specified unit
-
getThermalConductivity
public double getThermalConductivity()method to return conductivity of a fluid.- Specified by:
getThermalConductivityin interfaceSystemInterface- Returns:
- conductivity in unit W/mK
-
getThermalConductivity
method to return thermal conductivity in a specified unit.- Specified by:
getThermalConductivityin interfaceSystemInterface- Parameters:
unit- Supported units are W/mK, W/cmK- Returns:
- conductivity in specified unit
-
getTotalNumberOfMoles
public double getTotalNumberOfMoles()Getter for propertytotalNumberOfMoles.- Specified by:
getTotalNumberOfMolesin interfaceSystemInterface- Returns:
- Total molar flow rate of fluid in unit mol/sec
-
getViscosity
public double getViscosity()method to return viscosity of a fluid.- Specified by:
getViscosityin interfaceSystemInterface- Returns:
- viscosity in unit kg/msec
-
getViscosity
method to return viscosity in a specified unit.- Specified by:
getViscosityin interfaceSystemInterface- Parameters:
unit- Supported units are kg/msec, cP (centipoise), Pas (Pascal*second)- Returns:
- viscosity in specified unit
-
getVolume
public final double getVolume()method to return fluid volume.- Specified by:
getVolumein interfaceSystemInterface- Returns:
- volume in unit m3*1e5
-
getVolume
method to return fluid volume.- Specified by:
getVolumein interfaceSystemInterface- Parameters:
unit- Supported units are m3, litre, m3/kg, m3/mol- Returns:
- volume in specified unit
-
getVolumeFraction
public double getVolumeFraction(int phaseNumber) method to return the volume fraction of a phase note: without Peneloux volume correction.- Specified by:
getVolumeFractionin interfaceSystemInterface- Parameters:
phaseNumber- number of the phase to get volume fraction for- Returns:
- volume fraction
-
getOilAssayCharacterisation
getOilAssayCharacterisation.
- Specified by:
getOilAssayCharacterisationin interfaceSystemInterface- Returns:
- a
OilAssayCharacterisationobject
-
getWaxCharacterisation
getWaxCharacterisation.
- Specified by:
getWaxCharacterisationin interfaceSystemInterface- Returns:
- a
WaxCharacteriseobject
-
getWaxModel
getWaxModel.
- Specified by:
getWaxModelin interfaceSystemInterface- Returns:
- a
WaxModelInterfaceobject
-
getWtFraction
public double getWtFraction(int phaseNumber) getWtFraction.
- Specified by:
getWtFractionin interfaceSystemInterface- Parameters:
phaseNumber- a int- Returns:
- a double
-
getZ
public double getZ()method to return compressibility factor of a fluid compressibility factor is defined in EoS from PV=ZnRT where V is total volume of fluid.- Specified by:
getZin interfaceSystemInterface- Returns:
- compressibility factor Z
-
getZvolcorr
public double getZvolcorr()method to return Z volume corrected gas compressibility.- Specified by:
getZvolcorrin interfaceSystemInterface- Returns:
- double Z volume corrected
-
hasPhaseType
Verify if system has a phase of a specific type.- Specified by:
hasPhaseTypein interfaceSystemInterface- Parameters:
pt- PhaseType to look for- Returns:
- True if system contains a phase of requested type
-
hasPlusFraction
public boolean hasPlusFraction()Getter for property hasPlusFraction.
- Specified by:
hasPlusFractionin interfaceSystemInterface- Returns:
- a boolean
-
hasTBPFraction
public boolean hasTBPFraction()hasTBPFraction.
- Returns:
- a boolean
-
init
public void init(int initType) method to calculate thermodynamic properties of the fluid. The temperature, pressure, number of phases and composition of the phases will be used as basis for calculation.- Specified by:
initin interfaceSystemInterface- Parameters:
initType- - The number can be 0, 1, 2 or 3. 0: Set feed composition for all phases. 1: Calculation of density, fugacities and Z-factor 2: 1 + calculation of enthalpy, entropy, Cp, Cv, and most other thermodynamic properties 3: 1+2 + Calculation of composition derivatives of fugacity coefficients.
-
init
public void init(int type, int phaseNum) method to calculate thermodynamic properties of the selected phase. The temperature, pressure, number of phases and composition of the phase will be used as basis for calculation.- Specified by:
initin interfaceSystemInterface- Parameters:
type- - The number can be 0, 1, 2 or 3. 0: Set feed composition. 1: Calculation of density, fugacities and Z-factor 2: 1 + calculation of enthalpy, entropy, Cp, Cv, and most other thermodynamic properties 3: 1+2 + Calculation of composition derivatives of fugacity coefficients.phaseNum- a int
-
init_x_y
-
initAnalytic
public void initAnalytic(int type) initAnalytic.
- Parameters:
type- a int. 0 to initialize and 1 to reset, 2 to calculate T and P derivatives, 3 to calculate all derivatives and 4 to calculate all derivatives numerically
-
initAnalytic
public void initAnalytic(int type, int phaseNum) initAnalytic.
- Parameters:
type- a intphaseNum- a int
-
initBeta
public final void initBeta()Calculate system beta values using Phase.getNumberOfMolesInPhase and getTotalNumberOfMoles.
- Specified by:
initBetain interfaceSystemInterface
-
initNumeric
-
initNumeric
public void initNumeric(int type) initNumeric.
- Parameters:
type- a int
-
initNumeric
public void initNumeric(int initType, int phasen) initNumeric.
- Parameters:
initType- a intphasen- a int
-
initPhysicalProperties
public void initPhysicalProperties()Initialize / calculate all physical properties for all phases and interfaces.- Specified by:
initPhysicalPropertiesin interfaceSystemInterface
-
initPhysicalProperties
Initialize / calculate a specified physical properties for all phases and interfaces.- Specified by:
initPhysicalPropertiesin interfaceSystemInterface- Parameters:
ppt- PhysicalPropertyType enum object.
-
initRefPhases
-
initTotalNumberOfMoles
public final void initTotalNumberOfMoles(double change) initTotalNumberOfMoles.
- Specified by:
initTotalNumberOfMolesin interfaceSystemInterface- Parameters:
change- a double
-
isChemicalSystem
public final boolean isChemicalSystem()isChemicalSystem.
- Specified by:
isChemicalSystemin interfaceSystemInterface- Returns:
- a boolean
-
isChemicalSystem
public final void isChemicalSystem(boolean temp) isChemicalSystem.
- Specified by:
isChemicalSystemin interfaceSystemInterface- Parameters:
temp- a boolean
-
isForcePhaseTypes
public boolean isForcePhaseTypes()isForcePhaseTypes.
- Specified by:
isForcePhaseTypesin interfaceSystemInterface- Returns:
- a boolean
-
isInitialized
public boolean isInitialized()isInitialized.
- Specified by:
isInitializedin interfaceSystemInterface- Returns:
- a boolean
-
isImplementedCompositionDeriativesofFugacity
public boolean isImplementedCompositionDeriativesofFugacity()isImplementedCompositionDeriativesofFugacity.
- Specified by:
isImplementedCompositionDeriativesofFugacityin interfaceSystemInterface- Returns:
- a boolean
-
isImplementedCompositionDeriativesofFugacity
public void isImplementedCompositionDeriativesofFugacity(boolean isImpl) isImplementedCompositionDeriativesofFugacity.
- Specified by:
isImplementedCompositionDeriativesofFugacityin interfaceSystemInterface- Parameters:
isImpl- a boolean
-
isImplementedPressureDeriativesofFugacity
public boolean isImplementedPressureDeriativesofFugacity()isImplementedPressureDeriativesofFugacity.
- Specified by:
isImplementedPressureDeriativesofFugacityin interfaceSystemInterface- Returns:
- a boolean
-
isImplementedTemperatureDeriativesofFugacity
public boolean isImplementedTemperatureDeriativesofFugacity()isImplementedTemperatureDeriativesofFugacity.
- Specified by:
isImplementedTemperatureDeriativesofFugacityin interfaceSystemInterface- Returns:
- a boolean
-
isMultiphaseWaxCheck
public boolean isMultiphaseWaxCheck()isMultiphaseWaxCheck.
- Specified by:
isMultiphaseWaxCheckin interfaceSystemInterface- Returns:
- a boolean
-
isNumericDerivatives
public boolean isNumericDerivatives()Getter for property numericDerivatives.
- Specified by:
isNumericDerivativesin interfaceSystemInterface- Returns:
- a boolean
-
isPhase
public boolean isPhase(int i) Returns true if phase exists and is not null.- Specified by:
isPhasein interfaceSystemInterface- Parameters:
i- Phase number- Returns:
- True if phase exists, false if not.
-
normalizeBeta
-
orderByDensity
public void orderByDensity()Order phases 0-3, as many as there are, by density such that getPhase(0) is lightest.Typically GAS, LIQUID for two-phase or GAS, OIL, AQUEOUS for multiphase .
- Specified by:
orderByDensityin interfaceSystemInterface
-
getEffectiveDensityForOrdering
private double getEffectiveDensityForOrdering(int phaseNum) Get effective density for phase ordering. Solid-like phases (SOLID, ASPHALTENE, WAX, HYDRATE) return a very high density to ensure they sort to the end.- Parameters:
phaseNum- phase number- Returns:
- effective density for ordering purposes
-
phaseToSystem
phaseToSystem.
- Specified by:
phaseToSystemin interfaceSystemInterface- Parameters:
phaseNumber- a int- Returns:
- a
SystemInterfaceobject
-
phaseToSystem
phaseToSystem.
- Specified by:
phaseToSystemin interfaceSystemInterface- Parameters:
phaseNumber1- a intphaseNumber2- a int- Returns:
- a
SystemInterfaceobject
-
phaseToSystem
phaseToSystem.
- Specified by:
phaseToSystemin interfaceSystemInterface- Parameters:
newPhase- aPhaseInterfaceobject- Returns:
- a
SystemInterfaceobject
-
phaseToSystem
phaseToSystem.
- Specified by:
phaseToSystemin interfaceSystemInterface- Parameters:
phaseName- aStringobject- Returns:
- a
SystemInterfaceobject
-
readFluid
readFluid.
- Specified by:
readFluidin interfaceSystemInterface- Parameters:
fluidName- aStringobject
-
readObject
readObject.
- Specified by:
readObjectin interfaceSystemInterface- Parameters:
ID- a int- Returns:
- a
SystemInterfaceobject
-
readObjectFromFile
readObjectFromFile.
- Specified by:
readObjectFromFilein interfaceSystemInterface- Parameters:
filePath- aStringobjectfluidName- aStringobject- Returns:
- a
SystemInterfaceobject
-
reInitPhaseInformation
public void reInitPhaseInformation()Re-initialize phasetype, beta and phaseindex arrays, same initialization which is used in constructor. -
reInitPhaseType
public void reInitPhaseType()reInitPhaseType.
- Specified by:
reInitPhaseTypein interfaceSystemInterface
-
removeComponent
removeComponent.
- Specified by:
removeComponentin interfaceSystemInterface- Parameters:
name- Name of the component to remove. See NeqSim database for component in the database.
-
removePhase
public void removePhase(int specPhase) removePhase.
- Specified by:
removePhasein interfaceSystemInterface- Parameters:
specPhase- a int
-
removePhaseKeepTotalComposition
public void removePhaseKeepTotalComposition(int specPhase) removePhaseKeepTotalComposition.
- Specified by:
removePhaseKeepTotalCompositionin interfaceSystemInterface- Parameters:
specPhase- a int
-
renameComponent
renameComponent.
- Specified by:
renameComponentin interfaceSystemInterface- Parameters:
oldName- aStringobjectnewName- aStringobject
-
replacePhase
replacePhase.
- Specified by:
replacePhasein interfaceSystemInterface- Parameters:
repPhase- a intnewPhase- aPhaseInterfaceobject
-
reset
public void reset()Set mole fractions of all components to 0.- Specified by:
resetin interfaceSystemInterface
-
reset_x_y
-
resetCharacterisation
public void resetCharacterisation()resetCharacterisation.
- Specified by:
resetCharacterisationin interfaceSystemInterface
-
resetDatabase
-
resetPhysicalProperties
public void resetPhysicalProperties()resetPhysicalProperties.
- Specified by:
resetPhysicalPropertiesin interfaceSystemInterface
-
save
Save System object to file.
- Specified by:
savein interfaceSystemInterface- Parameters:
name- File path to save to.
-
saveFluid
public void saveFluid(int ID) saveFluid.
- Specified by:
saveFluidin interfaceSystemInterface- Parameters:
ID- a int
-
saveFluid
saveFluid.
- Specified by:
saveFluidin interfaceSystemInterface- Parameters:
ID- a inttext- aStringobject
-
saveObject
saveObject.
- Specified by:
saveObjectin interfaceSystemInterface- Parameters:
ID- a inttext- aStringobject
-
saveObjectToFile
saveObjectToFile.
- Specified by:
saveObjectToFilein interfaceSystemInterface- Parameters:
filePath- aStringobjectfluidName- aStringobject
-
saveToDataBase
public void saveToDataBase()saveToDataBase.
- Specified by:
saveToDataBasein interfaceSystemInterface
-
setAllComponentsInPhase
public void setAllComponentsInPhase(int phaseNum) setAllComponentsInPhase.
- Specified by:
setAllComponentsInPhasein interfaceSystemInterface- Parameters:
phaseNum- a int
-
setAttractiveTerm
public void setAttractiveTerm(int i) setAttractiveTerm.
- Specified by:
setAttractiveTermin interfaceSystemInterface- Parameters:
i- a int
-
setBeta
public final void setBeta(double b) Setter for propertybeta.NB! Sets beta = b for first (heaviest) phase and 1-b for second (lightest) phase, not for multiphase systems.
- Specified by:
setBetain interfaceSystemInterface- Parameters:
b- Beta value to set.
-
setBeta
public final void setBeta(int phaseNum, double b) Setter for property
betafor a given phase.- Specified by:
setBetain interfaceSystemInterface- Parameters:
phaseNum- Phase number to set beta for.b- Beta value to set.
-
setBmixType
public void setBmixType(int bmixType) setBmixType.
- Specified by:
setBmixTypein interfaceSystemInterface- Parameters:
bmixType- a int
-
setComponentNames
setComponentNames.
- Specified by:
setComponentNamesin interfaceSystemInterface- Parameters:
componentNames- an array ofStringobjects
-
setComponentNameTag
setComponentNameTag.
- Specified by:
setComponentNameTagin interfaceSystemInterface- Parameters:
nameTag- aStringobject
-
setComponentNameTagOnNormalComponents
setComponentNameTagOnNormalComponents.
- Specified by:
setComponentNameTagOnNormalComponentsin interfaceSystemInterface- Parameters:
nameTag- aStringobject
-
setEmptyFluid
public void setEmptyFluid()Set the flow rate (moles) of all components to zero.- Specified by:
setEmptyFluidin interfaceSystemInterface
-
setFluidInfo
Setter for property info. .
- Specified by:
setFluidInfoin interfaceSystemInterface- Parameters:
info- aStringobject
-
setFluidName
setFluidName.
- Specified by:
setFluidNamein interfaceSystemInterface- Parameters:
fluidName- aStringobject
-
setForcePhaseTypes
public void setForcePhaseTypes(boolean forcePhaseTypes) setForcePhaseTypes.
- Specified by:
setForcePhaseTypesin interfaceSystemInterface- Parameters:
forcePhaseTypes- a boolean
-
setHeavyTBPfractionAsPlusFraction
public boolean setHeavyTBPfractionAsPlusFraction()setHeavyTBPfractionAsPlusFraction.
- Specified by:
setHeavyTBPfractionAsPlusFractionin interfaceSystemInterface- Returns:
- a boolean
-
setHydrateCheck
public void setHydrateCheck(boolean hydrateCheck) setHydrateCheck.
- Specified by:
setHydrateCheckin interfaceSystemInterface- Parameters:
hydrateCheck- a boolean
-
setImplementedCompositionDeriativesofFugacity
public void setImplementedCompositionDeriativesofFugacity(boolean implementedCompositionDeriativesofFugacity) setImplementedCompositionDeriativesofFugacity.
- Specified by:
setImplementedCompositionDeriativesofFugacityin interfaceSystemInterface- Parameters:
implementedCompositionDeriativesofFugacity- a boolean
-
setImplementedPressureDeriativesofFugacity
public void setImplementedPressureDeriativesofFugacity(boolean implementedPressureDeriativesofFugacity) setImplementedPressureDeriativesofFugacity.
- Specified by:
setImplementedPressureDeriativesofFugacityin interfaceSystemInterface- Parameters:
implementedPressureDeriativesofFugacity- a boolean
-
setImplementedTemperatureDeriativesofFugacity
public void setImplementedTemperatureDeriativesofFugacity(boolean implementedTemperatureDeriativesofFugacity) setImplementedTemperatureDeriativesofFugacity.
- Specified by:
setImplementedTemperatureDeriativesofFugacityin interfaceSystemInterface- Parameters:
implementedTemperatureDeriativesofFugacity- a boolean
-
setLastTBPasPlus
public boolean setLastTBPasPlus()setLastTBPasPlus.
- Returns:
- a boolean
-
setMaxNumberOfPhases
public void setMaxNumberOfPhases(int maxNumberOfPhases) Setter for property
maxNumberOfPhases.- Specified by:
setMaxNumberOfPhasesin interfaceSystemInterface- Parameters:
maxNumberOfPhases- The maximum allowed number of phases to use.
-
setMixingRule
method to set mixing rule used for the fluid.- Specified by:
setMixingRulein interfaceSystemInterface- Parameters:
mr- MixingRuleTypeInterface enum
-
setMixingRule
setMixingRule.
- Specified by:
setMixingRulein interfaceSystemInterface- Parameters:
typename- aStringobjectGEmodel- aStringobject
-
setMixingRuleGEmodel
-
setModel
setModel.
- Specified by:
setModelin interfaceSystemInterface- Parameters:
model- aStringobject- Returns:
- a
SystemInterfaceobject
-
setModelName
Setter for property modelName.- Parameters:
modelName- New value of property modelName.
-
setMolarComposition
public void setMolarComposition(double[] molefractions) This method is used to set the total molar composition of a fluid. The total flow rate will be kept constant. The input mole fractions will be normalized.
- Specified by:
setMolarCompositionin interfaceSystemInterface- Parameters:
molefractions- an array of type double
-
setMolarCompositionOfPlusFluid
public void setMolarCompositionOfPlusFluid(double[] molefractions) This method is used to set the total molar composition of a characterized fluid. The total flow rate will be kept constant. The input mole fractions will be normalized.- Specified by:
setMolarCompositionOfPlusFluidin interfaceSystemInterface- Parameters:
molefractions- is a double array taking the molar fraction of the components in the fluid. THe last fraction in the array is the total molefraction of the characterized components.
-
setMolarCompositionPlus
public void setMolarCompositionPlus(double[] molefractions) This method is used to set the total molar composition of a plus fluid. The total flow rate will be kept constant. The input mole fractions will be normalized.- Specified by:
setMolarCompositionPlusin interfaceSystemInterface- Parameters:
molefractions- is a double array taking the molar fraction of the components in the fluid. THe last molfraction is the mole fraction of the plus component
-
setMolarFlowRates
public void setMolarFlowRates(double[] moles) setMolarFlowRates.
- Specified by:
setMolarFlowRatesin interfaceSystemInterface- Parameters:
moles- an array of type double
-
setComponentFlowRates
setComponentFlowRates.
- Specified by:
setComponentFlowRatesin interfaceSystemInterface- Parameters:
componentFlowRates- an array of type doubleunit- aStringobject. Allowed units are: "mol/sec", "kmol/sec", "kmol/hr", "mol/hr", "kg/hr", "kg/sec", "kmol/day"
-
setMolarFractions
Wrapper function for addComponent to set fluid type and specify mole fractions.- Parameters:
molefractions- Component mole fraction of each component.type- Type of fluid. Supports "PlusFluid", "Plus" and default.
-
setMultiPhaseCheck
public void setMultiPhaseCheck(boolean multiPhaseCheck) method to specify if calculations should check for more than two fluid phases.- Specified by:
setMultiPhaseCheckin interfaceSystemInterface- Parameters:
multiPhaseCheck- Specify if the calculations should check for more than two fluid phases. Default is two fluid phases (gas and liquid). If set to true the program will check for gas and multiple liquid phases (eg. gas-oil-aqueous).
-
doEnhancedMultiPhaseCheck
public boolean doEnhancedMultiPhaseCheck()Check if enhanced stability analysis is enabled. When enabled, the flash calculation uses Wilson K-value initial guesses and tests both vapor-like and liquid-like trial phases for more robust detection of multiple liquid phases (e.g., liquid-liquid-vapor equilibria in sour gas or CO2 systems).- Specified by:
doEnhancedMultiPhaseCheckin interfaceSystemInterface- Returns:
- true if enhanced stability analysis is enabled
-
setEnhancedMultiPhaseCheck
public void setEnhancedMultiPhaseCheck(boolean enhancedMultiPhaseCheck) Enable or disable enhanced stability analysis for flash calculations. When enabled, uses Wilson K-value initial guesses and tests both vapor-like and liquid-like trial phases. This is more robust for detecting liquid-liquid equilibria in complex mixtures (e.g., sour gas, CO2 systems) but adds computational overhead. Default is false (disabled).- Specified by:
setEnhancedMultiPhaseCheckin interfaceSystemInterface- Parameters:
enhancedMultiPhaseCheck- true to enable enhanced multi-phase detection
-
setMultiphaseWaxCheck
public void setMultiphaseWaxCheck(boolean multiphaseWaxCheck) setMultiphaseWaxCheck.
- Specified by:
setMultiphaseWaxCheckin interfaceSystemInterface- Parameters:
multiphaseWaxCheck- a boolean
-
setNumberOfPhases
public void setNumberOfPhases(int number) Setter for property
numberOfPhases.- Specified by:
setNumberOfPhasesin interfaceSystemInterface- Parameters:
number- Number of phases to use.
-
setNumericDerivatives
public void setNumericDerivatives(boolean numericDerivatives) Setter for property numericDerivatives.
- Specified by:
setNumericDerivativesin interfaceSystemInterface- Parameters:
numericDerivatives- a boolean
-
setComponentCriticalParameters
public void setComponentCriticalParameters(int componentIndex, double tc, double pc, double acentricFactor) Set critical properties and acentric factor for a component in all phases.- Specified by:
setComponentCriticalParametersin interfaceSystemInterface- Parameters:
componentIndex- index of component to updatetc- critical temperature in Kpc- critical pressure in baraacentricFactor- component acentric factor
-
setComponentCriticalParameters
public void setComponentCriticalParameters(String componentName, double tc, double pc, double acentricFactor) Set critical properties and acentric factor for a component in all phases.- Specified by:
setComponentCriticalParametersin interfaceSystemInterface- Parameters:
componentName- name of component to updatetc- critical temperature in Kpc- critical pressure in baraacentricFactor- component acentric factor
-
setComponentVolumeCorrection
public void setComponentVolumeCorrection(int componentIndex, double volumeCorrection) Set Peneloux volume correction for a component in all phases.- Specified by:
setComponentVolumeCorrectionin interfaceSystemInterface- Parameters:
componentIndex- index of component to updatevolumeCorrection- Peneloux volume correction
-
setComponentVolumeCorrection
Set Peneloux volume correction for a component in all phases.- Specified by:
setComponentVolumeCorrectionin interfaceSystemInterface- Parameters:
componentName- name of component to updatevolumeCorrection- Peneloux volume correction
-
setBinaryInteractionParameter
public void setBinaryInteractionParameter(int component1, int component2, double value) Set binary interaction parameter for all phase mixing rules.- Specified by:
setBinaryInteractionParameterin interfaceSystemInterface- Parameters:
component1- index of first componentcomponent2- index of second componentvalue- kij value
-
setBinaryInteractionParameter
Set binary interaction parameter for all phase mixing rules.- Specified by:
setBinaryInteractionParameterin interfaceSystemInterface- Parameters:
component1- name of first componentcomponent2- name of second componentvalue- kij value
-
setPC
public final void setPC(double PC) Getter for property
PC.- Specified by:
setPCin interfaceSystemInterface- Parameters:
PC- Critical pressure to set in unit bara.
-
setPhase
Set
phaseArray[phaseIndex] = phase. NB! Transfers the pressure and temperature from the currently existing phase object at index numb- Specified by:
setPhasein interfaceSystemInterface- Parameters:
phase- aPhaseInterfaceobjectindex- Phase index to insert object at
-
setPhaseIndex
public final void setPhaseIndex(int index, int phaseIndex) Indexed setter for property
phaseIndex.this.phaseIndex[index] = phaseIndex;- Specified by:
setPhaseIndexin interfaceSystemInterface- Parameters:
index- a intphaseIndex- a int
-
setPhaseType
Change the phase type of a given phase.- Specified by:
setPhaseTypein interfaceSystemInterface- Parameters:
phaseToChange- the phase number of the phase to set phase typept- PhaseType to set
-
setPhaseType
Change the phase type of a given phase.- Specified by:
setPhaseTypein interfaceSystemInterface- Parameters:
phaseToChange- the phase number of the phase to set phase typephaseName- String to set
-
setAllPhaseType
Set phase type of all phases.- Specified by:
setAllPhaseTypein interfaceSystemInterface- Parameters:
pt- PhaseType to set phases as.
-
invertPhaseTypes
public void invertPhaseTypes()invertPhaseTypes.
- Specified by:
invertPhaseTypesin interfaceSystemInterface
-
setPressure
public final void setPressure(double newPressure) method to set the pressure of a fluid (same pressure for all phases).- Specified by:
setPressurein interfaceSystemInterface- Parameters:
newPressure- pressure in unit bara (absolute pressure in bar)
-
setPressure
method to set the pressure of a fluid (same pressure for all phases).- Specified by:
setPressurein interfaceSystemInterface- Parameters:
newPressure- in specified unitunit- unit can be bar, bara, barg or atm
-
setSolidPhaseCheck
public void setSolidPhaseCheck(boolean solidPhaseCheck) Setter for property solidPhaseCheck.
- Specified by:
setSolidPhaseCheckin interfaceSystemInterface- Parameters:
solidPhaseCheck- a boolean
-
setSolidPhaseCheck
setSolidPhaseCheck.
- Specified by:
setSolidPhaseCheckin interfaceSystemInterface- Parameters:
solidComponent- aStringobject
-
setStandard
Setter for property standard.
- Specified by:
setStandardin interfaceSystemInterface- Parameters:
standardName- aStringobject
-
setTC
public final void setTC(double TC) Getter for property
TC.- Specified by:
setTCin interfaceSystemInterface- Parameters:
TC- Critical temperature to set
-
setTemperature
public void setTemperature(double newTemperature) Set the temperature of a fluid (same temperature for all phases).
- Specified by:
setTemperaturein interfaceSystemInterface- Parameters:
newTemperature- Temperature in unit Kelvin
-
setTemperature
public final void setTemperature(double newTemperature, int phaseNum) Set the temperature of a single phase in the fluid.
- Specified by:
setTemperaturein interfaceSystemInterface- Parameters:
newTemperature- Temperature in unit KelvinphaseNum- a int
-
setTemperature
method to set the temperature of a fluid (same temperature for all phases).- Specified by:
setTemperaturein interfaceSystemInterface- Parameters:
newTemperature- Temperature in specified unitunit- unit can be C or K (Celsius or Kelvin)
-
setTotalFlowRate
setTotalFlowRate.
- Specified by:
setTotalFlowRatein interfaceSystemInterface- Parameters:
flowRate- a doubleflowunit- aStringobject. flow units are: kg/sec, kg/min, kg/hr m3/sec, m3/min, m3/hr, mole/sec, mole/min, mole/hr, Sm3/hr, Sm3/day, idSm3/hr, idSm3/day
-
setTotalNumberOfMoles
public void setTotalNumberOfMoles(double totalNumberOfMoles) Setter for property
totalNumberOfMoles.- Specified by:
setTotalNumberOfMolesin interfaceSystemInterface- Parameters:
totalNumberOfMoles- Total molar flow rate of fluid in unit mol/sec
-
setUseTVasIndependentVariables
public void setUseTVasIndependentVariables(boolean useTVasIndependentVariables) setUseTVasIndependentVariables.
- Specified by:
setUseTVasIndependentVariablesin interfaceSystemInterface- Parameters:
useTVasIndependentVariables- a boolean
-
tuneModel
tuneModel.
- Specified by:
tuneModelin interfaceSystemInterface- Parameters:
model- aStringobjectval- a doublephaseNum- a int
-
useTVasIndependentVariables
public boolean useTVasIndependentVariables()useTVasIndependentVariables.
- Returns:
- a boolean
-
useVolumeCorrection
public void useVolumeCorrection(boolean volcor) useVolumeCorrection.
- Specified by:
useVolumeCorrectionin interfaceSystemInterface- Parameters:
volcor- a boolean
-
write
-
write
-
getKvector
public double[] getKvector()getKvector - return vector of equilibrium constants.
- Specified by:
getKvectorin interfaceSystemInterface- Returns:
- an array of type double
-
getzvector
public double[] getzvector()getzvector - return vector of total molar composition.
- Specified by:
getzvectorin interfaceSystemInterface- Returns:
- an array of type double
-
toJson
toJson - return String with json inormation of fluid.
- Specified by:
toJsonin interfaceSystemInterface- Returns:
- a
Stringobject
-
toCompJson
toCompJson - return String with json inormation of pure component properties of fluid.
- Specified by:
toCompJsonin interfaceSystemInterface- Returns:
- a
Stringobject
-
setForceSinglePhase
setForceSinglePhase - force the fluid to be single phase of type as spesified by phasetype input.
- Specified by:
setForceSinglePhasein interfaceSystemInterface- Parameters:
phasetype- aPhaseTypeobject
-
setForceSinglePhase
setForceSinglePhase - force the fluid to be single phase of type as spesified by phasetype input. phasetypename can be GAS, OIL and AQUEOUS
- Specified by:
setForceSinglePhasein interfaceSystemInterface- Parameters:
phasetype- aStringobject
-
getComponentIndex
-
setMolarCompositionOfNamedComponents
Sets the molar composition of components whose names contain the specified definition. Sets the molar composition of components whose names contain the specified definition.- Specified by:
setMolarCompositionOfNamedComponentsin interfaceSystemInterface- Parameters:
nameDef- the definition to match component names againstmolarComposition- an array of molar compositions to set for the matching components
-
setMixingRuleParametersForComponent
-
equals
- Specified by:
equalsin interfaceSystemInterface- Overrides:
equalsin classObject
-