From 2cadc43936940b4f6e009196cf52d7e3f4e02b83 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C3=85smund=20V=C3=A5ge=20Fannemel?= <34712686+asmfstatoil@users.noreply.github.com> Date: Fri, 22 Dec 2023 11:59:38 +0100 Subject: [PATCH 1/3] doc: fix javadoc --- .../chemicalReactions/ChemicalReactionOperations.java | 1 + .../fluidBoundarySolver/FluidBoundarySolver.java | 4 ++-- .../flowNode/twoPhaseNode/TwoPhaseFlowNode.java | 5 +++++ .../controllerDevice/ControllerDeviceInterface.java | 8 ++++++-- src/main/java/neqsim/thermo/ThermodynamicModelTest.java | 5 +---- .../neqsim/thermo/component/ComponentGEUnifacUMRPRU.java | 2 +- src/main/java/neqsim/util/unit/LengthUnit.java | 4 ++-- src/main/java/neqsim/util/unit/TimeUnit.java | 4 ++-- .../flashOps/PHFlashGERG2008Test.java | 3 --- .../thermodynamicOperations/flashOps/PHFlashTest.java | 3 --- 10 files changed, 20 insertions(+), 19 deletions(-) diff --git a/src/main/java/neqsim/chemicalReactions/ChemicalReactionOperations.java b/src/main/java/neqsim/chemicalReactions/ChemicalReactionOperations.java index 3c28a545aa..ba4f589a80 100644 --- a/src/main/java/neqsim/chemicalReactions/ChemicalReactionOperations.java +++ b/src/main/java/neqsim/chemicalReactions/ChemicalReactionOperations.java @@ -453,6 +453,7 @@ public boolean solveChemEq(int phase, int type) { solver = new ChemicalEquilibrium(Amatrix, bVector, system, components, phase); } catch (Exception ex) { logger.error(ex.getMessage(), ex); + // todo: Will this crash below? } return solver.solve(); } diff --git a/src/main/java/neqsim/fluidMechanics/flowNode/fluidBoundary/heatMassTransferCalc/finiteVolumeBoundary/fluidBoundarySolver/FluidBoundarySolver.java b/src/main/java/neqsim/fluidMechanics/flowNode/fluidBoundary/heatMassTransferCalc/finiteVolumeBoundary/fluidBoundarySolver/FluidBoundarySolver.java index f4411396a6..c091e40199 100644 --- a/src/main/java/neqsim/fluidMechanics/flowNode/fluidBoundary/heatMassTransferCalc/finiteVolumeBoundary/fluidBoundarySolver/FluidBoundarySolver.java +++ b/src/main/java/neqsim/fluidMechanics/flowNode/fluidBoundary/heatMassTransferCalc/finiteVolumeBoundary/fluidBoundarySolver/FluidBoundarySolver.java @@ -41,7 +41,7 @@ public FluidBoundarySolver() {} * Constructor for FluidBoundarySolver. *

* - * @param boundary a {@link FluidBoundarySystemInterface} object + * @param boundary a {@link neqsim.fluidMechanics.flowNode.fluidBoundary.heatMassTransferCalc.finiteVolumeBoundary.fluidBoundarySystem.FluidBoundarySystemInterface} object */ public FluidBoundarySolver(FluidBoundarySystemInterface boundary) { this.boundary = boundary; @@ -67,7 +67,7 @@ public FluidBoundarySolver(FluidBoundarySystemInterface boundary) { * Constructor for FluidBoundarySolver. *

* - * @param boundary a {@link FluidBoundarySystemInterface} * object + * @param boundary a {@link neqsim.fluidMechanics.flowNode.fluidBoundary.heatMassTransferCalc.finiteVolumeBoundary.fluidBoundarySystem.FluidBoundarySystemInterface} * object * @param reactive a boolean */ public FluidBoundarySolver(FluidBoundarySystemInterface boundary, boolean reactive) { diff --git a/src/main/java/neqsim/fluidMechanics/flowNode/twoPhaseNode/TwoPhaseFlowNode.java b/src/main/java/neqsim/fluidMechanics/flowNode/twoPhaseNode/TwoPhaseFlowNode.java index 7291beba3f..be313ef672 100644 --- a/src/main/java/neqsim/fluidMechanics/flowNode/twoPhaseNode/TwoPhaseFlowNode.java +++ b/src/main/java/neqsim/fluidMechanics/flowNode/twoPhaseNode/TwoPhaseFlowNode.java @@ -401,6 +401,11 @@ public void update() { } } + /** + *

update.

+ * + * @param deltaTime a double + */ public void update(double deltaTime) { for (int componentNumber = 0; componentNumber < getBulkSystem().getPhases()[0] .getNumberOfComponents(); componentNumber++) { diff --git a/src/main/java/neqsim/processSimulation/controllerDevice/ControllerDeviceInterface.java b/src/main/java/neqsim/processSimulation/controllerDevice/ControllerDeviceInterface.java index d123546982..9b7f9fd2b6 100644 --- a/src/main/java/neqsim/processSimulation/controllerDevice/ControllerDeviceInterface.java +++ b/src/main/java/neqsim/processSimulation/controllerDevice/ControllerDeviceInterface.java @@ -131,17 +131,21 @@ public default void runTransient(double initResponse, double dt) { /** *

- * setActive + * setActive. *

* Set if controller is active + * + * @param isActive Set true to make controller active. */ public void setActive(boolean isActive); /** *

- * isActive + * isActive. *

* Specifies if controller is active + * + * @return a boolean */ public boolean isActive(); } diff --git a/src/main/java/neqsim/thermo/ThermodynamicModelTest.java b/src/main/java/neqsim/thermo/ThermodynamicModelTest.java index ba800413ed..6cf11e0c12 100644 --- a/src/main/java/neqsim/thermo/ThermodynamicModelTest.java +++ b/src/main/java/neqsim/thermo/ThermodynamicModelTest.java @@ -424,11 +424,8 @@ public boolean checkNumerically() { } /** - *

* - * @param maxErr Maximum error before test will report failed Set maximum allowed error in model - * check - *

+ * @param maxErr before test will report failed Set maximum allowed error in model check */ public void setMaxError(double maxErr) { this.maxError = maxErr; diff --git a/src/main/java/neqsim/thermo/component/ComponentGEUnifacUMRPRU.java b/src/main/java/neqsim/thermo/component/ComponentGEUnifacUMRPRU.java index 9e453f1659..ef80b587dc 100644 --- a/src/main/java/neqsim/thermo/component/ComponentGEUnifacUMRPRU.java +++ b/src/main/java/neqsim/thermo/component/ComponentGEUnifacUMRPRU.java @@ -399,7 +399,7 @@ public double getGamma(PhaseInterface phase, int numberOfComponents, double temp lngamma = lngammaResidual + lngammaCombinational; if (Double.isNaN(lngamma)) { - logger.error("gamma NaN......"); + logger.warn("gamma NaN......"); lngamma = 0.0; gamma = 1.0; dlngammadt = 0; diff --git a/src/main/java/neqsim/util/unit/LengthUnit.java b/src/main/java/neqsim/util/unit/LengthUnit.java index f19048778a..007b6b6edf 100644 --- a/src/main/java/neqsim/util/unit/LengthUnit.java +++ b/src/main/java/neqsim/util/unit/LengthUnit.java @@ -23,8 +23,8 @@ public class LengthUnit extends neqsim.util.unit.BaseUnit { * Constructor for LengthUnit. *

* - * @param value - * @param name + * @param value Numeric value + * @param name Name of unit */ public LengthUnit(double value, String name) { super(value, name); diff --git a/src/main/java/neqsim/util/unit/TimeUnit.java b/src/main/java/neqsim/util/unit/TimeUnit.java index 2635ed108f..28c293b628 100644 --- a/src/main/java/neqsim/util/unit/TimeUnit.java +++ b/src/main/java/neqsim/util/unit/TimeUnit.java @@ -22,8 +22,8 @@ public class TimeUnit extends neqsim.util.unit.BaseUnit { * Constructor for TimeUnit. *

* - * @param value - * @param name + * @param value Numeric value + * @param name Name of unit */ public TimeUnit(double value, String name) { super(value, name); diff --git a/src/test/java/neqsim/thermodynamicOperations/flashOps/PHFlashGERG2008Test.java b/src/test/java/neqsim/thermodynamicOperations/flashOps/PHFlashGERG2008Test.java index 46ed812aed..ee0a6020ad 100644 --- a/src/test/java/neqsim/thermodynamicOperations/flashOps/PHFlashGERG2008Test.java +++ b/src/test/java/neqsim/thermodynamicOperations/flashOps/PHFlashGERG2008Test.java @@ -28,9 +28,6 @@ void setUp() throws Exception { testSystem.initProperties(); } - /** - * Test method for {@link neqsim.thermodynamicOperations.flashOps.PHFlashGERG2008#run()}. - */ @Test void testRun() { double[] gergProps = testSystem.getPhase(0).getProperties_GERG2008(); diff --git a/src/test/java/neqsim/thermodynamicOperations/flashOps/PHFlashTest.java b/src/test/java/neqsim/thermodynamicOperations/flashOps/PHFlashTest.java index 61f54b2937..406dc3ddef 100644 --- a/src/test/java/neqsim/thermodynamicOperations/flashOps/PHFlashTest.java +++ b/src/test/java/neqsim/thermodynamicOperations/flashOps/PHFlashTest.java @@ -31,9 +31,6 @@ void setUp() throws Exception { testSystem.setMixingRule("classic"); } - /** - * Test method for {@link neqsim.thermodynamicOperations.flashOps.PHFlash#run()}. - */ @Test void testRun() { testOps = new ThermodynamicOperations(testSystem); From 046b38c2fa263cf8aa4cde449ca72340b705c616 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C3=85smund=20V=C3=A5ge=20Fannemel?= <34712686+asmfstatoil@users.noreply.github.com> Date: Fri, 22 Dec 2023 12:00:27 +0100 Subject: [PATCH 2/3] revert --- .../fluidBoundarySolver/FluidBoundarySolver.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/main/java/neqsim/fluidMechanics/flowNode/fluidBoundary/heatMassTransferCalc/finiteVolumeBoundary/fluidBoundarySolver/FluidBoundarySolver.java b/src/main/java/neqsim/fluidMechanics/flowNode/fluidBoundary/heatMassTransferCalc/finiteVolumeBoundary/fluidBoundarySolver/FluidBoundarySolver.java index c091e40199..f4411396a6 100644 --- a/src/main/java/neqsim/fluidMechanics/flowNode/fluidBoundary/heatMassTransferCalc/finiteVolumeBoundary/fluidBoundarySolver/FluidBoundarySolver.java +++ b/src/main/java/neqsim/fluidMechanics/flowNode/fluidBoundary/heatMassTransferCalc/finiteVolumeBoundary/fluidBoundarySolver/FluidBoundarySolver.java @@ -41,7 +41,7 @@ public FluidBoundarySolver() {} * Constructor for FluidBoundarySolver. *

* - * @param boundary a {@link neqsim.fluidMechanics.flowNode.fluidBoundary.heatMassTransferCalc.finiteVolumeBoundary.fluidBoundarySystem.FluidBoundarySystemInterface} object + * @param boundary a {@link FluidBoundarySystemInterface} object */ public FluidBoundarySolver(FluidBoundarySystemInterface boundary) { this.boundary = boundary; @@ -67,7 +67,7 @@ public FluidBoundarySolver(FluidBoundarySystemInterface boundary) { * Constructor for FluidBoundarySolver. *

* - * @param boundary a {@link neqsim.fluidMechanics.flowNode.fluidBoundary.heatMassTransferCalc.finiteVolumeBoundary.fluidBoundarySystem.FluidBoundarySystemInterface} * object + * @param boundary a {@link FluidBoundarySystemInterface} * object * @param reactive a boolean */ public FluidBoundarySolver(FluidBoundarySystemInterface boundary, boolean reactive) { From 8220575b5ed42aaa1162e2439ca18e67d20c86c0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C3=85smund=20V=C3=A5ge=20Fannemel?= <34712686+asmfstatoil@users.noreply.github.com> Date: Fri, 22 Dec 2023 12:01:23 +0100 Subject: [PATCH 3/3] revert --- .../java/neqsim/thermo/component/ComponentGEUnifacUMRPRU.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/main/java/neqsim/thermo/component/ComponentGEUnifacUMRPRU.java b/src/main/java/neqsim/thermo/component/ComponentGEUnifacUMRPRU.java index ef80b587dc..9e453f1659 100644 --- a/src/main/java/neqsim/thermo/component/ComponentGEUnifacUMRPRU.java +++ b/src/main/java/neqsim/thermo/component/ComponentGEUnifacUMRPRU.java @@ -399,7 +399,7 @@ public double getGamma(PhaseInterface phase, int numberOfComponents, double temp lngamma = lngammaResidual + lngammaCombinational; if (Double.isNaN(lngamma)) { - logger.warn("gamma NaN......"); + logger.error("gamma NaN......"); lngamma = 0.0; gamma = 1.0; dlngammadt = 0;