From 8dbc110a93d339bda5c4572f1d1a7e5b37c3c01b Mon Sep 17 00:00:00 2001
From: Even Solbraa <41290109+EvenSol@users.noreply.github.com>
Date: Wed, 16 Aug 2023 21:04:16 +0000
Subject: [PATCH 1/4] added units and runtime exception
---
src/main/java/neqsim/thermo/phase/Phase.java | 55 +--
.../neqsim/thermo/phase/PhaseInterface.java | 2 +-
.../neqsim/thermo/system/SystemInterface.java | 398 +++++++++++-------
.../neqsim/thermo/system/SystemThermo.java | 294 +++++++------
4 files changed, 412 insertions(+), 337 deletions(-)
diff --git a/src/main/java/neqsim/thermo/phase/Phase.java b/src/main/java/neqsim/thermo/phase/Phase.java
index 8b5d875ad..5409e05ef 100644
--- a/src/main/java/neqsim/thermo/phase/Phase.java
+++ b/src/main/java/neqsim/thermo/phase/Phase.java
@@ -46,12 +46,14 @@ abstract class Phase implements PhaseInterface {
/**
* Mole fraction of this phase of system.
- * beta = numberOfMolesInPhase/numberOfMolesInSystem
. NB! numberOfMolesInSystem is
+ * beta = numberOfMolesInPhase/numberOfMolesInSystem
. NB!
+ * numberOfMolesInSystem is
* not known to the phase.
*/
double beta = 1.0;
/**
- * Number of moles in phase. numberOfMolesInPhase = numberOfMolesInSystem*beta
. NB!
+ * Number of moles in phase.
+ * numberOfMolesInPhase = numberOfMolesInSystem*beta
. NB!
* numberOfMolesInSystem is not known to the phase.
*/
public double numberOfMolesInPhase = 0;
@@ -101,7 +103,7 @@ public Phase clone() {
* addcomponent. Increase number of components and add moles to phase.
*
- * Get sum of mole fractions for all components. NB! init(0) must be called first. + * Get sum of mole fractions for all components. NB! init(0) must be called + * first. *
* * @return a double @@ -234,7 +247,8 @@ public default String[][] calcResultTable() { public double getMoleFractionsSum(); /** - * method to get the speed of sound of a system. The sound speed is implemented based on a molar + * method to get the speed of sound of a system. The sound speed is implemented + * based on a molar * average over the phases * * @param unit Supported units are m/s, km/h @@ -243,7 +257,8 @@ public default String[][] calcResultTable() { public double getSoundSpeed(String unit); /** - * method to get the speed of sound of a system. The sound speed is implemented based on a molar + * method to get the speed of sound of a system. The sound speed is implemented + * based on a molar * average over the phases * * @return speed of sound in m/s @@ -272,7 +287,8 @@ public default String[][] calcResultTable() { public void initPhysicalProperties(String propertyName); /** - * Calculates thermodynamic and physical properties of a fluid using initThermoProperties() and + * Calculates thermodynamic and physical properties of a fluid using + * initThermoProperties() and * initPhysicalProperties(). */ public void initProperties(); @@ -290,13 +306,15 @@ public static SystemInterface addFluids(SystemInterface addFluid1, SystemInterfa return newFluid; } - /** * method to return interfacial tension between two phases. * - * @param phase1 phase type of phase1 as string (valid phases are gas, oil, aqueous) - * @param phase2 phase type of phase2 as string (valid phases are gas, oil, aqueous) - * @return interfacial tension with unit N/m. If one or both phases does not exist - the method + * @param phase1 phase type of phase1 as string (valid phases are gas, oil, + * aqueous) + * @param phase2 phase type of phase2 as string (valid phases are gas, oil, + * aqueous) + * @return interfacial tension with unit N/m. If one or both phases does not + * exist - the method * will return NaN */ public double getInterfacialTension(String phase1, String phase2); @@ -317,7 +335,7 @@ public static SystemInterface addFluids(SystemInterface addFluid1, SystemInterfa * * @param phase1 phase number of phase1 * @param phase2 phase number of phase2 - * @param unit a {@link java.lang.String} object + * @param unit a {@link java.lang.String} object * @return interfacial tension with specified unit */ public double getInterfacialTension(int phase1, int phase2, String unit); @@ -356,8 +374,10 @@ public default double getGamma2() { /** * method to return flow rate of fluid. * - * @param 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 + * @param 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 * @return flow rate in specified unit */ public double getFlowRate(String flowunit); @@ -373,7 +393,7 @@ public default double getGamma2() { * method to set the pressure of a fluid (same pressure for all phases). * * @param newPressure in specified unit - * @param unit unit can be bar, bara, barg or atm + * @param unit unit can be bar, bara, barg or atm */ public void setPressure(double newPressure, String unit); @@ -392,7 +412,7 @@ public default double getGamma2() { * * * @param newTemperature a double - * @param phaseNumber a int + * @param phaseNumber a int */ public void setTemperature(double newTemperature, int phaseNumber); @@ -400,12 +420,13 @@ public default double getGamma2() { * method to set the temperature of a fluid (same temperature for all phases). * * @param newTemperature in specified unit - * @param unit unit can be C or K (Celsius or Kelvin) + * @param unit unit can be C or K (Celsius or Kelvin) */ public void setTemperature(double newTemperature, String unit); /** - * method to return the volume fraction of a phase note: without Peneloux volume correction. + * method to return the volume fraction of a phase note: without Peneloux volume + * correction. * * @param phaseNumber number of the phase to get volume fraction for * @return volume fraction @@ -413,7 +434,8 @@ public default double getGamma2() { public double getVolumeFraction(int phaseNumber); /** - * method to return the volume fraction of a phase note: with Peneloux volume correction. + * method to return the volume fraction of a phase note: with Peneloux volume + * correction. * * @param phaseNumber number of the phase to get volume fraction for * @return volume fraction @@ -507,7 +529,7 @@ public default void removeMoles() { * saveObjectToFile. * * - * @param filePath a {@link java.lang.String} object + * @param filePath a {@link java.lang.String} object * @param fluidName a {@link java.lang.String} object */ public void saveObjectToFile(String filePath, String fluidName); @@ -517,7 +539,7 @@ public default void removeMoles() { * readObjectFromFile. * * - * @param filePath a {@link java.lang.String} object + * @param filePath a {@link java.lang.String} object * @param fluidName a {@link java.lang.String} object * @return a {@link neqsim.thermo.system.SystemInterface} object */ @@ -585,7 +607,7 @@ public default void removeMoles() { * changeComponentName. * * - * @param name a {@link java.lang.String} object + * @param name a {@link java.lang.String} object * @param newName a {@link java.lang.String} object */ public void changeComponentName(String name, String newName); @@ -697,8 +719,10 @@ public default boolean IsPhase(int i) { * * * @param flowRate a double - * @param flowunit a {@link java.lang.String} object. 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 + * @param flowunit a {@link java.lang.String} object. 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 */ public void setTotalFlowRate(double flowRate, String flowunit); @@ -850,7 +874,7 @@ public default boolean IsPhase(int i) { * saveObject. * * - * @param ID a int + * @param ID a int * @param text a {@link java.lang.String} object */ public void saveObject(int ID, String text); @@ -933,7 +957,8 @@ public default boolean IsPhase(int i) { /** *- * This method is used to set the total molar composition of a fluid. The total flow rate will be + * 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. *
* @@ -942,10 +967,12 @@ public default boolean IsPhase(int i) { public void setMolarComposition(double[] moles); /** - * return the phase of to specified type if the phase does not exist, the method will return null. + * return the phase of to specified type if the phase does not exist, the method + * will return null. * - * @param phaseTypeName the phase type to be returned (gas, oil, aqueous, wax, hydrate are - * supported) + * @param phaseTypeName the phase type to be returned (gas, oil, aqueous, wax, + * hydrate are + * supported) * @return a {@link neqsim.thermo.phase.PhaseInterface} object */ public PhaseInterface getPhaseOfType(String phaseTypeName); @@ -964,8 +991,8 @@ public default boolean IsPhase(int i) { * * @param componentName selected name of the component to be added * @param numberOfMoles number of moles to be added - * @param molarMass molar mass of the component in kg/mol - * @param density density of the component in g/cm3 + * @param molarMass molar mass of the component in kg/mol + * @param density density of the component in g/cm3 */ public void addTBPfraction(String componentName, double numberOfMoles, double molarMass, double density); @@ -975,13 +1002,13 @@ public void addTBPfraction(String componentName, double numberOfMoles, double mo * addTBPfraction. * * - * @param componentName a {@link java.lang.String} object - * @param numberOfMoles a double - * @param molarMass a double - * @param density a double + * @param componentName a {@link java.lang.String} object + * @param numberOfMoles a double + * @param molarMass a double + * @param density a double * @param criticalTemperature a double - * @param criticalPressure a double - * @param acentricFactor a double + * @param criticalPressure a double + * @param acentricFactor a double */ public void addTBPfraction(String componentName, double numberOfMoles, double molarMass, double density, double criticalTemperature, double criticalPressure, double acentricFactor); @@ -993,8 +1020,8 @@ public void addTBPfraction(String componentName, double numberOfMoles, double mo * * @param componentName a {@link java.lang.String} object * @param numberOfMoles a double - * @param molarMass a double - * @param density a double + * @param molarMass a double + * @param density a double */ public void addPlusFraction(String componentName, double numberOfMoles, double molarMass, double density); @@ -1005,7 +1032,7 @@ public void addPlusFraction(String componentName, double numberOfMoles, double m * * * @param componentName a {@link java.lang.String} object - * @param value a double + * @param value a double */ public void addSalt(String componentName, double value); @@ -1096,13 +1123,14 @@ public default boolean hasSolidPhase() { * * * @param model a {@link java.lang.String} object - * @param val a double + * @param val a double * @param phase a int */ public void tuneModel(String model, double val, int phase); /** - * add a component to a fluid. If component already exists, the moles will be added to the + * add a component to a fluid. If component already exists, the moles will be + * added to the * existing component. * * @param inComponent Component object to add. @@ -1110,30 +1138,38 @@ public default boolean hasSolidPhase() { public void addComponent(ComponentInterface inComponent); /** - * add a component to a fluid. If component already exists, the moles will be added to the + * add a component to a fluid. If component already exists, the moles will be + * added to the * existing component. * - * @param name Name of the component to add. See NeqSim database for component in the database. + * @param name Name of the component to add. See NeqSim database for component + * in the database. */ public void addComponent(String name); /** - * add a component to a fluid. If component already exists, the moles will be added to the + * add a component to a fluid. If component already exists, the moles will be + * added to the * existing component. * - * @param moles number of moles (per second) of the component to be added to the fluid - * @param name Name of the component to add. See NeqSim database for component in the database. + * @param moles number of moles (per second) of the component to be added to the + * fluid + * @param name Name of the component to add. See NeqSim database for component + * in the database. */ public void addComponent(String name, double moles); /** - * add a component to a fluid. If component already exists, the moles will be added to the + * add a component to a fluid. If component already exists, the moles will be + * added to the * existing component. * - * @param name Name of the component to add. See NeqSim database for component in the database. - * @param value The amount - * @param 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 .. + * @param name Name of the component to add. See NeqSim database for + * component in the database. + * @param value The amount + * @param 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 .. */ public void addComponent(String name, double value, String unitName); @@ -1142,30 +1178,37 @@ public default boolean hasSolidPhase() { * addComponent. * * - * @param name Name of the component to add. See NeqSim database for component in the database. - * @param moles number of moles (per second) of the component to be added to the fluid - * @param TC Critical temperature - * @param PC Critical pressure - * @param acs a double + * @param name Name of the component to add. See NeqSim database for component + * in the database. + * @param moles number of moles (per second) of the component to be added to the + * fluid + * @param TC Critical temperature + * @param PC Critical pressure + * @param acs a double */ public void addComponent(String name, double moles, double TC, double PC, double acs); /** - * add a component to a fluid. If component already exists, the moles will be added to the + * add a component to a fluid. If component already exists, the moles will be + * added to the * existing component. * - * @param name Name of the component to add. See NeqSim database for component in the database. - * @param moles number of moles (per second) of the component to be added to the fluid + * @param name Name of the component to add. See NeqSim database for + * component in the database. + * @param moles number of moles (per second) of the component to be added + * to the fluid * @param phaseNumber Number of the phase to add the component to */ public void addComponent(String name, double moles, int phaseNumber); /** - * add a component to a fluid. I component already exists, it will be added to the component + * add a component to a fluid. I component already exists, it will be added to + * the component * - * @param name Name of the component to add. See NeqSim database for component in the database. - * @param value rate of the component to add to the fluid - * @param unitName the unit of the flow rate (eg. mol/sec, kg/sec, etc.) + * @param name Name of the component to add. See NeqSim database for + * component in the database. + * @param value rate of the component to add to the fluid + * @param unitName the unit of the flow rate (eg. mol/sec, kg/sec, etc.) * @param phaseNumber Number of the phase to add the component to */ public void addComponent(String name, double value, String unitName, int phaseNumber); @@ -1176,7 +1219,8 @@ public default boolean hasSolidPhase() { * * * @param index Component number to add - * @param moles number of moles (per second) of the component to be added to the fluid + * @param moles number of moles (per second) of the component to be added to the + * fluid */ public void addComponent(int index, double moles); @@ -1185,8 +1229,9 @@ public default boolean hasSolidPhase() { * addComponent. * * - * @param index Component number to add - * @param moles number of moles (per second) of the component to be added to the fluid + * @param index Component number to add + * @param moles number of moles (per second) of the component to be added + * to the fluid * @param phaseNumber Number of the phase to add the component to */ public void addComponent(int index, double moles, int phaseNumber); @@ -1196,7 +1241,8 @@ public default boolean hasSolidPhase() { * removeComponent. * * - * @param name Name of the component to remove. See NeqSim database for component in the database. + * @param name Name of the component to remove. See NeqSim database for + * component in the database. */ public void removeComponent(String name); @@ -1223,7 +1269,8 @@ public default boolean hasSolidPhase() { /** *
- * Setter for property beta
. NB! Sets beta = b for first phase and 1-b for second
+ * Setter for property beta
. NB! Sets beta = b for first phase and
+ * 1-b for second
* phase, not for multiphase systems.
*
this.phaseIndex[index] = phaseIndex;
*
*
- * @param index a int
+ * @param index a int
* @param phaseIndex a int
*/
public void setPhaseIndex(int index, int phaseIndex);
/**
*
- * Set phaseArray[phaseIndex] = phase
. NB! Transfers the pressure and temperature
+ * Set phaseArray[phaseIndex] = phase
. NB! Transfers the pressure
+ * and temperature
* from the currently existing phase object at index numb
*
- * Calculate system beta values using Phase.getNumberOfMolesInPhase and getTotalNumberOfMoles. + * Calculate system beta values using Phase.getNumberOfMolesInPhase and + * getTotalNumberOfMoles. *
*/ public void initBeta(); @@ -1924,7 +2005,7 @@ public double calcBeta() * Change the phase type of a given phase. * * @param phaseToChange the phase number of the phase to set phase type - * @param newPhaseType the phasetype number to set + * @param newPhaseType the phasetype number to set * @deprecated Replaced by {@link setPhaseType} */ @Deprecated @@ -1946,14 +2027,14 @@ public default void setPhaseType(int phaseToChange, String phaseTypeName) { * Change the phase type of a given phase. * * @param phaseToChange the phase number of the phase to set phase type - * @param pt PhaseType to set + * @param pt PhaseType to set */ public void setPhaseType(int phaseToChange, PhaseType pt); /** * Set phase type of all phases. * - * @param phases Set to "all" to set all phases, else nothing happens. + * @param phases Set to "all" to set all phases, else nothing happens. * @param newPhaseType the phasetype number to set * @deprecated Replaced by {@link setAllPhaseType} */ @@ -2177,7 +2258,8 @@ public default ComponentInterface getComponent(int i) { public PhaseInterface getLiquidPhase(); /** - * method to return compressibility factor of a fluid compressibility factor is defined in EoS + * method to return compressibility factor of a fluid compressibility factor is + * defined in EoS * from PV=ZnRT where V is total volume of fluid. * * @return compressibility factor Z @@ -2194,7 +2276,7 @@ public default ComponentInterface getComponent(int i) { /** * method to return viscosity in a specified unit. * - * @param unit Supported units are kg/msec, cP (centipoise) + * @param unit Supported units are kg/msec, cP (centipoise), Pas (Pascal*second) * @return viscosity in specified unit */ public double getViscosity(String unit); @@ -2280,7 +2362,7 @@ public default ComponentInterface getComponent(int i) { * method to return phase fraction of selected phase. * * @param phaseTypeName gas/oil/aqueous - * @param unit mole/volume/weight + * @param unit mole/volume/weight * @return phase: fraction in specified unit */ public double getPhaseFraction(String phaseTypeName, String unit); @@ -2290,9 +2372,9 @@ public default ComponentInterface getComponent(int i) { * getProperty. * * - * @param prop a {@link java.lang.String} object + * @param prop a {@link java.lang.String} object * @param compName a {@link java.lang.String} object - * @param phase a int + * @param phase a int * @return a double */ public double getProperty(String prop, String compName, int phase); @@ -2302,7 +2384,7 @@ public default ComponentInterface getComponent(int i) { * getProperty. * * - * @param prop a {@link java.lang.String} object + * @param prop a {@link java.lang.String} object * @param phase a int * @return a double */ @@ -2582,10 +2664,10 @@ public void setImplementedCompositionDeriativesofFugacity( * addCharacterized. * * - * @param charNames an array of {@link java.lang.String} objects - * @param charFlowrate an array of {@link double} objects - * @param molarMass an array of {@link double} objects - * @param relativedensity an array of {@link double} objects + * @param charNames an array of {@link java.lang.String} objects + * @param charFlowrate an array of {@link double} objects + * @param molarMass an array of {@link double} objects + * @param relativedensity an array of {@link double} objects * @param lastIsPlusFraction True if last fraction is a Plus fraction */ public void addOilFractions(String[] charNames, double[] charFlowrate, double[] molarMass, @@ -2596,12 +2678,12 @@ public void addOilFractions(String[] charNames, double[] charFlowrate, double[] * addCharacterized. * * - * @param charNames an array of {@link java.lang.String} objects - * @param charFlowrate an array of {@link double} objects - * @param molarMass an array of {@link double} objects - * @param relativedensity an array of {@link double} objects - * @param lastIsPlusFraction True if last fraction is a Plus fraction - * @param lumpComponents True if component should be lumped + * @param charNames an array of {@link java.lang.String} objects + * @param charFlowrate an array of {@link double} objects + * @param molarMass an array of {@link double} objects + * @param relativedensity an array of {@link double} objects + * @param lastIsPlusFraction True if last fraction is a Plus fraction + * @param lumpComponents True if component should be lumped * @param numberOfPseudoComponents number of pseudo components */ public void addOilFractions(String[] charNames, double[] charFlowrate, double[] molarMass, @@ -2613,9 +2695,9 @@ public void addOilFractions(String[] charNames, double[] charFlowrate, double[] * addCharacterized. * * - * @param charNames an array of {@link java.lang.String} objects - * @param charFlowrate an array of {@link double} objects - * @param molarMass an array of {@link double} objects + * @param charNames an array of {@link java.lang.String} objects + * @param charFlowrate an array of {@link double} objects + * @param molarMass an array of {@link double} objects * @param relativedensity an array of {@link double} objects */ public void addCharacterized(String[] charNames, double[] charFlowrate, double[] molarMass, diff --git a/src/main/java/neqsim/thermo/system/SystemThermo.java b/src/main/java/neqsim/thermo/system/SystemThermo.java index 58fa393a1..b4ea48097 100644 --- a/src/main/java/neqsim/thermo/system/SystemThermo.java +++ b/src/main/java/neqsim/thermo/system/SystemThermo.java @@ -72,8 +72,10 @@ abstract class SystemThermo implements SystemInterface { protected double criticalPressure = 0; private double totalNumberOfMoles = 0; - // TODO: componentNameTag is not working yet, a kind of alias-postfix for Components from this - // system that will be passed on to other systems. used to find originator of specific components + // TODO: componentNameTag is not working yet, a kind of alias-postfix for + // Components from this + // system that will be passed on to other systems. used to find originator of + // specific components // or public String componentNameTag = ""; protected neqsim.thermo.characterization.WaxCharacterise waxCharacterisation = null; @@ -84,7 +86,7 @@ abstract class SystemThermo implements SystemInterface { protected int numberOfComponents = 0; // protected ArrayList- * Returns the composition vector in unit molefraction/wtfraction/molespersec/volumefraction. + * Returns the composition vector in unit + * molefraction/wtfraction/molespersec/volumefraction. *
* - * @param unit Supported units are molefraction, wtfraction, molespersec, volumefraction + * @param unit Supported units are molefraction, wtfraction, molespersec, + * volumefraction * @return composition array with unit */ public double[] getComposition(String unit); @@ -136,7 +138,8 @@ public default void addcomponent(String name, double moles, double molesInPhase, public double getVolume(String unit); /** - * method to return heat capacity ratio/adiabatic index/Poisson constant. The method calculates it + * method to return heat capacity ratio/adiabatic index/Poisson constant. The + * method calculates it * as Cp (real) /Cv (real). * * @return gamma @@ -144,7 +147,8 @@ public default void addcomponent(String name, double moles, double molesInPhase, public double getGamma(); /** - * method to return heat capacity ratio calculated as Cp/(Cp-R*getNumberOfMolesInPhase). + * method to return heat capacity ratio calculated as + * Cp/(Cp-R*getNumberOfMolesInPhase). * * @return kappa */ @@ -239,8 +243,8 @@ public default double getGamma2() { * * @param totalNumberOfMoles Total number of moles in all phases of Stream. * @param numberOfComponents Number of components in system. - * @param type a int. Use 0 to init, and 1 to reset. - * @param beta Mole fraction of this phase in system. + * @param type a int. Use 0 to init, and 1 to reset. + * @param beta Mole fraction of this phase in system. */ public default void init(double totalNumberOfMoles, int numberOfComponents, int type, double beta) { @@ -254,9 +258,9 @@ public default void init(double totalNumberOfMoles, int numberOfComponents, int * * @param totalNumberOfMoles Total number of moles in all phases of Stream. * @param numberOfComponents Number of components in system. - * @param type a int. Use 0 to init, and 1 to reset. - * @param pt Type of phase. - * @param beta Mole fraction of this phase in system. + * @param type a int. Use 0 to init, and 1 to reset. + * @param pt Type of phase. + * @param beta Mole fraction of this phase in system. */ public void init(double totalNumberOfMoles, int numberOfComponents, int type, PhaseType pt, double beta); @@ -268,9 +272,9 @@ public void init(double totalNumberOfMoles, int numberOfComponents, int type, Ph * * @param totalNumberOfMoles Total number of moles in system. * @param numberOfComponents Number of components in system. - * @param type a int. Use 0 to init, and 1 to reset. - * @param ptNumber Phase type index. - * @param beta Mole fraction of this phase in system. + * @param type a int. Use 0 to init, and 1 to reset. + * @param ptNumber Phase type index. + * @param beta Mole fraction of this phase in system. * @deprecated Replace with init-function using PhaseType input. */ @Deprecated @@ -363,7 +367,8 @@ public default void init(double totalNumberOfMoles, int numberOfComponents, int * getcomponentArray. * * - * @return an array of {@link neqsim.thermo.component.ComponentInterface} objects + * @return an array of {@link neqsim.thermo.component.ComponentInterface} + * objects */ public ComponentInterface[] getcomponentArray(); @@ -387,7 +392,8 @@ public default void init(double totalNumberOfMoles, int numberOfComponents, int public double getWtFraction(SystemInterface system); /** - * method to return molar volume of the phase note: without Peneloux volume correction. + * method to return molar volume of the phase note: without Peneloux volume + * correction. * * @return molar volume volume in unit m3/mol*1e5 */ @@ -396,8 +402,9 @@ public default void init(double totalNumberOfMoles, int numberOfComponents, int /** * method to return flow rate of a phase. * - * @param flowunit Supported units are kg/sec, kg/min, kg/hr, m3/sec, m3/min, m3/hr, ft3/sec, - * mole/sec, mole/min, mole/hr + * @param flowunit Supported units are kg/sec, kg/min, kg/hr, m3/sec, m3/min, + * m3/hr, ft3/sec, + * mole/sec, mole/min, mole/hr * @return flow rate in specified unit */ public double getFlowRate(String flowunit); @@ -407,7 +414,8 @@ public default void init(double totalNumberOfMoles, int numberOfComponents, int * setComponentArray. * * - * @param components an array of {@link neqsim.thermo.component.ComponentInterface} objects + * @param components an array of + * {@link neqsim.thermo.component.ComponentInterface} objects */ public void setComponentArray(ComponentInterface[] components); @@ -428,7 +436,8 @@ public default void init(double totalNumberOfMoles, int numberOfComponents, int public double[] getProperties_GERG2008(); /** - * method to get density of a phase note: does not use Peneloux volume correction. + * method to get density of a phase note: does not use Peneloux volume + * correction. * * @return density with unit kg/m3 */ @@ -447,10 +456,10 @@ public default void init(double totalNumberOfMoles, int numberOfComponents, int * removeComponent. * * - * @param name a {@link String} object - * @param moles a double + * @param name a {@link String} object + * @param moles a double * @param molesInPhase a double - * @param compNumber a int + * @param compNumber a int */ public void removeComponent(String name, double moles, double molesInPhase, int compNumber); @@ -619,7 +628,8 @@ public default double getExessGibbsEnergySymetric() { /** *
- * Getter for property beta
. Beta is the mole fraction of a phase of all the moles of
+ * Getter for property beta
. Beta is the mole fraction of a phase
+ * of all the moles of
* a system.
*
- * Setter for property beta
. Beta is the mole fraction of a phase of all the moles of
+ * Setter for property beta
. Beta is the mole fraction of a phase
+ * of all the moles of
* a system.
*
- * Change the number of moles of component of phase,i.e., numberOfMolesInPhase
but do
+ * Change the number of moles of component of phase,i.e.,
+ * numberOfMolesInPhase
but do
* not change the total number of moles of component in system.
*
- * NB! Phase fraction beta
is not updated by this method. Must be done separately to
- * keep consistency between phase and component calculation of of total number of moles in system.
+ * NB! Phase fraction beta
is not updated by this method. Must be
+ * done separately to
+ * keep consistency between phase and component calculation of of total number
+ * of moles in system.
*
- * Change the number of moles of component of phase, i.e., numberOfMolesInPhase
, and
- * total number of moles of component in system, i.e., numberOfMoles
with the same
+ * Change the number of moles of component of phase, i.e.,
+ * numberOfMolesInPhase
, and
+ * total number of moles of component in system, i.e.,
+ * numberOfMoles
with the same
* amount.
*
- * NB! Phase fraction beta
is not updated by this method. Must be done separately to
- * keep consistency between phase and component calculation of of total number of moles in system.
+ * NB! Phase fraction beta
is not updated by this method. Must be
+ * done separately to
+ * keep consistency between phase and component calculation of of total number
+ * of moles in system.
*
- * Change the number of moles of component of phase, i.e., numberOfMolesInPhase
and
- * Component
properties for the number of moles of component of phase, i.e.,
- * numberOfMolesInPhase
, and total number of moles of component in system, i.e.,
+ * Change the number of moles of component of phase, i.e.,
+ * numberOfMolesInPhase
and
+ * Component
properties for the number of moles of component of
+ * phase, i.e.,
+ * numberOfMolesInPhase
, and total number of moles of component in
+ * system, i.e.,
* numberOfMoles
with separate amounts.
*
- * NB! Phase fraction beta
is not updated by this method. Must be done separately to
- * keep consistency between phase and component calculation of of total number of moles in system.
+ * NB! Phase fraction beta
is not updated by this method. Must be
+ * done separately to
+ * keep consistency between phase and component calculation of of total number
+ * of moles in system.
*