diff --git a/src/main/java/neqsim/physicalProperties/interfaceProperties/surfaceTension/ParachorSurfaceTension.java b/src/main/java/neqsim/physicalProperties/interfaceProperties/surfaceTension/ParachorSurfaceTension.java index ea6d58bc4..18439c96d 100644 --- a/src/main/java/neqsim/physicalProperties/interfaceProperties/surfaceTension/ParachorSurfaceTension.java +++ b/src/main/java/neqsim/physicalProperties/interfaceProperties/surfaceTension/ParachorSurfaceTension.java @@ -34,7 +34,9 @@ public ParachorSurfaceTension(SystemInterface system) { /** * {@inheritDoc} * + *

* Calculates the pure component surfacetension using the Macleod/Sugden method + *

*/ @Override public double calcPureComponentSurfaceTension(int componentNumber) { @@ -53,7 +55,9 @@ public double calcPureComponentSurfaceTension(int componentNumber) { /** * {@inheritDoc} * + *

* Calculates the surfacetension using the Macleod/Sugden method for mixtures Units: N/m + *

*/ @Override public double calcSurfaceTension(int interface1, int interface2) { diff --git a/src/main/java/neqsim/physicalProperties/interfaceProperties/surfaceTension/SurfaceTension.java b/src/main/java/neqsim/physicalProperties/interfaceProperties/surfaceTension/SurfaceTension.java index 6062c402d..15a431ed9 100644 --- a/src/main/java/neqsim/physicalProperties/interfaceProperties/surfaceTension/SurfaceTension.java +++ b/src/main/java/neqsim/physicalProperties/interfaceProperties/surfaceTension/SurfaceTension.java @@ -18,62 +18,62 @@ * @version $Id: $Id */ public class SurfaceTension extends InterfaceProperties implements SurfaceTensionInterface { - private static final long serialVersionUID = 1000; + private static final long serialVersionUID = 1000; - protected SystemInterface system; + protected SystemInterface system; - /** - *

- * Constructor for SurfaceTension. - *

- */ - public SurfaceTension() {} + /** + *

+ * Constructor for SurfaceTension. + *

+ */ + public SurfaceTension() {} - /** - *

- * Constructor for SurfaceTension. - *

- * - * @param system a {@link neqsim.thermo.system.SystemInterface} object - */ - public SurfaceTension(SystemInterface system) { - this.system = system; - } + /** + *

+ * Constructor for SurfaceTension. + *

+ * + * @param system a {@link neqsim.thermo.system.SystemInterface} object + */ + public SurfaceTension(SystemInterface system) { + this.system = system; + } - /** - *

- * calcPureComponentSurfaceTension. - *

- * - * @param componentNumber a int - * @return a double - */ - public double calcPureComponentSurfaceTension(int componentNumber) { - return 0.0; - } + /** + *

+ * calcPureComponentSurfaceTension. + *

+ * + * @param componentNumber a int + * @return a double + */ + public double calcPureComponentSurfaceTension(int componentNumber) { + return 0.0; + } - /** {@inheritDoc} */ - @Override - public double calcSurfaceTension(int int1, int int2) { - return 0.0; - } + /** {@inheritDoc} */ + @Override + public double calcSurfaceTension(int int1, int int2) { + return 0.0; + } - /** - *

- * getComponentWithHighestBoilingpoint. - *

- * - * @return a int - */ - public int getComponentWithHighestBoilingpoint() { - int compNumb = 0; - double boilPoint = -273.15; - for (int i = 0; i < system.getPhase(0).getNumberOfComponents(); i++) { - if (system.getPhase(0).getComponent(i).getNormalBoilingPoint() > boilPoint) { - compNumb = i; - boilPoint = system.getPhase(0).getComponent(i).getNormalBoilingPoint(); - } - } - return compNumb; + /** + *

+ * getComponentWithHighestBoilingpoint. + *

+ * + * @return a int + */ + public int getComponentWithHighestBoilingpoint() { + int compNumb = 0; + double boilPoint = -273.15; + for (int i = 0; i < system.getPhase(0).getNumberOfComponents(); i++) { + if (system.getPhase(0).getComponent(i).getNormalBoilingPoint() > boilPoint) { + compNumb = i; + boilPoint = system.getPhase(0).getComponent(i).getNormalBoilingPoint(); + } } + return compNumb; + } } diff --git a/src/main/java/neqsim/physicalProperties/physicalPropertyMethods/gasPhysicalProperties/density/Density.java b/src/main/java/neqsim/physicalProperties/physicalPropertyMethods/gasPhysicalProperties/density/Density.java index 7453a5fe2..ccf64bf7b 100644 --- a/src/main/java/neqsim/physicalProperties/physicalPropertyMethods/gasPhysicalProperties/density/Density.java +++ b/src/main/java/neqsim/physicalProperties/physicalPropertyMethods/gasPhysicalProperties/density/Density.java @@ -61,7 +61,9 @@ public Density clone() { /** * {@inheritDoc} * + *

* Returns the density of the phase. Unit: kg/m^3 + *

*/ @Override public double calcDensity() { diff --git a/src/main/java/neqsim/processSimulation/SimulationBaseClass.java b/src/main/java/neqsim/processSimulation/SimulationBaseClass.java index 2a221b704..affaa8913 100644 --- a/src/main/java/neqsim/processSimulation/SimulationBaseClass.java +++ b/src/main/java/neqsim/processSimulation/SimulationBaseClass.java @@ -28,11 +28,7 @@ public SimulationBaseClass(String name) { super(name); } - /** - * {@inheritDoc} - * - * @return a {@link java.util.UUID} object - */ + /** {@inheritDoc} */ public UUID getCalculationIdentifier() { return calcIdentifier; } @@ -58,11 +54,7 @@ public void setCalculateSteadyState(boolean steady) { this.calculateSteadyState = steady; } - /** - * {@inheritDoc} - * - * @return a double - */ + /** {@inheritDoc} */ public double getTime() { return this.time; } diff --git a/src/main/java/neqsim/processSimulation/SimulationInterface.java b/src/main/java/neqsim/processSimulation/SimulationInterface.java index a97b4e8b1..1ea7bb06e 100644 --- a/src/main/java/neqsim/processSimulation/SimulationInterface.java +++ b/src/main/java/neqsim/processSimulation/SimulationInterface.java @@ -64,10 +64,9 @@ public interface SimulationInterface extends NamedInterface, Runnable, Serializa * {@inheritDoc} * *

- * run - *

* In this method all thermodynamic and unit operations will be calculated in a steady state * calculation. Sets calc identifier UUID. + *

*/ @Override public default void run() { diff --git a/src/main/java/neqsim/processSimulation/measurementDevice/simpleFlowRegime/SevereSlugAnalyser.java b/src/main/java/neqsim/processSimulation/measurementDevice/simpleFlowRegime/SevereSlugAnalyser.java index e5bedbc89..7d55d2e7b 100644 --- a/src/main/java/neqsim/processSimulation/measurementDevice/simpleFlowRegime/SevereSlugAnalyser.java +++ b/src/main/java/neqsim/processSimulation/measurementDevice/simpleFlowRegime/SevereSlugAnalyser.java @@ -43,7 +43,7 @@ public class SevereSlugAnalyser extends MeasurementDeviceBaseClass { double alfaRiser = 0.0; // gas fraction in the riser double z = 0.0001; // some initial value to start the calculation double lambdaStagnant = 0.0; - double uLevel = 0.0;// some initial value to start the calculation + double uLevel = 0.0; // some initial value to start the calculation double valveConstant = 0.0; double normalPressure = 100000.0; final double pi = neqsim.thermo.ThermodynamicConstantsInterface.pi; @@ -661,6 +661,25 @@ public double getMeasuredValue() { return slugValue; } + /** + *

+ * getMeasuredValue. + *

+ * + * @param fluid a + * {@link neqsim.processSimulation.measurementDevice.simpleFlowRegime.FluidSevereSlug} + * object + * @param pipe a {@link neqsim.processSimulation.measurementDevice.simpleFlowRegime.Pipe} object + * @param severeSlug a + * {@link neqsim.processSimulation.measurementDevice.simpleFlowRegime.SevereSlugAnalyser} + * object + * @return a double + */ + public double getMeasuredValue(FluidSevereSlug fluid, Pipe pipe, SevereSlugAnalyser severeSlug) { + checkFlowRegime(fluid, pipe, severeSlug); + return slugValue; + } + /** *

* getPredictedFlowRegime. @@ -694,25 +713,6 @@ public String getPredictedFlowRegime() { return flowPattern; } - /** - *

- * getMeasuredValue. - *

- * - * @param fluid a - * {@link neqsim.processSimulation.measurementDevice.simpleFlowRegime.FluidSevereSlug} - * object - * @param pipe a {@link neqsim.processSimulation.measurementDevice.simpleFlowRegime.Pipe} object - * @param severeSlug a - * {@link neqsim.processSimulation.measurementDevice.simpleFlowRegime.SevereSlugAnalyser} - * object - * @return a double - */ - public double getMeasuredValue(FluidSevereSlug fluid, Pipe pipe, SevereSlugAnalyser severeSlug) { - checkFlowRegime(fluid, pipe, severeSlug); - return slugValue; - } - /** *

* getPredictedFlowRegime. @@ -740,7 +740,7 @@ public String getPredictedFlowRegime(FluidSevereSlug fluid, Pipe pipe, * * @param args an array of {@link java.lang.String} objects */ - public static void main(String args[]) { + public static void main(String[] args) { neqsim.thermo.system.SystemInterface testSystem = new neqsim.thermo.system.SystemSrkEos((273.15 + 15.0), 10); testSystem.addComponent("methane", 0.015, "MSm^3/day"); diff --git a/src/main/java/neqsim/processSimulation/processEquipment/absorber/SimpleAbsorber.java b/src/main/java/neqsim/processSimulation/processEquipment/absorber/SimpleAbsorber.java index 0eb5ef7e5..88e2669f2 100644 --- a/src/main/java/neqsim/processSimulation/processEquipment/absorber/SimpleAbsorber.java +++ b/src/main/java/neqsim/processSimulation/processEquipment/absorber/SimpleAbsorber.java @@ -103,6 +103,7 @@ public SimpleAbsorber(String name, StreamInterface inStream1) { * * @return a {@link neqsim.processSimulation.mechanicalDesign.absorber.AbsorberMechanicalDesign} object */ + @Override public AbsorberMechanicalDesign getMechanicalDesign() { return new AbsorberMechanicalDesign(this); } diff --git a/src/main/java/neqsim/processSimulation/processEquipment/compressor/CompressorChartInterface.java b/src/main/java/neqsim/processSimulation/processEquipment/compressor/CompressorChartInterface.java index 28a4e806e..1c3f72efa 100644 --- a/src/main/java/neqsim/processSimulation/processEquipment/compressor/CompressorChartInterface.java +++ b/src/main/java/neqsim/processSimulation/processEquipment/compressor/CompressorChartInterface.java @@ -35,8 +35,8 @@ public void setCurves(double[] chartConditions, double[] speed, double[][] flow, * Get method for polytropic head from reference curves. * * @param flow [m3/h], speed in [rpm]. - * @return polytropic head in unit [getHeadUnit] * @param speed a double + * @return polytropic head in unit [getHeadUnit] */ public double getPolytropicHead(double flow, double speed); diff --git a/src/main/java/neqsim/thermo/characterization/WaxModelInterface.java b/src/main/java/neqsim/thermo/characterization/WaxModelInterface.java index 3367e30cb..9e73bffc8 100644 --- a/src/main/java/neqsim/thermo/characterization/WaxModelInterface.java +++ b/src/main/java/neqsim/thermo/characterization/WaxModelInterface.java @@ -65,28 +65,28 @@ public interface WaxModelInterface extends java.io.Serializable, Cloneable { /** *

- * removeWax. + * setParameterWaxHeatOfFusion. *

+ * + * @param parameterWaxHeatOfFusion an array of {@link double} objects */ - public void removeWax(); + public void setParameterWaxHeatOfFusion(double[] parameterWaxHeatOfFusion); /** *

- * getParameterWaxHeatOfFusion. + * removeWax. *

- * - * @return an array of {@link double} objects */ - public double[] getParameterWaxHeatOfFusion(); + public void removeWax(); /** *

- * setParameterWaxHeatOfFusion. + * getParameterWaxHeatOfFusion. *

* - * @param parameterWaxHeatOfFusion an array of {@link double} objects + * @return an array of {@link double} objects */ - public void setParameterWaxHeatOfFusion(double[] parameterWaxHeatOfFusion); + public double[] getParameterWaxHeatOfFusion(); /** *

diff --git a/src/main/java/neqsim/thermo/component/Component.java b/src/main/java/neqsim/thermo/component/Component.java index 9f79fd447..22b94178d 100644 --- a/src/main/java/neqsim/thermo/component/Component.java +++ b/src/main/java/neqsim/thermo/component/Component.java @@ -832,11 +832,7 @@ public double getLiquidConductivityParameter(int i) { return liquidConductivityParameter[i]; } - /** - * {@inheritDoc} - * - * Units in m*e10 - */ + /** {@inheritDoc} */ @Override public double getLennardJonesMolecularDiameter() { return lennardJonesMolecularDiameter; @@ -854,38 +850,21 @@ public double getHsub() { return Hsub; } - /** - * {@inheritDoc} - * - * Calculates the pure comonent solid vapor pressure (bar) with the C-C equation, based on Hsub - * Should only be used in the valid temperature range below the triple point (specified in - * component database). - */ + /** {@inheritDoc} */ @Override public double getCCsolidVaporPressure(double temperature) { return triplePointPressure * (Math.exp(Hsub / R * (1.0 / getTriplePointTemperature() - 1.0 / temperature))); } - /** - * {@inheritDoc} - * - * Calculates the DT of pure comonent solid vapor pressure (bar) with the C-C equation, based on - * Hsub Should only be used in the valid temperature range below the triple point (specified in - * component database). - */ + /** {@inheritDoc} */ @Override public double getCCsolidVaporPressuredT(double temperature) { return triplePointPressure * Hsub / R * (1.0 / (temperature * temperature)) * (Math.exp(Hsub / R * (1.0 / getTriplePointTemperature() - 1.0 / temperature))); } - /** - * {@inheritDoc} - * - * Calculates the pure component solid density in kg/liter Should only be used in the valid - * temperature range (specified in component database). - */ + /** {@inheritDoc} */ @Override public double getPureComponentSolidDensity(double temperature) { return molarMass * 1000.0 @@ -895,13 +874,7 @@ public double getPureComponentSolidDensity(double temperature) { + solidDensityCoefs[4] * Math.pow(temperature, 4.0)); } - /** - * {@inheritDoc} - * - * Calculates the pure component liquid density in kg/liter Should only be used in the valid - * temperature range (specified in component database). This method seems to give bad results at - * the moment - */ + /** {@inheritDoc} */ @Override public double getPureComponentLiquidDensity(double temperature) { return molarMass * 1000.0 @@ -1158,18 +1131,6 @@ public final double getChemicalPotentialdP() { return voli; } - /** {@inheritDoc} */ - @Override - public final double getChemicalPotentialdT(PhaseInterface phase) { - return -getEntropy(phase.getTemperature(), phase.getPressure()) / numberOfMolesInPhase; - } - - /** {@inheritDoc} */ - @Override - public final double getChemicalPotentialdV(PhaseInterface phase) { - return getChemicalPotentialdP() * phase.getdPdVTn(); - } - /** *

* getChemicalPotentialdP. @@ -1183,6 +1144,18 @@ public final double getChemicalPotentialdP(int i, PhaseInterface phase) { return R * phase.getTemperature() * getFugacitydN(i, phase); } + /** {@inheritDoc} */ + @Override + public final double getChemicalPotentialdT(PhaseInterface phase) { + return -getEntropy(phase.getTemperature(), phase.getPressure()) / numberOfMolesInPhase; + } + + /** {@inheritDoc} */ + @Override + public final double getChemicalPotentialdV(PhaseInterface phase) { + return getChemicalPotentialdP() * phase.getdPdVTn(); + } + /** {@inheritDoc} */ @Override public void setComponentNumber(int numb) { @@ -1193,33 +1166,14 @@ public void setComponentNumber(int numb) { @Override public double getAntoineVaporPressure(double temp) { if (antoineLiqVapPresType.equals("pow10")) { - return Math.pow(10.0, AntoineA - (AntoineB / (temp + AntoineC - 273.15))); // equation - // and - // parameter - // from - // properties - // o liquids - // and - // gases - // (poling - // 5th ed) + // equation and parameter from properties o and gases (poling 5th ed) + return Math.pow(10.0, AntoineA - (AntoineB / (temp + AntoineC - 273.15))); } else if (antoineLiqVapPresType.equals("pow10KPa")) { - return Math.pow(10.0, AntoineA - (AntoineB / (temp + AntoineC)))/1.0e5; // equation - // and - // parameter - // from - // properties - // o liquids - // and - // gases - // (poling - // 5th ed) - } - else if (antoineLiqVapPresType.equals("exp") || antoineLiqVapPresType.equals("log")) { - return Math.exp(AntoineA - (AntoineB / (temp + AntoineC))); // equation and parameter - // from properties o - // liquids and gases (poling - // 5th ed) + // equation and parameter from properties o and gases (poling 5th ed) + return Math.pow(10.0, AntoineA - (AntoineB / (temp + AntoineC))) / 1.0e5; + } else if (antoineLiqVapPresType.equals("exp") || antoineLiqVapPresType.equals("log")) { + // equation and parameter from properties o and gases (poling 5th ed) + return Math.exp(AntoineA - (AntoineB / (temp + AntoineC))); } else if (Math.abs(AntoineE) > 1e-12) { return Math.exp(AntoineA + AntoineB / temp + AntoineC * Math.log(temp) + AntoineD * Math.pow(temp, AntoineE)) / 100000; @@ -1878,11 +1832,7 @@ public java.lang.String getComponentType() { return componentType; } - /** - * {@inheritDoc} - * - * Getter for property Henrys Coefficient. Unit is bar. ln H = C1 + C2/T + C3lnT + C4*T - */ + /** {@inheritDoc} */ @Override public double getHenryCoef(double temperature) { // System.out.println("henry " + @@ -2310,11 +2260,9 @@ public double getFlowRate(String flowunit) { return numberOfMolesInPhase * getMolarMass() * 60.0; } else if (flowunit.equals("kg/hr")) { return numberOfMolesInPhase * getMolarMass() * 3600.0; - } - else if (flowunit.equals("tonnes/year")){ - return numberOfMolesInPhase * getMolarMass()*3600.0*24.0*365.0/1000.0; - } - else if (flowunit.equals("m3/hr")) { + } else if (flowunit.equals("tonnes/year")) { + return numberOfMolesInPhase * getMolarMass() * 3600.0 * 24.0 * 365.0 / 1000.0; + } else if (flowunit.equals("m3/hr")) { return getVoli() / 1.0e5 * 3600.0; } else if (flowunit.equals("m3/min")) { return getVoli() / 1.0e5 * 60.0; @@ -2331,8 +2279,6 @@ else if (flowunit.equals("m3/hr")) { } } - - /** {@inheritDoc} */ @Override public double getTotalFlowRate(String flowunit) { @@ -2352,7 +2298,7 @@ public double getTotalFlowRate(String flowunit) { throw new RuntimeException("failed.. unit: " + flowunit + " not supported"); } } - + /** * Indexed getter for property matiascopemanParamsUMRPRU. diff --git a/src/main/java/neqsim/thermo/component/ComponentHydrateKluda.java b/src/main/java/neqsim/thermo/component/ComponentHydrateKluda.java index d47fbb8e5..764fe41aa 100644 --- a/src/main/java/neqsim/thermo/component/ComponentHydrateKluda.java +++ b/src/main/java/neqsim/thermo/component/ComponentHydrateKluda.java @@ -22,8 +22,8 @@ public class ComponentHydrateKluda extends Component { int hydrateStructure = 0; double[][][] coordNumb = new double[3][2][2]; // [structure][cavitytype] double[][][] cavRadius = new double[3][2][2]; // [structure][cavitytype] - double cavNumb[][] = new double[2][2]; // [structure][cavitytype] - double cavprwat[][] = new double[2][2]; // [structure][cavitytype] + double[][] cavNumb = new double[2][2]; // [structure][cavitytype] + double[][] cavprwat = new double[2][2]; // [structure][cavitytype] double[] reffug = new double[20]; static Logger logger = LogManager.getLogger(ComponentHydrateKluda.class); diff --git a/src/main/java/neqsim/thermo/component/ComponentInterface.java b/src/main/java/neqsim/thermo/component/ComponentInterface.java index dd10dfafa..fcdbd3615 100644 --- a/src/main/java/neqsim/thermo/component/ComponentInterface.java +++ b/src/main/java/neqsim/thermo/component/ComponentInterface.java @@ -763,7 +763,7 @@ public void Finit(PhaseInterface phase, double temperature, double pressure, /** *

- * The mole fraction of a component in the actual phase + * The mole fraction of a component in the actual phase. *

* * @return a double @@ -772,7 +772,7 @@ public void Finit(PhaseInterface phase, double temperature, double pressure, /** *

- * The mole fraction of a component in the total fluid + * The mole fraction of a component in the total fluid. *

* * @return a double @@ -781,7 +781,7 @@ public void Finit(PhaseInterface phase, double temperature, double pressure, /** *

- * The distribution coefficient y/x between gas and lidquid for a component + * The distribution coefficient y/x between gas and lidquid for a component. *

* * @return a double @@ -790,7 +790,7 @@ public void Finit(PhaseInterface phase, double temperature, double pressure, /** *

- * Returns the critical temperature of the component + * Returns the critical temperature of the component. *

* * @return a double @@ -1129,7 +1129,7 @@ public void Finit(PhaseInterface phase, double temperature, double pressure, * getLennardJonesMolecularDiameter. *

* - * @return a double + * @return Units in m*e10 */ public double getLennardJonesMolecularDiameter(); @@ -1478,21 +1478,24 @@ public void Finit(PhaseInterface phase, double temperature, double pressure, /** *

- * getPureComponentSolidDensity. + * getPureComponentSolidDensity. Calculates the pure component solid density in kg/liter Should + * only be used in the valid temperature range (specified in component database). *

* * @param temperature a double - * @return a double + * @return pure component solid density in kg/liter */ public double getPureComponentSolidDensity(double temperature); /** *

- * getPureComponentLiquidDensity. + * getPureComponentLiquidDensity. Calculates the pure component liquid density in kg/liter Should + * only be used in the valid temperature range (specified in component database). This method + * seems to give bad results at the moment *

* * @param temperature a double - * @return a double + * @return pure component liquid density in kg/liter */ public double getPureComponentLiquidDensity(double temperature); @@ -1863,21 +1866,25 @@ public double fugcoefDiffTempNumeric(PhaseInterface phase, int numberOfComponent /** *

- * getCCsolidVaporPressure. + * getCCsolidVaporPressure. Calculates the pure comonent solid vapor pressure (bar) with the C-C + * equation, based on Hsub Should only be used in the valid temperature range below the triple + * point (specified in component database). *

* * @param temperature a double - * @return a double + * @return Calculated solid vapor pressure in bar. */ public double getCCsolidVaporPressure(double temperature); /** *

- * getCCsolidVaporPressuredT. + * getCCsolidVaporPressuredT. Calculates the DT of pure comonent solid vapor pressure (bar) with + * the C-C equation, based on Hsub Should only be used in the valid temperature range below the + * triple point (specified in component database). *

* * @param temperature a double - * @return a double + * @return Calculated solid vapor pressure in bar. */ public double getCCsolidVaporPressuredT(double temperature); @@ -1910,11 +1917,12 @@ public double fugcoefDiffTempNumeric(PhaseInterface phase, int numberOfComponent /** *

- * getHenryCoef. + * getHenryCoef. Getter for property Henrys Coefficient. Unit is bar. ln H = C1 + C2/T + C3lnT + + * C4*T *

* * @param temperature a double - * @return a double + * @return Henrys Coefficient in bar */ public double getHenryCoef(double temperature); diff --git a/src/main/java/neqsim/thermo/component/ComponentPRvolcor.java b/src/main/java/neqsim/thermo/component/ComponentPRvolcor.java index e979766f9..3f15f25ee 100644 --- a/src/main/java/neqsim/thermo/component/ComponentPRvolcor.java +++ b/src/main/java/neqsim/thermo/component/ComponentPRvolcor.java @@ -10,7 +10,9 @@ import neqsim.thermo.phase.PhasePrEosvolcor; /** - *

ComponentPRvolcor class.

+ *

+ * ComponentPRvolcor class. + *

* * @author Even Solbraa * @version $Id: $Id @@ -22,8 +24,11 @@ public class ComponentPRvolcor extends ComponentPR { // private double calcc; public double[] Cij = new double[MAX_NUMBER_OF_COMPONENTS]; public double Ci = 0; + /** - *

Constructor for ComponentPRvolcor.

+ *

+ * Constructor for ComponentPRvolcor. + *

* * @param number a int * @param TC a double @@ -39,7 +44,9 @@ public ComponentPRvolcor(int number, double TC, double PC, double M, double a, d /// ** {@inheritDoc} */ // @Override /** - *

calcc.

+ *

+ * calcc. + *

* * @return a double */ @@ -50,7 +57,9 @@ public double calcc() { // derivative of translation with regards to temperature /** - *

calccT.

+ *

+ * calccT. + *

* * @return a double */ @@ -60,7 +69,9 @@ public double calccT() { // second derivative of translation with regards to temperature*temperature /** - *

calccTT.

+ *

+ * calccTT. + *

* * @return a double */ @@ -69,7 +80,9 @@ public double calccTT() { } /** - *

Constructor for ComponentPRvolcor.

+ *

+ * Constructor for ComponentPRvolcor. + *

* * @param component_name a {@link java.lang.String} object * @param moles a double @@ -91,18 +104,15 @@ public void init(double temp, double pres, double totMoles, double beta, int typ c = calcc(); } - /** - * {@inheritDoc} - * - * @return a double - */ - // @Override + /** {@inheritDoc} */ public double getc() { return c; } /** - *

getcT.

+ *

+ * getcT. + *

* * @return a double */ @@ -114,13 +124,11 @@ public double getcT() { /** {@inheritDoc} */ @Override public void Finit(PhaseInterface phase, double temp, double pres, double totMoles, double beta, - int numberOfComponents, int type) - { - super.Finit(phase, temp, pres, totMoles, beta, numberOfComponents, type); - Ci = ((PhasePrEosvolcor) phase).calcCi(componentNumber, phase, temp, pres, numberOfComponents); + int numberOfComponents, int type) { + super.Finit(phase, temp, pres, totMoles, beta, numberOfComponents, type); + Ci = ((PhasePrEosvolcor) phase).calcCi(componentNumber, phase, temp, pres, numberOfComponents); if (type >= 2) { - ((PhasePrEosvolcor) phase).calcCiT(componentNumber, phase, temp, pres, - numberOfComponents); + ((PhasePrEosvolcor) phase).calcCiT(componentNumber, phase, temp, pres, numberOfComponents); } if (type >= 3) { @@ -132,7 +140,9 @@ public void Finit(PhaseInterface phase, double temp, double pres, double totMole } /** - *

getCi.

+ *

+ * getCi. + *

* * @return a double */ @@ -141,7 +151,9 @@ public double getCi() { } /** - *

getCij.

+ *

+ * getCij. + *

* * @param j a int * @return a double @@ -155,7 +167,9 @@ public double getCij(int j) { // second derivative of C with regards to mole fraction and temperature /** - *

getCiT.

+ *

+ * getCiT. + *

* * @return a double */ @@ -164,7 +178,9 @@ public double getCiT() { } /** - *

getcTT.

+ *

+ * getcTT. + *

* * @return a double */ @@ -177,11 +193,13 @@ public double getcTT() { public double dFdN(PhaseInterface phase, int numberOfComponents, double temperature, double pressure) { return phase.Fn() + phase.FB() * getBi() + phase.FD() * getAi() - + ((PhasePrEosvolcor) phase).FC() * getCi(); + + ((PhasePrEosvolcor) phase).FC() * getCi(); } /** - *

getFC.

+ *

+ * getFC. + *

* * @param phase a {@link neqsim.thermo.phase.PhaseInterface} object * @param numberOfComponents a int @@ -190,7 +208,7 @@ public double dFdN(PhaseInterface phase, int numberOfComponents, double temperat * @return a double */ public double getFC(PhaseInterface phase, int numberOfComponents, double temperature, - double pressure) { + double pressure) { return ((PhasePrEosvolcor) phase).FC(); } diff --git a/src/main/java/neqsim/thermo/component/ComponentSolid.java b/src/main/java/neqsim/thermo/component/ComponentSolid.java index 4d10fcbde..110b890db 100644 --- a/src/main/java/neqsim/thermo/component/ComponentSolid.java +++ b/src/main/java/neqsim/thermo/component/ComponentSolid.java @@ -47,7 +47,9 @@ public ComponentSolid(String component_name, double moles, double molesInPhase, /** * {@inheritDoc} * + *

* Uses Claperyons equation to calculate the solid fugacity + *

*/ @Override public double fugcoef(PhaseInterface phase1) { diff --git a/src/main/java/neqsim/thermo/component/ComponentWax.java b/src/main/java/neqsim/thermo/component/ComponentWax.java index 0f4fe55ba..a88a70fc8 100644 --- a/src/main/java/neqsim/thermo/component/ComponentWax.java +++ b/src/main/java/neqsim/thermo/component/ComponentWax.java @@ -36,7 +36,9 @@ public ComponentWax(String component_name, double moles, double molesInPhase, in /** * {@inheritDoc} * + *

* Uses Claperyons equation to calculate the solid fugacity + *

*/ @Override public double fugcoef(PhaseInterface phase1) { diff --git a/src/main/java/neqsim/thermo/component/ComponentWaxWilson.java b/src/main/java/neqsim/thermo/component/ComponentWaxWilson.java index 1496e7ea2..088d813fe 100644 --- a/src/main/java/neqsim/thermo/component/ComponentWaxWilson.java +++ b/src/main/java/neqsim/thermo/component/ComponentWaxWilson.java @@ -38,7 +38,9 @@ public ComponentWaxWilson(String component_name, double moles, double molesInPha /** * {@inheritDoc} * + *

* Uses Claperyons equation to calculate the solid fugacity + *

*/ @Override public double fugcoef(PhaseInterface phase1) { diff --git a/src/main/java/neqsim/thermo/phase/Phase.java b/src/main/java/neqsim/thermo/phase/Phase.java index 2148d1f78..fb3ea0bfe 100644 --- a/src/main/java/neqsim/thermo/phase/Phase.java +++ b/src/main/java/neqsim/thermo/phase/Phase.java @@ -14,6 +14,8 @@ import neqsim.thermo.system.SystemInterface; /** + * Phase class. + * * @author Even Solbraa */ abstract class Phase implements PhaseInterface { diff --git a/src/main/java/neqsim/thermo/phase/PhaseEos.java b/src/main/java/neqsim/thermo/phase/PhaseEos.java index 60b6033d5..29c3abc15 100644 --- a/src/main/java/neqsim/thermo/phase/PhaseEos.java +++ b/src/main/java/neqsim/thermo/phase/PhaseEos.java @@ -511,6 +511,8 @@ public double geta(PhaseInterface phase, double temperature, double pressure, in } /** + * Get a. + * * @return double */ double geta() { @@ -609,18 +611,16 @@ public double getCpres() { /** * {@inheritDoc} * + *

* method to return real gas isentropic exponent (kappa = - Cp/Cv*(v/p)*dp/dv + *

*/ @Override public double getKappa() { return -getCp() / getCv() * getVolume() / pressure * getdPdVTn(); } - /** - * {@inheritDoc} - * - * method to get the Joule Thomson Coefficient of a phase - */ + /** {@inheritDoc} */ @Override public double getJouleThomsonCoefficient() { return -1.0 / getCp() @@ -991,11 +991,7 @@ public double calcPressuredV() { - getNumberOfMolesInPhase() * R * temperature / Math.pow(getTotalVolume(), 2.0); } - /** - * {@inheritDoc} - * - * method to get the speed of sound of a phase - */ + /** {@inheritDoc} */ @Override public double getSoundSpeed() { double bs = -1.0 / getVolume() * getCv() / getCp() / getdPdVTn(); diff --git a/src/main/java/neqsim/thermo/phase/PhaseGE.java b/src/main/java/neqsim/thermo/phase/PhaseGE.java index 1add63421..00f990cd1 100644 --- a/src/main/java/neqsim/thermo/phase/PhaseGE.java +++ b/src/main/java/neqsim/thermo/phase/PhaseGE.java @@ -307,8 +307,13 @@ public double getSoundSpeed() { return 1470.0; } - // return speed of JT coefficient of water at K/bar (assumed constant) - /** {@inheritDoc} */ + /** + * {@inheritDoc} + * + *

+ * Return speed of JT coefficient of water at K/bar (assumed constant) -0.0125 + *

+ */ @Override public double getJouleThomsonCoefficient() { return -0.125 / 10.0; @@ -317,7 +322,9 @@ public double getJouleThomsonCoefficient() { /** * {@inheritDoc} * + *

* note: at the moment return density of water (997 kg/m3) + *

*/ @Override public double getDensity() { diff --git a/src/main/java/neqsim/thermo/phase/PhaseInterface.java b/src/main/java/neqsim/thermo/phase/PhaseInterface.java index e61c0cbcc..0421a7c3d 100644 --- a/src/main/java/neqsim/thermo/phase/PhaseInterface.java +++ b/src/main/java/neqsim/thermo/phase/PhaseInterface.java @@ -76,14 +76,14 @@ public interface PhaseInterface extends ThermodynamicConstantsInterface, Cloneab public double getDensity_AGA8(); /** - * method to get the Joule Thomson Coefficient of a phase note: implemented in phaseEos. + * method to get the Joule Thomson Coefficient of a phase. * * @return Joule Thomson coefficient in K/bar */ public double getJouleThomsonCoefficient(); /** - * method to get the Joule Thomson Coefficient of a phase note: implemented in phaseEos. + * method to get the Joule Thomson Coefficient of a phase. * * @param unit Supported units are K/bar, C/bar * @return Joule Thomson coefficient in specified unit diff --git a/src/main/java/neqsim/thermo/system/SystemInterface.java b/src/main/java/neqsim/thermo/system/SystemInterface.java index ffe3aed21..fd262157f 100644 --- a/src/main/java/neqsim/thermo/system/SystemInterface.java +++ b/src/main/java/neqsim/thermo/system/SystemInterface.java @@ -2478,9 +2478,9 @@ public void setImplementedCompositionDeriativesofFugacity( public int hashCode(); /** - * {@inheritDoc} + * Add to component names. * - * @param name a {@link java.lang.String} object + * @param name Component name to add */ public void addToComponentNames(java.lang.String name); diff --git a/src/main/java/neqsim/thermo/system/SystemThermo.java b/src/main/java/neqsim/thermo/system/SystemThermo.java index 6b0647003..b7fb6e1fc 100644 --- a/src/main/java/neqsim/thermo/system/SystemThermo.java +++ b/src/main/java/neqsim/thermo/system/SystemThermo.java @@ -3092,9 +3092,9 @@ public double getCorrectedVolume() { } /** - * {@inheritDoc} - * - * @return a double + * getPdVtn. Todo: document + * + * @return dpdv */ public double getdPdVtn() { double dPdV = 0.0; @@ -5144,13 +5144,7 @@ private void setMolarFractions(double[] molefractions, String type) { } } - /** - * {@inheritDoc} - * - *

- * addCharacterized. - *

- */ + /** {@inheritDoc} */ @Override public void addCharacterized(String[] charNames, double[] charFlowrate, double[] molarMass, double[] relativedensity) { @@ -5162,13 +5156,7 @@ public void addCharacterized(String[] charNames, double[] charFlowrate, double[] } } - /** - * {@inheritDoc} - * - *

- * addCharacterized. - *

- */ + /** {@inheritDoc} */ @Override public void addOilFractions(String[] charNames, double[] charFlowrate, double[] molarMass, double[] relativedensity, boolean lastIsPlusFraction, boolean lumpComponents, @@ -5201,13 +5189,7 @@ public void addOilFractions(String[] charNames, double[] charFlowrate, double[] init(0); } - /** - * {@inheritDoc} - * - *

- * addOilFractions. - *

- */ + /** {@inheritDoc} */ @Override public void addOilFractions(String[] charNames, double[] charFlowrate, double[] molarMass, double[] relativedensity, boolean lastIsPlusFraction) { diff --git a/src/main/java/neqsim/thermo/system/SystemUMRCPAEoS.java b/src/main/java/neqsim/thermo/system/SystemUMRCPAEoS.java index 7efbfc9da..3180baba6 100644 --- a/src/main/java/neqsim/thermo/system/SystemUMRCPAEoS.java +++ b/src/main/java/neqsim/thermo/system/SystemUMRCPAEoS.java @@ -1,13 +1,5 @@ -/* - * System_SRK_EOS.java - * - * Created on 8. april 2000, 23:05 - */ - package neqsim.thermo.system; - - import neqsim.thermo.phase.PhaseUMRCPA; /** diff --git a/src/main/java/neqsim/util/NamedBaseClass.java b/src/main/java/neqsim/util/NamedBaseClass.java index 5b0b09373..4bdc7416b 100644 --- a/src/main/java/neqsim/util/NamedBaseClass.java +++ b/src/main/java/neqsim/util/NamedBaseClass.java @@ -19,21 +19,13 @@ public NamedBaseClass(String name) { this.name = name; } - /** - * {@inheritDoc} - * - * Getter for property name - */ + /** {@inheritDoc} */ @Override public String getName() { return this.name; } - /** - * {@inheritDoc} - * - * Setter for property name - */ + /** {@inheritDoc} */ @Override public void setName(String name) { this.name = name; diff --git a/src/main/java/neqsim/util/NamedInterface.java b/src/main/java/neqsim/util/NamedInterface.java index 1dbaa36e7..8b9f26845 100644 --- a/src/main/java/neqsim/util/NamedInterface.java +++ b/src/main/java/neqsim/util/NamedInterface.java @@ -8,18 +8,14 @@ */ public interface NamedInterface { /** - *

- * getName. - *

+ * Getter for property Name. * * @return a {@link java.lang.String} object */ public String getName(); /** - *

- * setName. - *

+ * Setter for property Name. * * @param name a {@link java.lang.String} object */ diff --git a/src/test/java/neqsim/processSimulation/processSystem/GlycolModulesTest.java b/src/test/java/neqsim/processSimulation/processSystem/GlycolModulesTest.java index 923c6d28e..a7ef6106b 100644 --- a/src/test/java/neqsim/processSimulation/processSystem/GlycolModulesTest.java +++ b/src/test/java/neqsim/processSimulation/processSystem/GlycolModulesTest.java @@ -47,11 +47,12 @@ public void runProcessTEG() throws InterruptedException { dryFeedGas.setTemperature(32.48975904520211, "C"); dryFeedGas.setPressure(40.1205259689988, "bara"); - StreamSaturatorUtil saturatedFeedGas = new StreamSaturatorUtil(dryFeedGas); - saturatedFeedGas.setName("water saturator Smøbukk"); + StreamSaturatorUtil saturatedFeedGas = + new StreamSaturatorUtil("water saturator Smøbukk", dryFeedGas); saturatedFeedGas.setApprachToSaturation(0.93); - Heater feedTPsetterToAbsorber = new Heater("TP of gas to absorber", saturatedFeedGas.getOutStream()); + Heater feedTPsetterToAbsorber = + new Heater("TP of gas to absorber", saturatedFeedGas.getOutletStream()); feedTPsetterToAbsorber.setOutPressure(39.67967207899729, "bara"); feedTPsetterToAbsorber.setOutTemperature(31.40346842493481, "C"); @@ -80,12 +81,9 @@ public void runProcessTEG() throws InterruptedException { absorber.setStageEfficiency(1); absorber.setInternalDiameter(3.65); - Stream dehydratedGas = new Stream(absorber.getGasOutStream()); - dehydratedGas.setName("dry gas from absorber"); - - Stream richTEG = new Stream(absorber.getLiquidOutStream()); - richTEG.setName("rich TEG from absorber"); + Stream dehydratedGas = new Stream("dry gas from absorber", absorber.getGasOutStream()); + Stream richTEG = new Stream("rich TEG from absorber", absorber.getLiquidOutStream()); HydrateEquilibriumTemperatureAnalyser waterDewPointAnalyser = new HydrateEquilibriumTemperatureAnalyser( dehydratedGas); waterDewPointAnalyser.setReferencePressure(70.0); @@ -95,15 +93,14 @@ public void runProcessTEG() throws InterruptedException { waterDewPointAnalyser2.setReferencePressure(70.0); waterDewPointAnalyser2.setName("water dew point analyser"); - Heater condHeat = new Heater(richTEG); - condHeat.setName("Condenser heat exchanger"); + Heater condHeat = new Heater("Condenser heat exchanger", richTEG); - ThrottlingValve glycol_flash_valve = new ThrottlingValve("Flash valve", condHeat.getOutStream()); + ThrottlingValve glycol_flash_valve = + new ThrottlingValve("Flash valve", condHeat.getOutletStream()); glycol_flash_valve.setName("Rich TEG HP flash valve"); glycol_flash_valve.setOutletPressure(7.513533287063168); - Heater heatEx2 = new Heater(glycol_flash_valve.getOutStream()); - heatEx2.setName("rich TEG heat exchanger 1"); + Heater heatEx2 = new Heater("rich TEG heat exchanger 1", glycol_flash_valve.getOutletStream()); heatEx2.setOutTemperature(273.15 + 90); neqsim.thermo.system.SystemInterface feedWater = (neqsim.thermo.system.SystemInterface) feedGas.clone(); @@ -114,25 +111,22 @@ public void runProcessTEG() throws InterruptedException { waterFeed.setTemperature(90, "C"); waterFeed.setPressure(7.513533287063168, "bara"); - Separator flashSep = new Separator(heatEx2.getOutStream()); - flashSep.setName("degasing separator"); + Separator flashSep = new Separator("degasing separator", heatEx2.getOutletStream()); flashSep.setInternalDiameter(1.2); - Stream flashGas = new Stream(flashSep.getGasOutStream()); - flashGas.setName("gas from degasing separator"); + Stream flashGas = new Stream("gas from degasing separator", flashSep.getGasOutStream()); - Stream flashLiquid = new Stream(flashSep.getLiquidOutStream()); - flashLiquid.setName("liquid from degasing separator"); + Stream flashLiquid = + new Stream("liquid from degasing separator", flashSep.getLiquidOutStream()); - Filter filter = new Filter(flashLiquid); - filter.setName("TEG fine filter"); + Filter filter = new Filter("TEG fine filter", flashLiquid); filter.setDeltaP(0.0, "bara"); - Heater heatEx = new Heater(filter.getOutStream()); - heatEx.setName("lean/rich TEG heat-exchanger"); + Heater heatEx = new Heater("lean/rich TEG heat-exchanger", filter.getOutletStream()); heatEx.setOutTemperature(273.15 + 105.0); - ThrottlingValve glycol_flash_valve2 = new ThrottlingValve("LP flash valve", heatEx.getOutStream()); + ThrottlingValve glycol_flash_valve2 = + new ThrottlingValve("LP flash valve", heatEx.getOutletStream()); glycol_flash_valve2.setName("Rich TEG LP flash valve"); glycol_flash_valve2.setOutletPressure(1.1714901511485545); @@ -143,13 +137,12 @@ public void runProcessTEG() throws InterruptedException { strippingGas.setTemperature(185.4402968739743, "C"); strippingGas.setPressure(1.1714901511485545, "bara"); - Stream gasToReboiler = (Stream) (strippingGas).clone(); gasToReboiler.setName("gas to reboiler"); DistillationColumn column = new DistillationColumn(1, true, true); column.setName("TEG regeneration column"); - column.addFeedStream(glycol_flash_valve2.getOutStream(), 1); + column.addFeedStream(glycol_flash_valve2.getOutletStream(), 1); column.getReboiler().setOutTemperature(273.15 + 201.86991706268591); column.getCondenser().setOutTemperature(273.15 + 102.80145109927442); column.getTray(1).addStream(gasToReboiler); @@ -157,15 +150,12 @@ public void runProcessTEG() throws InterruptedException { column.setBottomPressure(1.1714901511485545); column.setInternalDiameter(0.56); - Heater coolerRegenGas = new Heater(column.getGasOutStream()); - coolerRegenGas.setName("regen gas cooler"); + Heater coolerRegenGas = new Heater("regen gas cooler", column.getGasOutStream()); coolerRegenGas.setOutTemperature(273.15 + 17.685590621935702); - Separator sepregenGas = new Separator(coolerRegenGas.getOutStream()); - sepregenGas.setName("regen gas separator"); + Separator sepregenGas = new Separator("regen gas separator", coolerRegenGas.getOutletStream()); - Stream gasToFlare = new Stream(sepregenGas.getGasOutStream()); - gasToFlare.setName("gas to flare"); + Stream gasToFlare = new Stream("gas to flare", sepregenGas.getGasOutStream()); Splitter splitterGasToFlare = new Splitter("splitter GasToFlare", gasToFlare); splitterGasToFlare.setSplitNumber(2); @@ -175,10 +165,7 @@ public void runProcessTEG() throws InterruptedException { strippingFlareGasTPsetter.setOutPressure(1.1714901511485545, "bara"); strippingFlareGasTPsetter.setOutTemperature(185.4402968739743, "C"); - - Stream liquidToTrreatment = new Stream(sepregenGas.getLiquidOutStream()); - liquidToTrreatment.setName("water to treatment"); - + Stream liquidToTrreatment = new Stream("water to treatment", sepregenGas.getLiquidOutStream()); WaterStripperColumn stripper = new WaterStripperColumn("TEG stripper"); stripper.addSolventInStream(column.getLiquidOutStream()); @@ -195,7 +182,6 @@ public void runProcessTEG() throws InterruptedException { recycleFlareGas.setOutletStream(strippingGas); recycleFlareGas.setPriority(1000); - neqsim.thermo.system.SystemInterface pureTEG = (neqsim.thermo.system.SystemInterface) feedGas.clone(); pureTEG.setMolarComposition(new double[] { 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0,0.0,0.0,0.0, 1.0 }); @@ -216,19 +202,16 @@ public void runProcessTEG() throws InterruptedException { makeupMixer.addStream(makeupTEG); - Pump hotLeanTEGPump = new Pump(makeupMixer.getOutStream()); - hotLeanTEGPump.setName("lean TEG LP pump"); + Pump hotLeanTEGPump = new Pump("lean TEG LP pump", makeupMixer.getOutletStream()); hotLeanTEGPump.setOutletPressure(39.67967207899729); hotLeanTEGPump.setIsentropicEfficiency(0.9); - Heater coolerhOTteg3 = new Heater(hotLeanTEGPump.getOutStream()); - coolerhOTteg3.setName("lean TEG cooler"); + Heater coolerhOTteg3 = new Heater("lean TEG cooler", hotLeanTEGPump.getOutletStream()); coolerhOTteg3.setOutTemperature(273.15 + 35.009563114341454); condHeat.setEnergyStream(column.getCondenser().getEnergyStream()); - Stream leanTEGtoabs = new Stream(coolerhOTteg3.getOutStream()); - leanTEGtoabs.setName("lean TEG to absorber"); + Stream leanTEGtoabs = new Stream("lean TEG to absorber", coolerhOTteg3.getOutletStream()); Recycle resycleLeanTEG = new Recycle("lean TEG resycle"); resycleLeanTEG.addStream(leanTEGtoabs); @@ -292,8 +275,6 @@ public void runProcessTEG() throws InterruptedException { operations5.add(waterDewPointAnalyser); operations5.add(waterDewPointAnalyser2); - - neqsim.processSimulation.processSystem.ProcessModule module1 = new neqsim.processSimulation.processSystem.ProcessModule("Start process"); module1.add(operations1); module1.add(operations2);