Interface SystemInterface
- All Superinterfaces:
Cloneable, Serializable
- All Known Implementing Classes:
SystemAmmoniaEos, SystemBnsEos, SystemBWRSEos, SystemCSPsrkEos, SystemDesmukhMather, SystemDuanSun, SystemElectrolyteCPA, SystemElectrolyteCPAMM, SystemElectrolyteCPAstatoil, SystemEos, SystemEOSCGEos, SystemFurstElectrolyteEos, SystemFurstElectrolyteEosMod2004, SystemGERG2004Eos, SystemGERG2008Eos, SystemGERGwaterEos, SystemGEWilson, SystemIdealGas, SystemKentEisenberg, SystemLeachmanEos, SystemNRTL, SystemPCSAFT, SystemPCSAFTa, SystemPitzer, SystemPrCPA, SystemPrDanesh, SystemPrEos, SystemPrEos1978, SystemPrEosDelft1998, SystemPrEosvolcor, SystemPrGassemEos, SystemPrMathiasCopeman, SystemPsrkEos, SystemRKEos, SystemSoreideWhitson, SystemSpanWagnerEos, SystemSrkCPA, SystemSrkCPAs, SystemSrkCPAstatoil, SystemSrkEos, SystemSrkEosvolcor, SystemSrkMathiasCopeman, SystemSrkPenelouxEos, SystemSrkSchwartzentruberEos, SystemSrkTwuCoonEos, SystemSrkTwuCoonParamEos, SystemSrkTwuCoonStatoilEos, SystemThermo, SystemTSTEos, SystemUMRCPAEoS, SystemUMRPRUEos, SystemUMRPRUMCEos, SystemUMRPRUMCEosNew, SystemUNIFAC, SystemUNIFACpsrk, SystemVegaEos, SystemWaterIF97
SystemInterface interface.
- Version:
- $Id: $Id
- Author:
- asmund
-
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.default voidaddComponent(String name) add a component to a fluid with no moles.voidaddComponent(String name, double moles) add a component to a fluid.voidaddComponent(String name, double moles, double TC, double PC, double acs) addComponent.voidaddComponent(String name, double moles, int phaseNumber) add a component to a fluid.voidaddComponent(String name, double value, String unitName) add a component to a fluid.voidaddComponent(String name, double value, String unitName, int phaseNumber) add a component to a fluid.voidaddComponent(ComponentInterface inComponent) add a component to a fluid.default voidaddComponents(String[] names) Add named components to a System.default voidaddComponents(String[] names, double[] moles) Add named components to a System with a number of moles.addFluid(SystemInterface addSystem) addFluid.addFluid(SystemInterface addSystem, int phaseNum) addFluid.static SystemInterfaceaddFluids(SystemInterface addFluid1, SystemInterface addFluid2) return two fluid added as a new fluid.voidaddGasToLiquid(double fraction) addGasToLiquid.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.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 name) Add to component names.booleanGetter for property allowPhaseShift.voidallowPhaseShift(boolean allowPhaseShift) Setter for property allowPhaseShift.voidautoSelectMixingRule.autoSelectModel.voidcalc_x_y()calc_x_y.voidcalc_x_y_nonorm.doublecalcHenrysConstant(String component) calcHenrysConstant.voidcalcInterfaceProperties.voidcalcKIJ(boolean ok) calcKIJ.default String[][]calcResultTable.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.static SystemInterfacecharacterizeToReference(SystemInterface source, SystemInterface reference) Characterize a fluid to match the pseudo component definition of a reference fluid.booleancheckStability.voidcheckStability(boolean val) checkStability.voidchemicalReactionInit.voidclearAll()clearAll.clone()clone.static SystemInterfacecombineReservoirFluids(int numberOfPseudoComponents, SystemInterface... fluids) Combine fluids and redistribute pseudo components to a requested number.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.default voiddisplay()display.voiddisplay.booleanCheck if enhanced stability analysis is enabled.booleanGetter for propertymultiPhaseCheck.booleandoSolidPhaseCheck.booleandoublegetBeta()Getter for propertybeta.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.default ComponentInterfacegetComponent(int i) Get component by index.default ComponentInterfacegetComponent(String name) Get component by name.default String[]Get normalized names of components in System.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).doublemethod to return specific heat capacity (Cp) in a specified unit.doublegetCv()method to return specific heat capacity (Cv).doublemethod to return specific heat capacity (Cp) in a specified unit.doubleGet density of a fluid note: without Peneloux volume correction.doublegetDensity(String unit) Get density of a fluid note: with Peneloux volume correction.doublegetdVdPtn.doublegetdVdTpn.getEmptySystemClone.doubleGet the total enthalpy of a fluid.doublegetEnthalpy(String unit) method to return total enthalpy in a specified unit.doublemethod to return total entropy of the fluid.doublegetEntropy(String unit) method to return total entropy of the fluid.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.default doublemethod to return heat capacity ratio calculated as Cp/(Cp-R*nMoles).getGasPhase.doublegetGibbsEnergy.doublegetHeatOfVaporization.doublegetHelmholtzEnergy.booleanGetter for property hydrateCheck.default doubleGet the mole fraction of the hydrate phase.default PhaseInterfaceGet the hydrate phase if it exists.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.getLiquidPhase.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.default doubleDeprecated.intgetNumberOfOilFractionComponents.intGetter for propertynumberOfPhases.getOilAssayCharacterisation.int[]getOilFractionIDs.double[]getOilFractionLiquidDensityAt25C.double[]getOilFractionMolecularMass.double[]getOilFractionNormalBoilingPoints.doublegetPC()Getter for propertyPC.getPhase(int i) Get phase number i from SystemInterface object.getPhase.getPhase.doublegetPhaseFraction(String phaseTypeName, String unit) method to return phase fraction of selected phase.intgetPhaseIndex(int i) 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.default intgetPhaseNumberOfPhase(String phaseTypeName) Get phase number of phase of specific type.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.getPhases.doublemethod to return pressure.doublegetPressure(int phaseNumber) method to return pressure of phase.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.doublegetTC()Get critical temperature.doubleGet temperature.doublegetTemperature(int phaseNumber) method to return temperature from a specific phase.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.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.default booleanhasComponent(String name) Verify if system has a component.default booleanhasComponent(String name, boolean normalized) Verify if system has a component.inthashCode()default booleanCheck if the system contains a hydrate phase.default booleanhasPhaseType(String phaseTypeName) Verify if system has a phase of a specific type.booleanVerify if system has a phase of a specific type.booleanGetter for property hasPlusFraction.default booleanhasSolidPhase.voidinit(int initType) method to calculate thermodynamic properties of the fluid.voidinit(int initType, int phaseNum) method to calculate thermodynamic properties of the selected phase.voidinit_x_y()init_x_y.voidinitBeta()Calculate system beta values using Phase.getNumberOfMolesInPhase and getTotalNumberOfMoles.voidinitNumeric.voidInitialize / calculate all physical properties for all phases and interfaces.default voidinitPhysicalProperties(String name) Initialize / calculate a specified physical properties for all phases and interfaces.voidInitialize / calculate a specified physical properties for all phases and interfaces.default voidCalculates thermodynamic and physical properties of a fluid using initThermoProperties() and initPhysicalProperties().voidinitRefPhases.default voidCalculates thermodynamic properties of a fluid using the init(2) method.voidinitTotalNumberOfMoles(double change) initTotalNumberOfMoles.voidinvertPhaseTypes.booleanisChemicalSystem.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.default voidPrints the fluid in a visually appealing way.voidreadFluid.readObject(int ID) readObject.readObjectFromFile(String filePath, String fluidName) readObjectFromFile.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.voidsetBeta(double b) Setter for propertybeta.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 phasetypename) 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.voidsetMaxNumberOfPhases(int maxNumberOfPhases) Setter for propertymaxNumberOfPhases.default voidsetMixingRule(int type) method to set mixing rule used for the fluid.default voidsetMixingRule(String typename) method to set the mixing rule for the fluid.voidsetMixingRule(String typename, String GEmodel) setMixingRule.voidmethod to set mixing rule used for the fluid.setModel.voidsetMolarComposition(double[] moles) 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.voidsetMultiPhaseCheck(boolean doMultiPhaseCheck) 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.voidsetPC(double PC) Getter for propertyPC.voidsetPhase(PhaseInterface phase, int index) SetphaseArray[phaseIndex] = phase.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.default voidsetPhysicalPropertyModel(int type) Set the physical property model type for each phase of the System.default voidSet the physical property model type for each phase of the System.voidsetPressure(double pres) method to set the pressure of a fluid (same pressure for all phases).voidsetPressure(double newPressure, String unit) method to set the pressure of a fluid (same pressure for all phases).voidsetSolidPhaseCheck(boolean test) Setter for property solidPhaseCheck.voidsetSolidPhaseCheck(String solidComponent) setSolidPhaseCheck.voidsetStandard(String standardName) Setter for property standard.voidsetTC(double TC) Getter for propertyTC.voidsetTemperature(double temp) Set the temperature of a fluid (same temperature for all phases).voidsetTemperature(double temp, int phaseNumber) Set the temperature of a single phase in the fluid.voidsetTemperature(double temp, 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.voiduseVolumeCorrection(boolean volcor) useVolumeCorrection.default ValidationResultValidate the thermodynamic system setup before use.voidwrite.
-
Method Details
-
addFluids
return two fluid added as a new fluid.- Parameters:
addFluid1- first fluid to addaddFluid2- second fluid o add- Returns:
- new fluid
-
combineReservoirFluids
static SystemInterface combineReservoirFluids(int numberOfPseudoComponents, SystemInterface... fluids) Combine fluids and redistribute pseudo components to a requested number.- Parameters:
numberOfPseudoComponents- target number of pseudo componentsfluids- fluids to combine- Returns:
- combined fluid
-
characterizeToReference
Characterize a fluid to match the pseudo component definition of a reference fluid.- Parameters:
source- fluid to characterizereference- fluid providing the pseudo component definition- Returns:
- characterized fluid with pseudo components aligned to the reference
-
addCapeOpenProperty
-
addCharacterized
-
addComponent
add a component to a fluid. If component already exists, the moles will be added to the existing component.- Parameters:
inComponent- Component object to add.
-
addComponent
void addComponent(int index, double moles) addComponent.
- Parameters:
index- Component number to addmoles- number of moles (per second) of the component to be added to the fluid
-
addComponent
void addComponent(int index, double moles, int phaseNumber) addComponent.
- 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 with no moles.- Parameters:
name- Name of the component to add. See NeqSim database for component in the database.
-
addComponent
add a component to a fluid. If component already exists, the moles will be added to the existing component.- Parameters:
name- 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.
- Parameters:
name- 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.- Parameters:
name- 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.- Parameters:
name- 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- Parameters:
name- Name of the component to add. See NeqSim database for component in the database.value- rate of the component to add to the fluidunitName- the unit of the flow rate (eg. mol/sec, kg/sec, etc.)phaseNumber- Number of the phase to add the component to
-
addComponents
Add named components to a System. Does nothing if components already exist in System.- Parameters:
names- Names of the components to be added. See NeqSim database for available components in the database.
-
addComponents
Add named components to a System with a number of moles. If component already exists, the moles will be added to the component.- Parameters:
names- Names of the components to be added. See NeqSim database for available components in the database.moles- Number of moles to add per component.
-
addFluid
addFluid.
- Parameters:
addSystem- aSystemInterfaceobject- Returns:
- SystemInterface
-
addFluid
addFluid.
- Parameters:
addSystem- aSystemInterfaceobjectphaseNum- phase number of phase to add fluid to- Returns:
- SystemInterface
-
addGasToLiquid
void addGasToLiquid(double fraction) addGasToLiquid.
- Parameters:
fraction- a double
-
addLiquidToGas
void addLiquidToGas(double fraction) addLiquidToGas.
- Parameters:
fraction- a double
-
addOilFractions
void addOilFractions(String[] charNames, double[] charFlowrate, double[] molarMass, double[] relativedensity, boolean lastIsPlusFraction) addCharacterized.
- 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
void addOilFractions(String[] charNames, double[] charFlowrate, double[] molarMass, double[] relativedensity, boolean lastIsPlusFraction, boolean lumpComponents, int numberOfPseudoComponents) addCharacterized.
- 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
void addPhase()Add phase to SystemInterface object. -
addPhaseFractionToPhase
-
addPhaseFractionToPhase
-
addPlusFraction
-
addSalt
-
addSolidComplexPhase
-
addTBPfraction
method to add true boiling point fraction.- 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
void addTBPfraction(String componentName, double numberOfMoles, double molarMass, double density, double criticalTemperature, double criticalPressure, double acentricFactor) addTBPfraction.
- Parameters:
componentName- aStringobjectnumberOfMoles- a doublemolarMass- a doubledensity- a doublecriticalTemperature- a doublecriticalPressure- a doubleacentricFactor- a double
-
addTBPfraction2
-
calculateDensityFromBoilingPoint
double calculateDensityFromBoilingPoint(double molarMass, double boilingPoint) Calculate density from boiling point and molar mass using TBP correlation.- Parameters:
molarMass- molar mass in kg/molboilingPoint- boiling point in K- Returns:
- density in g/cm3
-
addToComponentNames
Add to component names.- Parameters:
name- Component name to add
-
allowPhaseShift
boolean allowPhaseShift()Getter for property allowPhaseShift.
- Returns:
- a boolean
-
allowPhaseShift
void allowPhaseShift(boolean allowPhaseShift) Setter for property allowPhaseShift.
- Parameters:
allowPhaseShift- a boolean
-
autoSelectMixingRule
void autoSelectMixingRule()autoSelectMixingRule.
-
autoSelectModel
-
calc_x_y
void calc_x_y()calc_x_y.
-
calc_x_y_nonorm
void calc_x_y_nonorm()calc_x_y_nonorm.
-
calcHenrysConstant
-
calcInterfaceProperties
void calcInterfaceProperties()calcInterfaceProperties.
-
calcKIJ
void calcKIJ(boolean ok) calcKIJ.
- Parameters:
ok- a boolean
-
calcResultTable
-
changeComponentName
-
checkStability
boolean checkStability()checkStability.
- Returns:
- a boolean
-
checkStability
void checkStability(boolean val) checkStability.
- Parameters:
val- a boolean
-
chemicalReactionInit
void chemicalReactionInit()chemicalReactionInit.
-
clearAll
void clearAll()clearAll.
-
clone
-
createDatabase
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.
- 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
-
deleteFluidPhase
void deleteFluidPhase(int phaseNum) deleteFluidPhase.
- Parameters:
phaseNum- a int
-
display
default void display()display.
-
display
-
doMultiPhaseCheck
boolean doMultiPhaseCheck()Getter for property
multiPhaseCheck.- Returns:
- a boolean
-
doEnhancedMultiPhaseCheck
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).- Returns:
- true if enhanced stability analysis is enabled
-
doSolidPhaseCheck
boolean doSolidPhaseCheck()doSolidPhaseCheck.
- Returns:
- a boolean
-
equals
-
getBeta
double getBeta()Getter for property
beta. Gets value for heaviest phase.- Returns:
- Beta value
-
getBeta
double getBeta(int phaseNum) Getter for property
betafor a specific phase.- Parameters:
phaseNum- Number of phase to get beta for.- Returns:
- Beta value for
-
getCapeOpenProperties10
-
getCapeOpenProperties11
-
getCASNumbers
-
getCharacterization
Characterise getCharacterization()Getter for property characterization.
- Returns:
- a
Characteriseobject
-
getChemicalReactionOperations
ChemicalReactionOperations getChemicalReactionOperations()getChemicalReactionOperations.
- Returns:
- a
ChemicalReactionOperationsobject
-
getCompFormulaes
-
getCompIDs
-
getCompNames
String[] getCompNames()Get normalized names of all components in System.- Returns:
- Array of names of components in System.
-
getComponent
Get component by index.
- Parameters:
i- Component index- Returns:
- a
ComponentInterfaceobject
-
getComponent
Get component by name.
- Parameters:
name- Name of component- Returns:
- a
ComponentInterfaceobject
-
getComponentNames
Get normalized names of components in System.- Returns:
- Array of names of components in system.
-
getComponentNameTag
-
getCorrectedVolume
double getCorrectedVolume()method to return fluid volume with Peneloux volume correction.- Returns:
- volume in unit m3
-
getCorrectedVolumeFraction
double getCorrectedVolumeFraction(int phaseNumber) method to return the volume fraction of a phase note: with Peneloux volume correction.- Parameters:
phaseNumber- number of the phase to get volume fraction for- Returns:
- volume fraction
-
getCp
double getCp()method to return specific heat capacity (Cp).- Returns:
- Cp in unit J/K
-
getCp
method to return specific heat capacity (Cp) in a specified unit.- Parameters:
unit- Supported units are J/K, J/molK, J/kgK and kJ/kgK- Returns:
- Cp in specified unit
-
getCv
double getCv()method to return specific heat capacity (Cv).- Returns:
- Cv in unit J/K
-
getCv
method to return specific heat capacity (Cp) in a specified unit.- Parameters:
unit- Supported units are J/K, J/molK, J/kgK and kJ/kgK- Returns:
- Cp in specified unit
-
getDensity
double getDensity()Get density of a fluid note: without Peneloux volume correction.- Returns:
- density with unit kg/m3
-
getDensity
Get density of a fluid note: with Peneloux volume correction.- Parameters:
unit- Supported units are kg/m3, mol/m3- Returns:
- density in specified unit
-
getdVdPtn
double getdVdPtn()getdVdPtn.
- Returns:
- a double
-
getdVdTpn
double getdVdTpn()getdVdTpn.
- Returns:
- a double
-
getEmptySystemClone
-
getEnthalpy
double getEnthalpy()Get the total enthalpy of a fluid.- Returns:
- molar mass in unit J (Joule)
-
getEnthalpy
method to return total enthalpy in a specified unit.- Parameters:
unit- Supported units are 'J', 'J/mol', 'kJ/kmol', 'J/kg' and 'kJ/kg'- Returns:
- enthalpy in specified unit
-
getEntropy
double getEntropy()method to return total entropy of the fluid.- Returns:
- entropy in unit J/K (Joule/Kelvin)
-
getEntropy
method to return total entropy of the fluid.- Parameters:
unit- unit supported units are J/K, J/molK, J/kgK and kJ/kgK- Returns:
- entropy in specified unit
-
getExergy
double getExergy(double temperatureOfSurroundings) method to return exergy defined as (h1-T0*s1) in a unit Joule.- Parameters:
temperatureOfSurroundings- in Kelvin- Returns:
- a double
-
getExergy
-
getFlowRate
method to return flow rate of fluid.- 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
-
getFluidName
-
getGamma
double getGamma()method to return heat capacity ratio/adiabatic index/Poisson constant.- Returns:
- kappa
-
getGamma2
default double getGamma2()method to return heat capacity ratio calculated as Cp/(Cp-R*nMoles).- Returns:
- kappa
-
getGasPhase
-
getGibbsEnergy
double getGibbsEnergy()getGibbsEnergy.
- Returns:
- a double
-
getHeatOfVaporization
double getHeatOfVaporization()getHeatOfVaporization.
- Returns:
- a double
-
getHelmholtzEnergy
double getHelmholtzEnergy()getHelmholtzEnergy.
- Returns:
- a double
-
getHydrateCheck
boolean getHydrateCheck()Getter for property hydrateCheck.
- Returns:
- a boolean
-
getIdealLiquidDensity
-
getInterfacialTension
double getInterfacialTension(int phase1, int phase2) method to return interfacial tension between two phases.- Parameters:
phase1- phase number of phase1phase2- phase number of phase2- Returns:
- interfacial tension with unit N/m
-
getInterfacialTension
-
getInterfacialTension
method to return interfacial tension between two phases.- 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
double getInternalEnergy()method to return internal energy (U) in unit J.- Returns:
- internal energy in unit Joule (J)
-
getInternalEnergy
method to return internal energy (U) in a specified unit.- Parameters:
unit- Supported units are 'J', 'J/mol', 'J/kg' and 'kJ/kg'- Returns:
- enthalpy in specified unit
-
getInterphaseProperties
InterphasePropertiesInterface getInterphaseProperties()getInterphaseProperties.
- Returns:
- a
InterphasePropertiesInterfaceobject
-
getJouleThomsonCoefficient
double getJouleThomsonCoefficient()Get the Joule Thomson Coefficient of a system. Based on a phase mole fraction basis average- Returns:
- Joule Thomson coefficient in K/bar
-
getJouleThomsonCoefficient
Get the Joule Thomson Coefficient of a system. Based on a phase mole fraction basis average.- Parameters:
unit- Supported units are K/bar, C/bar- Returns:
- Joule Thomson coefficient in specified unit
-
getKappa
double getKappa()method to return heat capacity ratio/adiabatic index/Poisson constant.- Returns:
- kappa
-
getKinematicViscosity
double getKinematicViscosity()getKinematicViscosity.
- Returns:
- a double
-
getKinematicViscosity
method to return kinematic viscosity in a specified unit.- Parameters:
unit- Supported units are m2/sec- Returns:
- kinematic viscosity in specified unit
-
getLiquidPhase
-
getLiquidVolume
double getLiquidVolume()getLiquidVolume.
- Returns:
- a double
-
getLowestGibbsEnergyPhase
PhaseInterface getLowestGibbsEnergyPhase()getLowestGibbsEnergyPhase.
- Returns:
- a
PhaseInterfaceobject
-
getMass
method to return mass of fluid.- Parameters:
unit- Supported units are kg, gr, tons- Returns:
- mass in specified unit
-
getMaxNumberOfPhases
int getMaxNumberOfPhases()Getter for property
maxNumberOfPhases.- Returns:
- Gets the maximum allowed number of phases to use.
-
getMixingRule
-
getMixingRuleName
-
getModelName
-
getMolarComposition
double[] getMolarComposition()Returns the overall mole composition vector in unit mole fraction.
- Returns:
- an array of type double
-
getWeightBasedComposition
double[] getWeightBasedComposition()Returns the overall composition vector in unit mass fraction.
- Returns:
- an array of type double
-
getMolarMass
double getMolarMass()Get molar mass of system.- Returns:
- molar mass in unit kg/mol
-
getMolarMass
Get molar mass of a fluid phase.- Parameters:
unit- Supported units are kg/mol, gr/mol- Returns:
- molar mass in specified unit
-
getMolarRate
double[] getMolarRate()Get the total molar flow rate of individual components in a fluid.- Returns:
- molar flow of individual components in unit mol/sec
-
getMolarVolume
double getMolarVolume()method to return molar volume of the fluid note: without Peneloux volume correction.- Returns:
- molar volume volume in unit m3/mol*1e5
-
getMolarVolume
method to return molar volume of the fluid: eventual volume correction included.- Parameters:
unit- Supported units are m3/mol, litre/mol- Returns:
- molar volume volume in unit
-
getMolecularWeights
double[] getMolecularWeights()getMolecularWeights.
- Returns:
- an array of type double
-
getMoleFraction
double getMoleFraction(int phaseNumber) getMoleFraction.
- Parameters:
phaseNumber- a int- Returns:
- a double
-
getMoleFractionsSum
double getMoleFractionsSum()Get sum of mole fractions for all components. NB! init(0) must be called first.
- Returns:
- a double
-
getNormalBoilingPointTemperatures
double[] getNormalBoilingPointTemperatures()getNormalBoilingPointTemperatures.
- Returns:
- an array of type double
-
getNumberOfComponents
int getNumberOfComponents()Get number of components added to System.
- Returns:
- the number of components in System.
-
getNumberOfMoles
Deprecated.Replaced bygetTotalNumberOfMoles()Getter for property
numberOfMoles.- Returns:
- a double
-
getNumberOfOilFractionComponents
int getNumberOfOilFractionComponents()getNumberOfOilFractionComponents.
- Returns:
- a int
-
getNumberOfPhases
int getNumberOfPhases()Getter for property
numberOfPhases.- Returns:
- Number of phases used
-
getOilFractionIDs
int[] getOilFractionIDs()getOilFractionIDs.
- Returns:
- an array of
objects
invalid reference
int
-
getOilFractionLiquidDensityAt25C
double[] getOilFractionLiquidDensityAt25C()getOilFractionLiquidDensityAt25C.
- Returns:
- an array of type double
-
getOilFractionMolecularMass
double[] getOilFractionMolecularMass()getOilFractionMolecularMass.
- Returns:
- an array of type double
-
getOilFractionNormalBoilingPoints
double[] getOilFractionNormalBoilingPoints()getOilFractionNormalBoilingPoints.
- Returns:
- an array of type double
-
getPC
double getPC()Getter for property
PC.- Returns:
- Critical pressure in unit bara.
-
getPhase
Get phase number i from SystemInterface object.- Parameters:
i- Phase number- Returns:
- a
PhaseInterfaceobject
-
getPhase
getPhase.
- Parameters:
pt- aPhaseTypeobject- Returns:
- a
PhaseInterfaceobject
-
getPhase
getPhase.
- Parameters:
phaseTypeName- aStringobject- Returns:
- a
PhaseInterfaceobject
-
getPhaseFraction
-
getPhaseIndex
int getPhaseIndex(int i) Indexed getter for property phaseIndex.
- Parameters:
i- Phase number- Returns:
- PhaseIndex to index into phaseArray.
-
getPhaseIndex
Get property phaseIndex corresponding to a phase.- Parameters:
phase- Phase object to search for.- Returns:
- PhaseIndex to index into phaseArray.
-
getPhaseIndex
-
getPhaseNumberOfPhase
Get phase number of phase of specific type.
- Parameters:
pt- Phase type to look for.- Returns:
- Phase number
-
getPhaseNumberOfPhase
Get phase number of phase of specific type.
- Parameters:
phaseTypeName- Name of 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.- Parameters:
phaseTypeName- the phase type to be returned (gas, oil, aqueous, wax, hydrate are supported)- Returns:
- a
PhaseInterfaceobject
-
getPhases
-
getPressure
double getPressure()method to return pressure.- Returns:
- pressure in unit bara
-
getPressure
double getPressure(int phaseNumber) method to return pressure of phase.
- Parameters:
phaseNumber- Number of the phase to get pressure for- Returns:
- pressure in unit bara
-
getPressure
method to return pressure in a specified unit.- Parameters:
unit- Supported units are bara, barg, Pa, MPa, psi, psia, psig- Returns:
- pressure in specified unit
-
getProperties
-
getProperty
-
getProperty
-
getProperty
-
getResultTable
-
getSoundSpeed
double getSoundSpeed()Get the speed of sound of a system. The sound speed is implemented based on a molar average over the phases- 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- Parameters:
unit- Supported units are m/s, km/h- Returns:
- speed of sound in m/s
-
getStandard
-
getStandard
Getter for property standard.
- Parameters:
standardName- aStringobject- Returns:
- a
StandardInterfaceobject
-
getTC
double getTC()Get critical temperature.
- Returns:
- Critical temperature in unit Kelvin
-
getTemperature
double getTemperature()Get temperature.- Returns:
- temperature in unit Kelvin
-
getTemperature
double getTemperature(int phaseNumber) method to return temperature from a specific phase.
- Parameters:
phaseNumber- phase to get temperature of- Returns:
- temperature in unit Kelvin
-
getTemperature
method to return temperature in a specified unit.- Parameters:
unit- Supported units are K, C, R- Returns:
- temperature in specified unit
-
getThermalConductivity
double getThermalConductivity()method to return conductivity of a fluid.- Returns:
- conductivity in unit W/mK
-
getThermalConductivity
method to return thermal conductivity in a specified unit.- Parameters:
unit- Supported units are W/mK, W/cmK- Returns:
- conductivity in specified unit
-
getTotalNumberOfMoles
double getTotalNumberOfMoles()Getter for propertytotalNumberOfMoles.- Returns:
- Total molar flow rate of fluid in unit mol/sec
-
getViscosity
double getViscosity()method to return viscosity of a fluid.- Returns:
- viscosity in unit kg/msec
-
getViscosity
method to return viscosity in a specified unit.- Parameters:
unit- Supported units are kg/msec, cP (centipoise), Pas (Pascal*second)- Returns:
- viscosity in specified unit
-
getVolume
double getVolume()method to return fluid volume.- Returns:
- volume in unit m3*1e5
-
getVolume
method to return fluid volume.- Parameters:
unit- Supported units are m3, litre, m3/kg, m3/mol- Returns:
- volume in specified unit
-
getVolumeFraction
double getVolumeFraction(int phaseNumber) method to return the volume fraction of a phase note: without Peneloux volume correction.- Parameters:
phaseNumber- number of the phase to get volume fraction for- Returns:
- volume fraction
-
getOilAssayCharacterisation
OilAssayCharacterisation getOilAssayCharacterisation()getOilAssayCharacterisation.
- Returns:
- a
OilAssayCharacterisationobject
-
getWaxCharacterisation
-
getWaxModel
-
getWtFraction
double getWtFraction(int phaseNumber) getWtFraction.
- Parameters:
phaseNumber- a int- Returns:
- a double
-
getZ
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.- Returns:
- compressibility factor Z
-
getZvolcorr
double getZvolcorr()method to return Z volume corrected gas compressibility.- Returns:
- double Z volume corrected
-
hasComponent
Verify if system has a component.- Parameters:
name- Name of component to look for. NB! Converts name to normalized name.- Returns:
- True if component is found.
-
hasComponent
Verify if system has a component.- Parameters:
name- Name of component to look for.normalized- Set true to convert input name to normalized component name.- Returns:
- True if component is found.
-
hashCode
-
hasPhaseType
Verify if system has a phase of a specific type.- Parameters:
pt- PhaseType to look for- Returns:
- True if system contains a phase of requested type
-
hasPhaseType
Verify if system has a phase of a specific type.- Parameters:
phaseTypeName- PhaseType to look for- Returns:
- True if system contains a phase of requested type
-
hasPlusFraction
boolean hasPlusFraction()Getter for property hasPlusFraction.
- Returns:
- a boolean
-
hasSolidPhase
default boolean hasSolidPhase()hasSolidPhase.
- Returns:
- True if system contains a solid phase
-
hasHydratePhase
default boolean hasHydratePhase()Check if the system contains a hydrate phase.- Returns:
- True if system contains a hydrate phase
-
getHydrateFraction
default double getHydrateFraction()Get the mole fraction of the hydrate phase.Returns the beta value (phase fraction) for the hydrate phase if it exists, otherwise returns 0.0.
- Returns:
- the hydrate phase mole fraction, or 0.0 if no hydrate phase exists
-
getHydratePhase
Get the hydrate phase if it exists.- Returns:
- the hydrate phase, or null if no hydrate phase exists
-
init
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.- 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
void init(int initType, 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.- Parameters:
initType- - 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
void init_x_y()init_x_y.
-
initBeta
void initBeta()Calculate system beta values using Phase.getNumberOfMolesInPhase and getTotalNumberOfMoles.
-
initNumeric
void initNumeric()initNumeric. -
initPhysicalProperties
void initPhysicalProperties()Initialize / calculate all physical properties for all phases and interfaces. -
initPhysicalProperties
Initialize / calculate a specified physical properties for all phases and interfaces.- Parameters:
ppt- PhysicalPropertyType enum object.
-
initPhysicalProperties
Initialize / calculate a specified physical properties for all phases and interfaces.- Parameters:
name- Name of physical property.
-
initProperties
default void initProperties()Calculates thermodynamic and physical properties of a fluid using initThermoProperties() and initPhysicalProperties(). -
initRefPhases
void initRefPhases()initRefPhases.
-
initThermoProperties
default void initThermoProperties()Calculates thermodynamic properties of a fluid using the init(2) method. -
initTotalNumberOfMoles
void initTotalNumberOfMoles(double change) initTotalNumberOfMoles.
- Parameters:
change- a double
-
invertPhaseTypes
void invertPhaseTypes()invertPhaseTypes.
-
isChemicalSystem
boolean isChemicalSystem()isChemicalSystem.
- Returns:
- a boolean
-
isChemicalSystem
void isChemicalSystem(boolean temp) isChemicalSystem.
- Parameters:
temp- a boolean
-
isForcePhaseTypes
boolean isForcePhaseTypes()isForcePhaseTypes.
- Returns:
- a boolean
-
isImplementedCompositionDeriativesofFugacity
boolean isImplementedCompositionDeriativesofFugacity()isImplementedCompositionDeriativesofFugacity.
- Returns:
- a boolean
-
isImplementedCompositionDeriativesofFugacity
void isImplementedCompositionDeriativesofFugacity(boolean isImpl) isImplementedCompositionDeriativesofFugacity.
- Parameters:
isImpl- a boolean
-
isImplementedPressureDeriativesofFugacity
boolean isImplementedPressureDeriativesofFugacity()isImplementedPressureDeriativesofFugacity.
- Returns:
- a boolean
-
isImplementedTemperatureDeriativesofFugacity
boolean isImplementedTemperatureDeriativesofFugacity()isImplementedTemperatureDeriativesofFugacity.
- Returns:
- a boolean
-
isMultiphaseWaxCheck
boolean isMultiphaseWaxCheck()isMultiphaseWaxCheck.
- Returns:
- a boolean
-
isNumericDerivatives
boolean isNumericDerivatives()Getter for property numericDerivatives.
- Returns:
- a boolean
-
isPhase
boolean isPhase(int i) Returns true if phase exists and is not null.- Parameters:
i- Phase number- Returns:
- True if phase exists, false if not.
-
normalizeBeta
void normalizeBeta()normalizeBeta.
-
orderByDensity
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 .
-
phaseToSystem
phaseToSystem.
- Parameters:
phaseNumber- a int- Returns:
- a
SystemInterfaceobject
-
phaseToSystem
phaseToSystem.
- Parameters:
phaseNumber1- a intphaseNumber2- a int- Returns:
- a
SystemInterfaceobject
-
phaseToSystem
phaseToSystem.
- Parameters:
newPhase- aPhaseInterfaceobject- Returns:
- a
SystemInterfaceobject
-
phaseToSystem
phaseToSystem.
- Parameters:
phaseName- aStringobject- Returns:
- a
SystemInterfaceobject
-
prettyPrint
default void prettyPrint()Prints the fluid in a visually appealing way. -
readFluid
-
readObject
readObject.
- Parameters:
ID- a int- Returns:
- a
SystemInterfaceobject
-
readObjectFromFile
readObjectFromFile.
- Parameters:
filePath- aStringobjectfluidName- aStringobject- Returns:
- a
SystemInterfaceobject
-
reInitPhaseType
void reInitPhaseType()reInitPhaseType.
-
removeComponent
removeComponent.
- Parameters:
name- Name of the component to remove. See NeqSim database for component in the database.
-
removePhase
void removePhase(int specPhase) removePhase.
- Parameters:
specPhase- a int
-
removePhaseKeepTotalComposition
void removePhaseKeepTotalComposition(int specPhase) removePhaseKeepTotalComposition.
- Parameters:
specPhase- a int
-
renameComponent
-
replacePhase
replacePhase.
- Parameters:
repPhase- a intnewPhase- aPhaseInterfaceobject
-
reset
void reset()Set mole fractions of all components to 0. -
reset_x_y
void reset_x_y()reset_x_y.
-
resetCharacterisation
void resetCharacterisation()resetCharacterisation.
-
resetDatabase
void resetDatabase()resetDatabase.
-
resetPhysicalProperties
void resetPhysicalProperties()resetPhysicalProperties.
-
save
-
saveFluid
void saveFluid(int id) saveFluid.
- Parameters:
id- a int
-
saveFluid
-
saveObject
-
saveObjectToFile
-
saveToDataBase
void saveToDataBase()saveToDataBase.
-
setAllComponentsInPhase
void setAllComponentsInPhase(int phaseNum) setAllComponentsInPhase.
- Parameters:
phaseNum- a int
-
setAllPhaseType
Set phase type of all phases.- Parameters:
pt- PhaseType to set phases as.
-
setAttractiveTerm
void setAttractiveTerm(int i) setAttractiveTerm.
- Parameters:
i- a int
-
setBeta
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.
- Parameters:
b- Beta value to set.
-
setBeta
void setBeta(int phaseNum, double b) Setter for property
betafor a given phase.- Parameters:
phaseNum- Phase number to set beta for.b- Beta value to set.
-
setBmixType
void setBmixType(int bmixType) setBmixType.
- Parameters:
bmixType- a int
-
setComponentNames
-
setComponentNameTag
-
setComponentNameTagOnNormalComponents
-
setEmptyFluid
void setEmptyFluid()Set the flow rate (moles) of all components to zero. -
setFluidInfo
-
setFluidName
-
setForcePhaseTypes
void setForcePhaseTypes(boolean forcePhaseTypes) setForcePhaseTypes.
- Parameters:
forcePhaseTypes- a boolean
-
setHeavyTBPfractionAsPlusFraction
boolean setHeavyTBPfractionAsPlusFraction()setHeavyTBPfractionAsPlusFraction.
- Returns:
- a boolean
-
setHydrateCheck
void setHydrateCheck(boolean hydrateCheck) setHydrateCheck.
- Parameters:
hydrateCheck- a boolean
-
setImplementedCompositionDeriativesofFugacity
void setImplementedCompositionDeriativesofFugacity(boolean implementedCompositionDeriativesofFugacity) setImplementedCompositionDeriativesofFugacity.
- Parameters:
implementedCompositionDeriativesofFugacity- a boolean
-
setImplementedPressureDeriativesofFugacity
void setImplementedPressureDeriativesofFugacity(boolean implementedPressureDeriativesofFugacity) setImplementedPressureDeriativesofFugacity.
- Parameters:
implementedPressureDeriativesofFugacity- a boolean
-
setImplementedTemperatureDeriativesofFugacity
void setImplementedTemperatureDeriativesofFugacity(boolean implementedTemperatureDeriativesofFugacity) setImplementedTemperatureDeriativesofFugacity.
- Parameters:
implementedTemperatureDeriativesofFugacity- a boolean
-
setMaxNumberOfPhases
void setMaxNumberOfPhases(int maxNumberOfPhases) Setter for property
maxNumberOfPhases.- Parameters:
maxNumberOfPhases- The maximum allowed number of phases to use.
-
setMixingRule
method to set mixing rule used for the fluid.- Parameters:
emrt- MixingRuleTypeInterface enum
-
setMixingRule
default void setMixingRule(int type) method to set mixing rule used for the fluid.- Parameters:
type- The type of mixing rule to be used for the fluid. 1 - classic mixing rule with all kij set to zero 2 -classic mixing rule with kij from NeqSim database 3- classic mixing rule with temperature dependent kij 4- Huron Vidal mixing rule with parameters from NeqSim database 7 -classic mixing rule with kij of CPA from NeqSim Database 9 -classicmixing rule with temperature dependent kij of CPA from NeqSim database 10-classic mixing rule with temperature and composition dependent kij of CPA from NeqSim database
-
setMixingRule
-
setMixingRule
-
setModel
setModel.
- Parameters:
model- aStringobject- Returns:
- a
SystemInterfaceobject
-
setMolarComposition
void setMolarComposition(double[] moles) 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.
- Parameters:
moles- an array of type double
-
setMolarCompositionOfPlusFluid
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.- 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
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.- 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
void setMolarFlowRates(double[] moles) setMolarFlowRates.
- Parameters:
moles- an array of type double
-
setComponentFlowRates
-
setMultiPhaseCheck
void setMultiPhaseCheck(boolean doMultiPhaseCheck) method to specify if calculations should check for more than two fluid phases.- Parameters:
doMultiPhaseCheck- 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).
-
setEnhancedMultiPhaseCheck
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).- Parameters:
enhancedMultiPhaseCheck- true to enable enhanced multi-phase detection
-
setMultiphaseWaxCheck
void setMultiphaseWaxCheck(boolean multiphaseWaxCheck) setMultiphaseWaxCheck.
- Parameters:
multiphaseWaxCheck- a boolean
-
setNumberOfPhases
void setNumberOfPhases(int number) Setter for property
numberOfPhases.- Parameters:
number- Number of phases to use.
-
setNumericDerivatives
void setNumericDerivatives(boolean numericDerivatives) Setter for property numericDerivatives.
- Parameters:
numericDerivatives- a boolean
-
setPC
void setPC(double PC) Getter for property
PC.- Parameters:
PC- Critical pressure to set in unit bara.
-
setComponentCriticalParameters
void setComponentCriticalParameters(int componentIndex, double tc, double pc, double acentricFactor) Set critical properties and acentric factor for a component in all phases.- Parameters:
componentIndex- index of component to updatetc- critical temperature in Kpc- critical pressure in baraacentricFactor- component acentric factor
-
setComponentCriticalParameters
void setComponentCriticalParameters(String componentName, double tc, double pc, double acentricFactor) Set critical properties and acentric factor for a component in all phases.- Parameters:
componentName- name of component to updatetc- critical temperature in Kpc- critical pressure in baraacentricFactor- component acentric factor
-
setComponentVolumeCorrection
void setComponentVolumeCorrection(int componentIndex, double volumeCorrection) Set Peneloux volume correction for a component in all phases.- Parameters:
componentIndex- index of component to updatevolumeCorrection- Peneloux volume correction
-
setComponentVolumeCorrection
Set Peneloux volume correction for a component in all phases.- Parameters:
componentName- name of component to updatevolumeCorrection- Peneloux volume correction
-
setBinaryInteractionParameter
void setBinaryInteractionParameter(int component1, int component2, double value) Set binary interaction parameter for all phase mixing rules.- Parameters:
component1- index of first componentcomponent2- index of second componentvalue- kij value
-
setBinaryInteractionParameter
-
setPhase
Set
phaseArray[phaseIndex] = phase. NB! Transfers the pressure and temperature from the currently existing phase object at index numb- Parameters:
phase- aPhaseInterfaceobjectindex- Phase index to insert object at
-
setPhaseIndex
void setPhaseIndex(int index, int phaseIndex) Indexed setter for property
phaseIndex.this.phaseIndex[index] = phaseIndex;- Parameters:
index- a intphaseIndex- a int
-
setPhaseType
Change the phase type of a given phase.- Parameters:
phaseToChange- the phase number of the phase to set phase typept- PhaseType to set
-
setPhaseType
Change the phase type of a given phase.- Parameters:
phaseToChange- the phase number of the phase to set phase typephaseName- String to set
-
setPhysicalPropertyModel
Set the physical property model type for each phase of the System.- Parameters:
ppm- PhysicalPropertyModel enum object
-
setPhysicalPropertyModel
default void setPhysicalPropertyModel(int type) Set the physical property model type for each phase of the System.- Parameters:
type- 0 Default, 1 Water, 2 Glycol, 3 Amine, 4 CO2Water, 6 Basic
-
setPressure
void setPressure(double pres) method to set the pressure of a fluid (same pressure for all phases).- Parameters:
pres- pressure in unit bara (absolute pressure in bar)
-
setPressure
method to set the pressure of a fluid (same pressure for all phases).- Parameters:
newPressure- in specified unitunit- unit can be bar, bara, barg or atm
-
setSolidPhaseCheck
void setSolidPhaseCheck(boolean test) Setter for property solidPhaseCheck.
- Parameters:
test- a boolean
-
setSolidPhaseCheck
-
setStandard
-
setTC
void setTC(double TC) Getter for property
TC.- Parameters:
TC- Critical temperature to set
-
setTemperature
void setTemperature(double temp) Set the temperature of a fluid (same temperature for all phases).
- Parameters:
temp- Temperature in unit Kelvin
-
setTemperature
void setTemperature(double temp, int phaseNumber) Set the temperature of a single phase in the fluid.
- Parameters:
temp- Temperature in unit KelvinphaseNumber- a int
-
setTemperature
method to set the temperature of a fluid (same temperature for all phases).- Parameters:
temp- Temperature in specified unitunit- unit can be C or K (Celsius or Kelvin)
-
setTotalFlowRate
-
setTotalNumberOfMoles
void setTotalNumberOfMoles(double totalNumberOfMoles) Setter for property
totalNumberOfMoles.- Parameters:
totalNumberOfMoles- Total molar flow rate of fluid in unit mol/sec
-
setUseTVasIndependentVariables
void setUseTVasIndependentVariables(boolean useTVasIndependentVariables) setUseTVasIndependentVariables.
- Parameters:
useTVasIndependentVariables- a boolean
-
tuneModel
-
useVolumeCorrection
void useVolumeCorrection(boolean volcor) useVolumeCorrection.
- Parameters:
volcor- a boolean
-
write
-
getKvector
double[] getKvector()getKvector - return vector of equilibrium constants.
- Returns:
- an array of type double
-
getzvector
double[] getzvector()getzvector - return vector of total molar composition.
- Returns:
- an array of type double
-
toJson
-
toCompJson
-
setForceSinglePhase
-
setForceSinglePhase
-
isInitialized
boolean isInitialized()isInitialized.
- Returns:
- a boolean
-
setMolarCompositionOfNamedComponents
Sets the molar composition of components whose names contain the specified definition.- Parameters:
nameDef- the definition to match component names againstmolarComposition- an array of molar compositions to set for the matching components
-
addTBPfraction3
void addTBPfraction3(String componentName, double numberOfMoles, double density, double boilingPoint) Adds a TBP fraction to the system.- Parameters:
componentName- the name of the componentnumberOfMoles- number of molesdensity- density of the componentboilingPoint- boiling point
-
addTBPfraction4
void addTBPfraction4(String componentName, double numberOfMoles, double molarMass, double density, double boilingPoint) Adds a TBP fraction to the system.- Parameters:
componentName- the name of the componentnumberOfMoles- number of molesmolarMass- molar massdensity- density of the componentboilingPoint- boiling point
-
calculateMolarMassFromDensityAndBoilingPoint
double calculateMolarMassFromDensityAndBoilingPoint(double density, double boilingPoint) calculateMolarMassFromDensityAndBoilingPoint.
- Parameters:
density- a doubleboilingPoint- a double- Returns:
- a double
-
validateSetup
Validate the thermodynamic system setup before use.Checks for common setup errors:
- Components defined
- Mixing rule set
- Temperature and pressure in valid ranges
- Composition normalized
- Returns:
- validation result with errors and warnings
-
getTotalNumberOfMoles()