From 02ebee921be72f5d8c7383a6825fe569969617bc 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, 25 Oct 2024 17:25:47 +0200 Subject: [PATCH] wip --- .../NonEquilibriumFluidBoundary.java | 5 +- .../enhancementfactor/EnhancementFactor.java | 1 - .../measurementdevice/MultiPhaseMeter.java | 12 +- .../CompressorChartAlternativeMapLookup.java | 6 +- .../stream/StreamInterface.java | 1 - .../valve/ThrottlingValve.java | 12 +- .../util/monitor/StreamResponse.java | 8 +- .../gasquality/Standard_ISO15403.java | 6 +- .../neqsim/thermo/atomelement/Element.java | 6 +- .../thermo/characterization/LumpingModel.java | 20 +- .../java/neqsim/thermo/phase/PhaseGE.java | 7 +- .../java/neqsim/thermo/phase/PhaseSrkCPA.java | 1 - .../neqsim/thermo/system/SystemThermo.java | 19 +- .../ThermodynamicOperations.java | 182 ++++++++---------- .../flashops/SysNewtonRhapsonTPflash.java | 3 +- .../BubblePointTemperatureFlash.java | 4 +- .../neqsim/util/database/NeqSimDataBase.java | 2 +- .../FLowInducedVibrationTest.java | 7 - .../measurementdevice/WellAllocatorTest.java | 7 - .../measurementdevice/nmVOCTest.java | 2 +- .../CompressorPropertyProfileTest.java | 2 +- .../compressor/CompressorTest.java | 4 +- .../distillation/DistillationColumnTest.java | 6 +- .../heatexchanger/HeaterTest.java | 2 +- .../processequipment/mixer/MixerTest.java | 2 +- .../separator/SeparatorTest.java | 2 +- .../splitter/ComponentSplitterTest.java | 2 +- .../processequipment/stream/StreamTest.java | 2 +- .../stream/VirtualStreamTest.java | 2 +- .../util/example/process1Test.java | 80 ++++---- .../simulation/SaturationPressureTest.java | 2 +- .../simulation/SaturationTemperatureTest.java | 7 - .../gasquality/Standard_ISO15403Test.java | 2 +- .../gasquality/Standard_ISO6976Test.java | 2 +- .../Standard_ISO6976_2016_Test.java | 2 +- .../salescontract/BaseContractTest.java | 2 +- .../neqsim/thermo/component/AmmoniaTest.java | 2 +- .../component/ComponentHydrateGFTest.java | 2 +- .../thermo/component/NewComponentTest.java | 7 - .../readwrite/EclipseFluidReadWriteTest.java | 7 - .../flashops/Degasser.java | 2 +- .../flashops/PHFlashGERG2008Test.java | 2 +- .../flashops/PHFlashTest.java | 2 +- .../flashops/PSFlashGERG2008Test.java | 2 +- .../flashops/TPFlashTest.java | 5 +- .../flashops/TPFlashTestWellFluid.java | 5 +- .../flashops/TVFlashTest.java | 2 +- .../flashops/VUFlashTest.java | 9 - .../flashops/WaxFlashTest.java | 2 +- 49 files changed, 194 insertions(+), 287 deletions(-) diff --git a/src/main/java/neqsim/fluidmechanics/flownode/fluidboundary/heatmasstransfercalc/nonequilibriumfluidboundary/NonEquilibriumFluidBoundary.java b/src/main/java/neqsim/fluidmechanics/flownode/fluidboundary/heatmasstransfercalc/nonequilibriumfluidboundary/NonEquilibriumFluidBoundary.java index 0d14a3f1f..c98b4f8dd 100644 --- a/src/main/java/neqsim/fluidmechanics/flownode/fluidboundary/heatmasstransfercalc/nonequilibriumfluidboundary/NonEquilibriumFluidBoundary.java +++ b/src/main/java/neqsim/fluidmechanics/flownode/fluidboundary/heatmasstransfercalc/nonequilibriumfluidboundary/NonEquilibriumFluidBoundary.java @@ -1,12 +1,9 @@ package neqsim.fluidmechanics.flownode.fluidboundary.heatmasstransfercalc.nonequilibriumfluidboundary; +import Jama.Matrix; import neqsim.fluidmechanics.flownode.FlowNodeInterface; import neqsim.thermo.system.SystemInterface; -import Jama.Matrix; - - - /** *

* Abstract NonEquilibriumFluidBoundary class. diff --git a/src/main/java/neqsim/fluidmechanics/flownode/fluidboundary/heatmasstransfercalc/nonequilibriumfluidboundary/filmmodelboundary/reactivefilmmodel/enhancementfactor/EnhancementFactor.java b/src/main/java/neqsim/fluidmechanics/flownode/fluidboundary/heatmasstransfercalc/nonequilibriumfluidboundary/filmmodelboundary/reactivefilmmodel/enhancementfactor/EnhancementFactor.java index e1b1e9693..457db958d 100644 --- a/src/main/java/neqsim/fluidmechanics/flownode/fluidboundary/heatmasstransfercalc/nonequilibriumfluidboundary/filmmodelboundary/reactivefilmmodel/enhancementfactor/EnhancementFactor.java +++ b/src/main/java/neqsim/fluidmechanics/flownode/fluidboundary/heatmasstransfercalc/nonequilibriumfluidboundary/filmmodelboundary/reactivefilmmodel/enhancementfactor/EnhancementFactor.java @@ -116,7 +116,6 @@ public void setOnesVec(int phase) { } } - /** * Getter for property hattaNumber. * diff --git a/src/main/java/neqsim/processsimulation/measurementdevice/MultiPhaseMeter.java b/src/main/java/neqsim/processsimulation/measurementdevice/MultiPhaseMeter.java index d02326a68..15fb73795 100644 --- a/src/main/java/neqsim/processsimulation/measurementdevice/MultiPhaseMeter.java +++ b/src/main/java/neqsim/processsimulation/measurementdevice/MultiPhaseMeter.java @@ -126,7 +126,7 @@ public double getMeasuredValue(String measurement, String unit) { try { thermoOps.TPflash(); } catch (Exception ex) { - logger.error(ex.getMessage(), ex); + logger.error(ex.getMessage()); return Double.NaN; } // tempFluid.display(); @@ -148,7 +148,7 @@ public double getMeasuredValue(String measurement, String unit) { try { thermoOps.TPflash(); } catch (Exception ex) { - logger.error(ex.getMessage(), ex); + logger.error(ex.getMessage()); return Double.NaN; } // tempFluid.display(); @@ -166,7 +166,7 @@ public double getMeasuredValue(String measurement, String unit) { try { thermoOps.TPflash(); } catch (Exception ex) { - logger.error(ex.getMessage(), ex); + logger.error(ex.getMessage()); return Double.NaN; } // tempFluid.display(); @@ -184,7 +184,7 @@ public double getMeasuredValue(String measurement, String unit) { try { thermoOps.TPflash(); } catch (Exception ex) { - logger.error(ex.getMessage(), ex); + logger.error(ex.getMessage()); return Double.NaN; } // tempFluid.display(); @@ -203,7 +203,7 @@ public double getMeasuredValue(String measurement, String unit) { try { thermoOps.TPflash(); } catch (Exception ex) { - logger.error(ex.getMessage(), ex); + logger.error(ex.getMessage()); return Double.NaN; } tempFluid.initPhysicalProperties(); @@ -237,7 +237,7 @@ public double getMeasuredValue(String measurement, String unit) { try { thermoOps.TPflash(); } catch (Exception ex) { - logger.error(ex.getMessage(), ex); + logger.error(ex.getMessage()); return Double.NaN; } if (!tempFluid.hasPhaseType("gas")) { diff --git a/src/main/java/neqsim/processsimulation/processequipment/compressor/CompressorChartAlternativeMapLookup.java b/src/main/java/neqsim/processsimulation/processequipment/compressor/CompressorChartAlternativeMapLookup.java index 668ed55b3..8fea23435 100644 --- a/src/main/java/neqsim/processsimulation/processequipment/compressor/CompressorChartAlternativeMapLookup.java +++ b/src/main/java/neqsim/processsimulation/processequipment/compressor/CompressorChartAlternativeMapLookup.java @@ -191,10 +191,8 @@ public CompressorCurve getCurveAtRefSpeed(double refSpeed) { } } String msg = "Does not match any speed in the chart."; - neqsim.util.exception.InvalidInputException ex = - new neqsim.util.exception.InvalidInputException(this, "getCurveAtRefSpeed", "refSpeed", - msg); - throw new RuntimeException(ex); + throw new RuntimeException(new neqsim.util.exception.InvalidInputException(this, + "getCurveAtRefSpeed", "refSpeed", msg)); } /** diff --git a/src/main/java/neqsim/processsimulation/processequipment/stream/StreamInterface.java b/src/main/java/neqsim/processsimulation/processequipment/stream/StreamInterface.java index a20c115b7..dbd4c6790 100644 --- a/src/main/java/neqsim/processsimulation/processequipment/stream/StreamInterface.java +++ b/src/main/java/neqsim/processsimulation/processequipment/stream/StreamInterface.java @@ -191,7 +191,6 @@ public default double getFlowRate(String unit) { */ public StreamInterface clone(String name); - /** *

* flashStream. diff --git a/src/main/java/neqsim/processsimulation/processequipment/valve/ThrottlingValve.java b/src/main/java/neqsim/processsimulation/processequipment/valve/ThrottlingValve.java index 92fdc6a7a..1fa5e2177 100644 --- a/src/main/java/neqsim/processsimulation/processequipment/valve/ThrottlingValve.java +++ b/src/main/java/neqsim/processsimulation/processequipment/valve/ThrottlingValve.java @@ -508,8 +508,8 @@ public void run(UUID id) { try { inStream.getThermoSystem().setTotalNumberOfMoles(molarFlow); inStream.getThermoSystem().init(3); - } catch (Exception e) { - logger.error(e.getMessage(), e); + } catch (Exception ex) { + logger.error(ex.getMessage()); } // inletStream.run(id); @@ -572,15 +572,15 @@ public void runTransient(double dt, UUID id) { inStream.getThermoSystem().setTotalNumberOfMoles(molarFlow); inStream.getThermoSystem().init(1); inStream.run(id); - } catch (Exception e) { - logger.error(e.getMessage(), e); + } catch (Exception ex) { + logger.error(ex.getMessage()); } try { outStream.getThermoSystem().setTotalNumberOfMoles(molarFlow); outStream.getThermoSystem().init(1); outStream.run(id); - } catch (Exception e) { - logger.error(e.getMessage(), e); + } catch (Exception ex) { + logger.error(ex.getMessage()); } setCalculationIdentifier(id); } diff --git a/src/main/java/neqsim/processsimulation/util/monitor/StreamResponse.java b/src/main/java/neqsim/processsimulation/util/monitor/StreamResponse.java index 20f306898..3081843e6 100644 --- a/src/main/java/neqsim/processsimulation/util/monitor/StreamResponse.java +++ b/src/main/java/neqsim/processsimulation/util/monitor/StreamResponse.java @@ -208,8 +208,8 @@ public StreamResponse(StreamInterface inputStream) { Double.toString( inputStream.getTVP(37.8, "C", neqsim.util.unit.Units.getSymbol("pressure"))), neqsim.util.unit.Units.getSymbol("pressure"))); - } catch (Exception e) { - logger.error(e.getMessage(), e); + } catch (Exception ex) { + logger.error(ex.getMessage()); } try { newdata.put("RVP", @@ -220,8 +220,8 @@ public StreamResponse(StreamInterface inputStream) { newdata.put("relative density", new Value( Double.toString(inputStream.getFluid().getPhase(name).getDensity("kg/m3") / 1000.0), "-")); - } catch (Exception e) { - logger.error(e.getMessage(), e); + } catch (Exception ex) { + logger.error(ex.getMessage()); } } else if (name.equals("gas")) { Standard_ISO6976 standard = inputStream.getISO6976("volume", 15.0, 15.0); diff --git a/src/main/java/neqsim/standards/gasquality/Standard_ISO15403.java b/src/main/java/neqsim/standards/gasquality/Standard_ISO15403.java index cf606a981..cf05c1ada 100644 --- a/src/main/java/neqsim/standards/gasquality/Standard_ISO15403.java +++ b/src/main/java/neqsim/standards/gasquality/Standard_ISO15403.java @@ -54,10 +54,8 @@ public double getValue(String returnParameter) { } else if (returnParameter.equals("NM")) { return NM; } else { - neqsim.util.exception.InvalidInputException ex = - new neqsim.util.exception.InvalidInputException(this, "getValue", "returnParameter", - "parameter not supported"); - throw new RuntimeException(ex); + throw new RuntimeException(new neqsim.util.exception.InvalidInputException(this, "getValue", + "returnParameter", "parameter not supported")); } } diff --git a/src/main/java/neqsim/thermo/atomelement/Element.java b/src/main/java/neqsim/thermo/atomelement/Element.java index a4550286b..9dfacdec7 100644 --- a/src/main/java/neqsim/thermo/atomelement/Element.java +++ b/src/main/java/neqsim/thermo/atomelement/Element.java @@ -89,10 +89,8 @@ public String[] getElementNames() { */ public double getNumberOfElements(String elementName) { if (nameArray == null) { - neqsim.util.exception.InvalidInputException ex = - new neqsim.util.exception.InvalidInputException(this, "getNumberOfElements", elementName, - "component not in element database.."); - throw new RuntimeException(ex); + throw new RuntimeException(new neqsim.util.exception.InvalidInputException(this, + "getNumberOfElements", elementName, "component not in element database..")); } for (int i = 0; i < nameArray.length; i++) { if (nameArray[i].equals(elementName)) { diff --git a/src/main/java/neqsim/thermo/characterization/LumpingModel.java b/src/main/java/neqsim/thermo/characterization/LumpingModel.java index 56143069b..4d85337f7 100644 --- a/src/main/java/neqsim/thermo/characterization/LumpingModel.java +++ b/src/main/java/neqsim/thermo/characterization/LumpingModel.java @@ -196,11 +196,9 @@ public void generateLumpedComposition(Characterise charac) { @Override public double getFractionOfHeavyEnd(int i) { if (fractionOfHeavyEnd == null) { - neqsim.util.exception.ThermoException ex = + throw new RuntimeException( new neqsim.util.exception.NotInitializedException(this, "getFractionOfHeavyEnd", - "fractionOfHeavyEnd", "characterisePlusFraction or generateLumpedComposition"); - logger.error(ex.getMessage(), ex); - throw new RuntimeException(ex); + "fractionOfHeavyEnd", "characterisePlusFraction or generateLumpedComposition")); } return fractionOfHeavyEnd[i]; } @@ -312,11 +310,9 @@ public void generateLumpedComposition(Characterise charac) { @Override public double getFractionOfHeavyEnd(int i) { if (fractionOfHeavyEnd == null) { - neqsim.util.exception.ThermoException ex = + throw new RuntimeException( new neqsim.util.exception.NotInitializedException(this, "getFractionOfHeavyEnd", - "fractionOfHeavyEnd", "characterisePlusFraction or generateLumpedComposition"); - logger.error(ex.getMessage(), ex); - throw new RuntimeException(ex); + "fractionOfHeavyEnd", "characterisePlusFraction or generateLumpedComposition")); } return fractionOfHeavyEnd[i]; } @@ -399,7 +395,7 @@ public void generateLumpedComposition(Characterise charac) { pseudoNumber++; String addName = "C" + Integer.toString(starti) + "-" + Integer.toString(i); getLumpedComponentNames()[k] = addName; - //System.out.println("adding " + addName); + // System.out.println("adding " + addName); fractionOfHeavyEnd[k] = zPlus[k] / molFracTot; system.addTBPfraction(addName, totalNumberOfMoles * zPlus[k], Maverage / zPlus[k], denstemp1 / denstemp2); @@ -416,11 +412,9 @@ public void generateLumpedComposition(Characterise charac) { @Override public double getFractionOfHeavyEnd(int i) { if (fractionOfHeavyEnd == null) { - neqsim.util.exception.ThermoException ex = + throw new RuntimeException( new neqsim.util.exception.NotInitializedException(this, "getFractionOfHeavyEnd", - "fractionOfHeavyEnd", "characterisePlusFraction or generateLumpedComposition"); - logger.error(ex.getMessage(), ex); - throw new RuntimeException(ex); + "fractionOfHeavyEnd", "characterisePlusFraction or generateLumpedComposition")); } return fractionOfHeavyEnd[i]; } diff --git a/src/main/java/neqsim/thermo/phase/PhaseGE.java b/src/main/java/neqsim/thermo/phase/PhaseGE.java index 88a25737b..875d89d0c 100644 --- a/src/main/java/neqsim/thermo/phase/PhaseGE.java +++ b/src/main/java/neqsim/thermo/phase/PhaseGE.java @@ -56,8 +56,11 @@ public PhaseGE() { public void init(double temperature, double pressure, double totalNumberOfMoles, double beta, int numberOfComponents, PhaseType pt, int phase) { if (totalNumberOfMoles <= 0) { - new neqsim.util.exception.InvalidInputException(this, "init", "totalNumberOfMoles", - "must be larger than zero."); + // todo: throw this exception? + /* + * new neqsim.util.exception.InvalidInputException(this, "init", "totalNumberOfMoles", + * "must be larger than zero."); + */ } for (int i = 0; i < numberOfComponents; i++) { // todo: Conflating init type and phase type? diff --git a/src/main/java/neqsim/thermo/phase/PhaseSrkCPA.java b/src/main/java/neqsim/thermo/phase/PhaseSrkCPA.java index 9c67e2c3b..85db2c2d0 100644 --- a/src/main/java/neqsim/thermo/phase/PhaseSrkCPA.java +++ b/src/main/java/neqsim/thermo/phase/PhaseSrkCPA.java @@ -956,7 +956,6 @@ public boolean solveX2(int maxIter) { } } - /** *

* Getter for the field dFdNtemp. diff --git a/src/main/java/neqsim/thermo/system/SystemThermo.java b/src/main/java/neqsim/thermo/system/SystemThermo.java index b4595619d..3a5103d53 100644 --- a/src/main/java/neqsim/thermo/system/SystemThermo.java +++ b/src/main/java/neqsim/thermo/system/SystemThermo.java @@ -161,17 +161,13 @@ public SystemThermo() { public SystemThermo(double T, double P, boolean checkForSolids) { this(); if (T < 0.0) { - neqsim.util.exception.InvalidInputException ex = - new neqsim.util.exception.InvalidInputException(this.getClass().getSimpleName(), - "SystemThermo", "T", "is negative"); - throw new RuntimeException(ex); + throw new RuntimeException(new neqsim.util.exception.InvalidInputException(this, + "SystemThermo", "T", "is negative")); } if (P < 0.0) { - neqsim.util.exception.InvalidInputException ex = - new neqsim.util.exception.InvalidInputException(this.getClass().getSimpleName(), - "SystemThermo", "P", "is negative"); - throw new RuntimeException(ex); + throw new RuntimeException(new neqsim.util.exception.InvalidInputException(this, + "SystemThermo", "P", "is negative")); } this.solidPhaseCheck = checkForSolids; @@ -379,9 +375,8 @@ public void addComponent(String componentName, double moles, int phaseNumber) { // Add new component if (moles < 0.0) { String msg = "Negative input number of moles."; - neqsim.util.exception.InvalidInputException ex = - new neqsim.util.exception.InvalidInputException(this, "addComponent", "moles", msg); - throw new RuntimeException(ex); + throw new RuntimeException( + new neqsim.util.exception.InvalidInputException(this, "addComponent", "moles", msg)); } componentNames.add(componentName); @@ -4918,7 +4913,7 @@ public void setTotalFlowRate(double flowRate, String flowunit) { try { init(1); } catch (Exception ex) { - logger.error(ex.getMessage(), ex); + logger.error(ex.getMessage()); } double density = 0.0; if (flowunit.equals("Am3/hr") || flowunit.equals("Am3/min") || flowunit.equals("gallons/min") diff --git a/src/main/java/neqsim/thermodynamicoperations/ThermodynamicOperations.java b/src/main/java/neqsim/thermodynamicoperations/ThermodynamicOperations.java index 3f0b60fe6..28fda5679 100644 --- a/src/main/java/neqsim/thermodynamicoperations/ThermodynamicOperations.java +++ b/src/main/java/neqsim/thermodynamicoperations/ThermodynamicOperations.java @@ -731,14 +731,13 @@ public void VUflash(double Vspec, double Uspec) { * bubblePointTemperatureFlash. *

* - * @throws java.lang.Exception if any. + * @throws neqsim.util.exception.IsNaNException if any. */ - public void bubblePointTemperatureFlash() throws Exception { + public void bubblePointTemperatureFlash() throws IsNaNException { ConstantDutyFlashInterface operation = new BubblePointTemperatureNoDer(system); operation.run(); if (Double.isNaN(system.getTemperature()) || operation.isSuperCritical()) { - throw new neqsim.util.exception.IsNaNException(this.getClass().getSimpleName(), - "bubblePointTemperatureFlash", + throw new neqsim.util.exception.IsNaNException(this, "bubblePointTemperatureFlash", "Could not find solution - possible no bubble point exists"); } } @@ -748,14 +747,13 @@ public void bubblePointTemperatureFlash() throws Exception { * freezingPointTemperatureFlash. *

* - * @throws java.lang.Exception if any. + * @throws neqsim.util.exception.IsNaNException if any. */ - public void freezingPointTemperatureFlash() throws Exception { + public void freezingPointTemperatureFlash() throws IsNaNException { operation = new FreezingPointTemperatureFlash(system); getOperation().run(); if (Double.isNaN(system.getTemperature())) { - throw new neqsim.util.exception.IsNaNException(this.getClass().getSimpleName(), - "freezingPointTemperatureFlash", + throw new neqsim.util.exception.IsNaNException(this, "freezingPointTemperatureFlash", "Could not find solution - possible no freezing point exists"); } } @@ -766,14 +764,13 @@ public void freezingPointTemperatureFlash() throws Exception { *

* * @param phaseName a {@link java.lang.String} object - * @throws java.lang.Exception if any. + * @throws neqsim.util.exception.IsNaNException if any. */ - public void freezingPointTemperatureFlash(String phaseName) throws Exception { + public void freezingPointTemperatureFlash(String phaseName) throws IsNaNException { operation = new FreezingPointTemperatureFlash(system); getOperation().run(); if (Double.isNaN(system.getTemperature())) { - throw new neqsim.util.exception.IsNaNException(this.getClass().getSimpleName(), - "freezingPointTemperatureFlash", + throw new neqsim.util.exception.IsNaNException(this, "freezingPointTemperatureFlash", "Could not find solution - possible no freezing point exists"); } } @@ -783,14 +780,13 @@ public void freezingPointTemperatureFlash(String phaseName) throws Exception { * waterDewPointTemperatureFlash. *

* - * @throws java.lang.Exception if any. + * @throws neqsim.util.exception.IsNaNException if any. */ - public void waterDewPointTemperatureFlash() throws Exception { + public void waterDewPointTemperatureFlash() throws IsNaNException { operation = new WaterDewPointTemperatureFlash(system); getOperation().run(); if (Double.isNaN(system.getTemperature())) { - throw new neqsim.util.exception.IsNaNException(this.getClass().getSimpleName(), - "waterDewPointTemperatureFlash", + throw new neqsim.util.exception.IsNaNException(this, "waterDewPointTemperatureFlash", "Could not find solution - possible no dew point exists"); } } @@ -800,9 +796,9 @@ public void waterDewPointTemperatureFlash() throws Exception { * waterDewPointTemperatureMultiphaseFlash. *

* - * @throws java.lang.Exception if any. + * @throws neqsim.util.exception.IsNaNException if any. */ - public void waterDewPointTemperatureMultiphaseFlash() throws Exception { + public void waterDewPointTemperatureMultiphaseFlash() throws IsNaNException { operation = new WaterDewPointTemperatureMultiphaseFlash(system); getOperation().run(); } @@ -812,9 +808,9 @@ public void waterDewPointTemperatureMultiphaseFlash() throws Exception { * waterPrecipitationTemperature. *

* - * @throws java.lang.Exception if any. + * @throws neqsim.util.exception.IsNaNException if any. */ - public void waterPrecipitationTemperature() throws Exception { + public void waterPrecipitationTemperature() throws IsNaNException { double lowTemperature = 0.0; dewPointTemperatureFlash(); @@ -841,8 +837,7 @@ public void waterPrecipitationTemperature() throws Exception { // TPflash(); if (Double.isNaN(system.getTemperature())) { - throw new neqsim.util.exception.IsNaNException(this.getClass().getSimpleName(), - "waterPrecipitationTemperature", + throw new neqsim.util.exception.IsNaNException(this, "waterPrecipitationTemperature", "Could not find solution - possible no dew point exists"); } } @@ -853,14 +848,14 @@ public void waterPrecipitationTemperature() throws Exception { *

* * @param saltName a {@link java.lang.String} object - * @throws java.lang.Exception if any. + * @throws neqsim.util.exception.IsNaNException if any. */ - public void calcSaltSaturation(String saltName) throws Exception { + public void calcSaltSaturation(String saltName) throws IsNaNException { operation = new CalcSaltSatauration(system, saltName); getOperation().run(); if (Double.isNaN(system.getTemperature())) { - throw new neqsim.util.exception.IsNaNException(this.getClass().getSimpleName(), - "calcSaltSaturation", "Could not find solution - possible no dew point exists"); + throw new neqsim.util.exception.IsNaNException(this, "calcSaltSaturation", + "Could not find solution - possible no dew point exists"); } } @@ -870,15 +865,15 @@ public void calcSaltSaturation(String saltName) throws Exception { *

* * @param phaseNumber a int - * @throws java.lang.Exception if any. + * @throws neqsim.util.exception.IsNaNException if any. */ - public void checkScalePotential(int phaseNumber) throws Exception { + public void checkScalePotential(int phaseNumber) throws IsNaNException { operation = new CheckScalePotential(system, phaseNumber); getOperation().run(); resultTable = getOperation().getResultTable(); if (Double.isNaN(system.getTemperature())) { - throw new neqsim.util.exception.IsNaNException(this.getClass().getSimpleName(), - "checkScalePotential", "Could not find solution - possible no dew point exists"); + throw new neqsim.util.exception.IsNaNException(this, "checkScalePotential", + "Could not find solution - possible no dew point exists"); } } @@ -890,16 +885,16 @@ public void checkScalePotential(int phaseNumber) throws Exception { * @param phaseNumber a int * @param scaleSaltName a {@link java.lang.String} object * @param nameOfIonToBeAdded a {@link java.lang.String} object - * @throws java.lang.Exception if any. + * @throws neqsim.util.exception.IsNaNException if any. */ public void addIonToScaleSaturation(int phaseNumber, String scaleSaltName, - String nameOfIonToBeAdded) throws Exception { + String nameOfIonToBeAdded) throws IsNaNException { operation = new AddIonToScaleSaturation(system, phaseNumber, scaleSaltName, nameOfIonToBeAdded); getOperation().run(); resultTable = getOperation().getResultTable(); if (Double.isNaN(system.getTemperature())) { - throw new neqsim.util.exception.IsNaNException(this.getClass().getSimpleName(), - "addIonToScaleSaturation", "Could not find solution - possible no dew point exists"); + throw new neqsim.util.exception.IsNaNException(this, "addIonToScaleSaturation", + "Could not find solution - possible no dew point exists"); } } @@ -908,14 +903,14 @@ public void addIonToScaleSaturation(int phaseNumber, String scaleSaltName, * hydrateFormationPressure. *

* - * @throws java.lang.Exception if any. + * @throws neqsim.util.exception.IsNaNException if any. */ - public void hydrateFormationPressure() throws Exception { + public void hydrateFormationPressure() throws IsNaNException { operation = new HydrateFormationPressureFlash(system); getOperation().run(); if (Double.isNaN(system.getTemperature())) { - throw new neqsim.util.exception.IsNaNException(this.getClass().getSimpleName(), - "hydrateFormationPressure", "Could not find solution - possible no dew point exists"); + throw new neqsim.util.exception.IsNaNException(this, "hydrateFormationPressure", + "Could not find solution - possible no dew point exists"); } } @@ -924,13 +919,13 @@ public void hydrateFormationPressure() throws Exception { * calcWAT. *

* - * @throws java.lang.Exception if any. + * @throws neqsim.util.exception.IsNaNException if any. */ - public void calcWAT() throws Exception { + public void calcWAT() throws IsNaNException { operation = new WATcalc(system); getOperation().run(); if (Double.isNaN(system.getTemperature())) { - throw new neqsim.util.exception.IsNaNException(this.getClass().getSimpleName(), "calcWAT", + throw new neqsim.util.exception.IsNaNException(this, "calcWAT", "Could not find solution - possible no dew point exists"); } } @@ -983,14 +978,13 @@ public void waitToFinishCalculation() { * calcSolidComlexTemperature. *

* - * @throws java.lang.Exception if any. + * @throws neqsim.util.exception.IsNaNException if any. */ - public void calcSolidComlexTemperature() throws Exception { + public void calcSolidComlexTemperature() throws IsNaNException { operation = new SolidComplexTemperatureCalc(system); getOperation().run(); if (Double.isNaN(system.getTemperature())) { - throw new neqsim.util.exception.IsNaNException(this.getClass().getSimpleName(), - "calcSolidComlexTemperature", + throw new neqsim.util.exception.IsNaNException(this, "calcSolidComlexTemperature", "error in WAT() - could not find solution - possible no dew point exists"); } } @@ -1002,16 +996,15 @@ public void calcSolidComlexTemperature() throws Exception { * * @param comp1 a {@link java.lang.String} object * @param comp2 a {@link java.lang.String} object - * @throws java.lang.Exception if any. + * @throws neqsim.util.exception.IsNaNException if any. */ - public void calcSolidComlexTemperature(String comp1, String comp2) throws Exception { + public void calcSolidComlexTemperature(String comp1, String comp2) throws IsNaNException { if (operation == null) { operation = new SolidComplexTemperatureCalc(system, comp1, comp2); } getOperation().run(); if (Double.isNaN(system.getTemperature())) { - throw new neqsim.util.exception.IsNaNException(this.getClass().getSimpleName(), - "calcSolidComlexTemperature", + throw new neqsim.util.exception.IsNaNException(this, "calcSolidComlexTemperature", "error in WAT() - could not find solution - possible no dew point exists"); } } @@ -1091,10 +1084,8 @@ public double calcTOLHydrateFormationTemperature() { * * @param inhibitorName a {@link java.lang.String} object * @param hydEqTemperature a double - * @throws java.lang.Exception if any. */ - public void hydrateInhibitorConcentration(String inhibitorName, double hydEqTemperature) - throws Exception { + public void hydrateInhibitorConcentration(String inhibitorName, double hydEqTemperature) { operation = new HydrateInhibitorConcentrationFlash(system, inhibitorName, hydEqTemperature); operation.run(); } @@ -1106,10 +1097,8 @@ public void hydrateInhibitorConcentration(String inhibitorName, double hydEqTemp * * @param inhibitorName a {@link java.lang.String} object * @param wtfrac a double - * @throws java.lang.Exception if any. */ - public void hydrateInhibitorConcentrationSet(String inhibitorName, double wtfrac) - throws Exception { + public void hydrateInhibitorConcentrationSet(String inhibitorName, double wtfrac) { operation = new HydrateInhibitorwtFlash(system, inhibitorName, wtfrac); operation.run(); } @@ -1120,9 +1109,8 @@ public void hydrateInhibitorConcentrationSet(String inhibitorName, double wtfrac *

* * @param initialTemperatureGuess a double - * @throws java.lang.Exception if any. */ - public void hydrateFormationTemperature(double initialTemperatureGuess) throws Exception { + public void hydrateFormationTemperature(double initialTemperatureGuess) { system.setTemperature(initialTemperatureGuess); operation = new HydrateFormationTemperatureFlash(system); for (int i = 0; i < system.getPhase(4).getNumberOfComponents(); i++) { @@ -1140,9 +1128,9 @@ public void hydrateFormationTemperature(double initialTemperatureGuess) throws E * hydrateFormationTemperature. *

* - * @throws java.lang.Exception if any. + * @throws neqsim.util.exception.IsNaNException if any. */ - public void hydrateFormationTemperature() throws Exception { + public void hydrateFormationTemperature() throws IsNaNException { // guessing temperature double factor = 1.0; if (system.getPhase(0).hasComponent("methanol")) { @@ -1182,9 +1170,9 @@ public void hydrateFormationTemperature() throws Exception { *

* * @param structure a int - * @throws java.lang.Exception if any. + * @throws neqsim.util.exception.IsNaNException if any. */ - public void hydrateFormationTemperature(int structure) throws Exception { + public void hydrateFormationTemperature(int structure) throws IsNaNException { system.setTemperature(273.0 + 1.0); if (structure == 0) { system.setSolidPhaseCheck("water"); @@ -1204,8 +1192,8 @@ public void hydrateFormationTemperature(int structure) throws Exception { } if (Double.isNaN(system.getTemperature())) { - throw new neqsim.util.exception.IsNaNException(this.getClass().getSimpleName(), - "hydrateFormationTemperature", "Could not find solution - possible no dew point exists"); + throw new neqsim.util.exception.IsNaNException(this, "hydrateFormationTemperature", + "Could not find solution - possible no dew point exists"); } } @@ -1216,10 +1204,8 @@ public void hydrateFormationTemperature(int structure) throws Exception { * * @param minimumPressure a double * @param maximumPressure a double - * @throws java.lang.Exception if any. */ - public void hydrateEquilibriumLine(double minimumPressure, double maximumPressure) - throws Exception { + public void hydrateEquilibriumLine(double minimumPressure, double maximumPressure) { operation = new HydrateEquilibriumLine(system, minimumPressure, maximumPressure); if (!isRunAsThread()) { getOperation().run(); @@ -1272,9 +1258,8 @@ public void calcCricoT(double[] cricondenTherm, double[] cricondenThermX, * * @param minimumPressure a double * @param maximumPressure a double - * @throws java.lang.Exception if any. */ - public void waterDewPointLine(double minimumPressure, double maximumPressure) throws Exception { + public void waterDewPointLine(double minimumPressure, double maximumPressure) { operation = new WaterDewPointEquilibriumLine(system, minimumPressure, maximumPressure); if (!isRunAsThread()) { getOperation().run(); @@ -1314,8 +1299,8 @@ public void bubblePointPressureFlash() throws IsNaNException { system.setBeta(0, 1e-10); operation.run(); if (Double.isNaN(system.getPressure()) || operation.isSuperCritical()) { - throw new neqsim.util.exception.IsNaNException(this.getClass().getSimpleName(), - "bubblePointPressureFlash", "Could not find solution - possible no dew point exists"); + throw new neqsim.util.exception.IsNaNException(this, "bubblePointPressureFlash", + "Could not find solution - possible no dew point exists"); } } @@ -1325,8 +1310,9 @@ public void bubblePointPressureFlash() throws IsNaNException { *

* * @param derivatives a boolean + * @throws neqsim.util.exception.IsNaNException if any. */ - public void bubblePointPressureFlash(boolean derivatives) { + public void bubblePointPressureFlash(boolean derivatives) throws IsNaNException { ConstantDutyFlashInterface operation = null; if (derivatives) { operation = new BubblePointPressureFlashDer(system); @@ -1339,8 +1325,8 @@ public void bubblePointPressureFlash(boolean derivatives) { logger.error(e.getMessage(), e); } if (Double.isNaN(system.getPressure()) || operation.isSuperCritical()) { - new neqsim.util.exception.IsNaNException(this.getClass().getSimpleName(), - "bubblePointPressureFlash", "Could not find solution - possible no bubble point exists"); + throw new neqsim.util.exception.IsNaNException(this, "bubblePointPressureFlash", + "Could not find solution - possible no bubble point exists"); } } @@ -1350,9 +1336,9 @@ public void bubblePointPressureFlash(boolean derivatives) { *

* * @param fraction a double - * @throws java.lang.Exception if any. + * @throws neqsim.util.exception.IsNaNException if any. */ - public void constantPhaseFractionPressureFlash(double fraction) throws Exception { + public void constantPhaseFractionPressureFlash(double fraction) throws IsNaNException { system.init(0); if (fraction < 1e-10) { fraction = 1e-10; @@ -1365,8 +1351,7 @@ public void constantPhaseFractionPressureFlash(double fraction) throws Exception system.setBeta(0, fraction); operation.run(); if (Double.isNaN(system.getPressure()) || operation.isSuperCritical()) { - throw new neqsim.util.exception.IsNaNException(this.getClass().getSimpleName(), - "constantPhaseFractionPressureFlash", + throw new neqsim.util.exception.IsNaNException(this, "constantPhaseFractionPressureFlash", "Could not find solution - possible no dew point exists"); } } @@ -1377,9 +1362,9 @@ public void constantPhaseFractionPressureFlash(double fraction) throws Exception *

* * @param fraction a double - * @throws java.lang.Exception if any. + * @throws neqsim.util.exception.IsNaNException if any. */ - public void constantPhaseFractionTemperatureFlash(double fraction) throws Exception { + public void constantPhaseFractionTemperatureFlash(double fraction) throws IsNaNException { system.init(0); if (fraction < 1e-10) { fraction = 1e-10; @@ -1392,8 +1377,7 @@ public void constantPhaseFractionTemperatureFlash(double fraction) throws Except system.setBeta(0, fraction); operation.run(); if (Double.isNaN(system.getPressure()) || operation.isSuperCritical()) { - throw new neqsim.util.exception.IsNaNException(this.getClass().getSimpleName(), - "constantPhaseFractionTemperatureFlash", + throw new neqsim.util.exception.IsNaNException(this, "constantPhaseFractionTemperatureFlash", "Could not find solution - possible no dew point exists"); } } @@ -1406,10 +1390,10 @@ public void constantPhaseFractionTemperatureFlash(double fraction) throws Except * @param componentName a {@link java.lang.String} object * @param specification a {@link java.lang.String} object * @param spec a double - * @throws java.lang.Exception if any. + * @throws neqsim.util.exception.IsNaNException if any. */ public void dewPointMach(String componentName, String specification, double spec) - throws Exception { + throws IsNaNException { // int componentNumber = // system.getPhase(0).getComponent(componentName).getComponentNumber(); @@ -1418,8 +1402,8 @@ public void dewPointMach(String componentName, String specification, double spec dn = system.getNumberOfMoles() / 1.0e6; system.addComponent(componentName, dn); } else { - throw new neqsim.util.exception.IsNaNException(this.getClass().getSimpleName(), - "dewPointMach", "Specified component is not present in mixture: " + componentName); + throw new neqsim.util.exception.IsNaNException(this, "dewPointMach", + "Specified component is not present in mixture: " + componentName); } double newTemperature = system.getTemperature(); double oldTemperature = newTemperature; @@ -1449,8 +1433,8 @@ public void dewPointMach(String componentName, String specification, double spec } if (Double.isNaN(system.getPressure())) { - throw new neqsim.util.exception.IsNaNException(this.getClass().getSimpleName(), - "dewPointMach", "Could not find solution - possible no dew point exists"); + throw new neqsim.util.exception.IsNaNException(this, "dewPointMach", + "Could not find solution - possible no dew point exists"); } } @@ -1466,8 +1450,8 @@ public void dewPointTemperatureFlash() throws IsNaNException { new neqsim.thermodynamicoperations.flashops.saturationops.DewPointTemperatureFlash(system); operation.run(); if (Double.isNaN(system.getTemperature()) || operation.isSuperCritical()) { - throw new neqsim.util.exception.IsNaNException(this.getClass().getSimpleName(), - "dewPointTemperatureFlash", "Could not find solution - possible no dew point exists"); + throw new neqsim.util.exception.IsNaNException(this, "dewPointTemperatureFlash", + "Could not find solution - possible no dew point exists"); } } @@ -1487,8 +1471,8 @@ public void dewPointTemperatureFlash(boolean derivatives) throws IsNaNException } operation.run(); if (Double.isNaN(system.getTemperature()) || operation.isSuperCritical()) { - throw new neqsim.util.exception.IsNaNException(this.getClass().getSimpleName(), - "dewPointTemperatureFlash", "Could not find solution - possible no dew point exists"); + throw new neqsim.util.exception.IsNaNException(this, "dewPointTemperatureFlash", + "Could not find solution - possible no dew point exists"); } } @@ -1497,16 +1481,16 @@ public void dewPointTemperatureFlash(boolean derivatives) throws IsNaNException * dewPointPressureFlashHC. *

* - * @throws java.lang.Exception if any. + * @throws neqsim.util.exception.IsNaNException if any. */ - public void dewPointPressureFlashHC() throws Exception { + public void dewPointPressureFlashHC() throws IsNaNException { // try{ system.init(0); ConstantDutyFlashInterface operation = new HCdewPointPressureFlash(system); operation.run(); if (Double.isNaN(system.getPressure()) || operation.isSuperCritical()) { - throw new neqsim.util.exception.IsNaNException(this.getClass().getSimpleName(), - "dewPointPressureFlashHC", "Could not find solution - possible no dew point exists"); + throw new neqsim.util.exception.IsNaNException(this, "dewPointPressureFlashHC", + "Could not find solution - possible no dew point exists"); } // } } @@ -1516,16 +1500,16 @@ public void dewPointPressureFlashHC() throws Exception { * dewPointPressureFlash. *

* - * @throws java.lang.Exception if any. + * @throws neqsim.util.exception.IsNaNException if any. */ - public void dewPointPressureFlash() throws Exception { + public void dewPointPressureFlash() throws IsNaNException { // try{ system.init(0); ConstantDutyFlashInterface operation = new DewPointPressureFlash(system); operation.run(); if (Double.isNaN(system.getPressure()) || operation.isSuperCritical()) { - throw new neqsim.util.exception.IsNaNException(this.getClass().getSimpleName(), - "dewPointPressureFlash", "Could not find solution - possible no dew point exists"); + throw new neqsim.util.exception.IsNaNException(this, "dewPointPressureFlash", + "Could not find solution - possible no dew point exists"); } // } } diff --git a/src/main/java/neqsim/thermodynamicoperations/flashops/SysNewtonRhapsonTPflash.java b/src/main/java/neqsim/thermodynamicoperations/flashops/SysNewtonRhapsonTPflash.java index 218070510..f264028d7 100644 --- a/src/main/java/neqsim/thermodynamicoperations/flashops/SysNewtonRhapsonTPflash.java +++ b/src/main/java/neqsim/thermodynamicoperations/flashops/SysNewtonRhapsonTPflash.java @@ -145,9 +145,8 @@ public void init() { *

* * @return a double - * @throws java.lang.Exception if any. */ - public double solve() throws Exception { + public double solve() { try { iter++; init(); diff --git a/src/main/java/neqsim/thermodynamicoperations/flashops/saturationops/BubblePointTemperatureFlash.java b/src/main/java/neqsim/thermodynamicoperations/flashops/saturationops/BubblePointTemperatureFlash.java index 44ae7a1ca..6d99c9480 100644 --- a/src/main/java/neqsim/thermodynamicoperations/flashops/saturationops/BubblePointTemperatureFlash.java +++ b/src/main/java/neqsim/thermodynamicoperations/flashops/saturationops/BubblePointTemperatureFlash.java @@ -1,10 +1,8 @@ package neqsim.thermodynamicoperations.flashops.saturationops; -import neqsim.thermo.system.SystemInterface; - import org.apache.logging.log4j.LogManager; import org.apache.logging.log4j.Logger; - +import neqsim.thermo.system.SystemInterface; /** *

diff --git a/src/main/java/neqsim/util/database/NeqSimDataBase.java b/src/main/java/neqsim/util/database/NeqSimDataBase.java index 635797436..f10345f73 100644 --- a/src/main/java/neqsim/util/database/NeqSimDataBase.java +++ b/src/main/java/neqsim/util/database/NeqSimDataBase.java @@ -228,7 +228,7 @@ public ResultSet getResultSet(String sqlString) { /** {@inheritDoc} */ @Override - public void close() throws Exception { + public void close() throws SQLException { if (databaseConnection != null) { databaseConnection.close(); } diff --git a/src/test/java/neqsim/processsimulation/measurementdevice/FLowInducedVibrationTest.java b/src/test/java/neqsim/processsimulation/measurementdevice/FLowInducedVibrationTest.java index 6403e6d1e..8591c2867 100644 --- a/src/test/java/neqsim/processsimulation/measurementdevice/FLowInducedVibrationTest.java +++ b/src/test/java/neqsim/processsimulation/measurementdevice/FLowInducedVibrationTest.java @@ -1,7 +1,6 @@ package neqsim.processsimulation.measurementdevice; import org.junit.jupiter.api.Assertions; -import org.junit.jupiter.api.BeforeAll; import org.junit.jupiter.api.Test; import neqsim.processsimulation.processequipment.pipeline.PipeBeggsAndBrills; import neqsim.processsimulation.processequipment.stream.Stream; @@ -15,12 +14,6 @@ public class FLowInducedVibrationTest extends neqsim.NeqSimTest { static FlowInducedVibrationAnalyser flowInducedVibrationAnalyser; static FlowInducedVibrationAnalyser flowInducedVibrationAnalyserFRMS; - /** - * @throws java.lang.Exception - */ - @BeforeAll - static void setUpBeforeClass() throws Exception {} - @Test public void testSetUnit() { double pressure = 58.3 + 1.01325; // bara of the separator diff --git a/src/test/java/neqsim/processsimulation/measurementdevice/WellAllocatorTest.java b/src/test/java/neqsim/processsimulation/measurementdevice/WellAllocatorTest.java index 131f119ae..a0316002b 100644 --- a/src/test/java/neqsim/processsimulation/measurementdevice/WellAllocatorTest.java +++ b/src/test/java/neqsim/processsimulation/measurementdevice/WellAllocatorTest.java @@ -2,7 +2,6 @@ import org.apache.logging.log4j.LogManager; import org.apache.logging.log4j.Logger; -import org.junit.jupiter.api.BeforeAll; import org.junit.jupiter.api.Test; import neqsim.processsimulation.processequipment.separator.Separator; import neqsim.processsimulation.processequipment.stream.Stream; @@ -16,12 +15,6 @@ class WellAllocatorTest extends neqsim.NeqSimTest { static Logger logger = LogManager.getLogger(WellAllocatorTest.class); - /** - * @throws java.lang.Exception - */ - @BeforeAll - static void setUpBeforeClass() throws Exception {} - /** * Test method for * {@link neqsim.processsimulation.measurementdevice.WellAllocator#getMeasuredValue(java.lang.String)}. diff --git a/src/test/java/neqsim/processsimulation/measurementdevice/nmVOCTest.java b/src/test/java/neqsim/processsimulation/measurementdevice/nmVOCTest.java index c059535fd..d59c4006a 100644 --- a/src/test/java/neqsim/processsimulation/measurementdevice/nmVOCTest.java +++ b/src/test/java/neqsim/processsimulation/measurementdevice/nmVOCTest.java @@ -16,7 +16,7 @@ public class nmVOCTest extends neqsim.NeqSimTest { * @throws java.lang.Exception */ @BeforeAll - static void setUpBeforeClass() throws Exception { + static void setUpBeforeClass() { SystemInterface thermoSystem = new SystemSrkEos(298.0, 100.0); thermoSystem.addComponent("water", 1.0); thermoSystem.addComponent("methane", 1.0); diff --git a/src/test/java/neqsim/processsimulation/processequipment/compressor/CompressorPropertyProfileTest.java b/src/test/java/neqsim/processsimulation/processequipment/compressor/CompressorPropertyProfileTest.java index 4f5d21920..25b79d425 100644 --- a/src/test/java/neqsim/processsimulation/processequipment/compressor/CompressorPropertyProfileTest.java +++ b/src/test/java/neqsim/processsimulation/processequipment/compressor/CompressorPropertyProfileTest.java @@ -25,7 +25,7 @@ class CompressorPropertyProfileTest extends neqsim.NeqSimTest { * @throws java.lang.Exception if any. */ @BeforeEach - public void setUp() throws Exception { + public void setUp() { testSystem = new SystemSrkEos(298.0, 10.0); testSystem.addComponent("methane", 100.0); processOps = new ProcessSystem(); diff --git a/src/test/java/neqsim/processsimulation/processequipment/compressor/CompressorTest.java b/src/test/java/neqsim/processsimulation/processequipment/compressor/CompressorTest.java index 505cf349a..0f8f0a905 100644 --- a/src/test/java/neqsim/processsimulation/processequipment/compressor/CompressorTest.java +++ b/src/test/java/neqsim/processsimulation/processequipment/compressor/CompressorTest.java @@ -39,7 +39,7 @@ class CompressorTest extends neqsim.NeqSimTest { * @throws java.lang.Exception if any. */ @BeforeEach - public void setUp() throws Exception { + public void setUp() { testSystem = new SystemSrkEos(298.0, 10.0); testSystem.addComponent("methane", 100.0); processOps = new ProcessSystem(); @@ -232,7 +232,7 @@ public void testCompressorWithGERG2008_2() { *

*/ @Test - public void testMultiPhaseCompression() throws Exception { + public void testMultiPhaseCompression() { SystemSrkEos testSystem = new SystemSrkEos(315.0, 10.0); testSystem.addComponent("nitrogen", 2.0); testSystem.addComponent("methane", 50.0); diff --git a/src/test/java/neqsim/processsimulation/processequipment/distillation/DistillationColumnTest.java b/src/test/java/neqsim/processsimulation/processequipment/distillation/DistillationColumnTest.java index a29912d86..4c2414e63 100644 --- a/src/test/java/neqsim/processsimulation/processequipment/distillation/DistillationColumnTest.java +++ b/src/test/java/neqsim/processsimulation/processequipment/distillation/DistillationColumnTest.java @@ -10,7 +10,7 @@ public class DistillationColumnTest { * @throws java.lang.Exception */ @Test - public void testRun() throws Exception { + public void testRun() { neqsim.thermo.system.SystemInterface richTEG = new neqsim.thermo.system.SystemSrkCPAstatoil(273.15 + 42.0, 10.00); richTEG.addComponent("nitrogen", 0.0003884521907420086); @@ -120,7 +120,7 @@ public void testRun() throws Exception { * @throws java.lang.Exception */ @Test - public void deethanizerTest() throws Exception { + public void deethanizerTest() { neqsim.thermo.system.SystemInterface gasToDeethanizer = new neqsim.thermo.system.SystemSrkEos(216, 30.00); gasToDeethanizer.addComponent("nitrogen", 1.67366E-3); @@ -165,7 +165,7 @@ public void deethanizerTest() throws Exception { * @throws java.lang.Exception */ @Test - public void debutanizerTest() throws Exception { + public void debutanizerTest() { neqsim.thermo.system.SystemInterface gasToDbutanizer = new neqsim.thermo.system.SystemSrkEos(289.0, 11.00); gasToDbutanizer.addComponent("nitrogen", 3.09189E-7); diff --git a/src/test/java/neqsim/processsimulation/processequipment/heatexchanger/HeaterTest.java b/src/test/java/neqsim/processsimulation/processequipment/heatexchanger/HeaterTest.java index f0cee87c3..a628fdb72 100644 --- a/src/test/java/neqsim/processsimulation/processequipment/heatexchanger/HeaterTest.java +++ b/src/test/java/neqsim/processsimulation/processequipment/heatexchanger/HeaterTest.java @@ -19,7 +19,7 @@ public class HeaterTest { * @throws java.lang.Exception */ @BeforeEach - public void setUpBeforeClass() throws Exception { + public void setUpBeforeClass() { testSystem = new SystemSrkEos(298.0, 10.0); testSystem.addComponent("methane", 100.0); processOps = new ProcessSystem(); diff --git a/src/test/java/neqsim/processsimulation/processequipment/mixer/MixerTest.java b/src/test/java/neqsim/processsimulation/processequipment/mixer/MixerTest.java index 7a956fc1f..d0c53214f 100644 --- a/src/test/java/neqsim/processsimulation/processequipment/mixer/MixerTest.java +++ b/src/test/java/neqsim/processsimulation/processequipment/mixer/MixerTest.java @@ -22,7 +22,7 @@ class MixerTest { * @throws java.lang.Exception */ @BeforeAll - static void setUpBeforeClass() throws Exception { + static void setUpBeforeClass() { testSystem = new SystemSrkEos(298.15, 1.0); testSystem.addComponent("water", 0.0); testSystem.addComponent("methane", 1.0); diff --git a/src/test/java/neqsim/processsimulation/processequipment/separator/SeparatorTest.java b/src/test/java/neqsim/processsimulation/processequipment/separator/SeparatorTest.java index 01d030886..b465c5cee 100644 --- a/src/test/java/neqsim/processsimulation/processequipment/separator/SeparatorTest.java +++ b/src/test/java/neqsim/processsimulation/processequipment/separator/SeparatorTest.java @@ -24,7 +24,7 @@ class SeparatorTest extends neqsim.NeqSimTest { * @throws java.lang.Exception */ @BeforeEach - public void setUpBeforeClass() throws Exception { + public void setUpBeforeClass() { testSystem = new SystemSrkCPAstatoil(298.0, 10.0); testSystem.addComponent("methane", 100.0); testSystem.addComponent("ethane", 10.0); diff --git a/src/test/java/neqsim/processsimulation/processequipment/splitter/ComponentSplitterTest.java b/src/test/java/neqsim/processsimulation/processequipment/splitter/ComponentSplitterTest.java index 41f2863ab..e12586a09 100644 --- a/src/test/java/neqsim/processsimulation/processequipment/splitter/ComponentSplitterTest.java +++ b/src/test/java/neqsim/processsimulation/processequipment/splitter/ComponentSplitterTest.java @@ -24,7 +24,7 @@ class ComponentSplitterTest { ProcessSystem processOps = null; @BeforeEach - public void setUpBeforeClass() throws Exception { + public void setUpBeforeClass() { testSystem = new SystemSrkEos(298.0, 10.0); testSystem.addComponent("methane", 100.0); testSystem.addComponent("ethane", 10.0); diff --git a/src/test/java/neqsim/processsimulation/processequipment/stream/StreamTest.java b/src/test/java/neqsim/processsimulation/processequipment/stream/StreamTest.java index 8fe0f0fd6..9205f2668 100644 --- a/src/test/java/neqsim/processsimulation/processequipment/stream/StreamTest.java +++ b/src/test/java/neqsim/processsimulation/processequipment/stream/StreamTest.java @@ -23,7 +23,7 @@ class StreamTest extends neqsim.NeqSimTest { * @throws java.lang.Exception */ @BeforeEach - public void setUpBeforeClass() throws Exception { + public void setUpBeforeClass() { testSystem = new SystemSrkEos(298.0, 10.0); testSystem.addComponent("methane", 100.0); processOps = new ProcessSystem(); diff --git a/src/test/java/neqsim/processsimulation/processequipment/stream/VirtualStreamTest.java b/src/test/java/neqsim/processsimulation/processequipment/stream/VirtualStreamTest.java index 8cc3ebca6..8cf0b72f0 100644 --- a/src/test/java/neqsim/processsimulation/processequipment/stream/VirtualStreamTest.java +++ b/src/test/java/neqsim/processsimulation/processequipment/stream/VirtualStreamTest.java @@ -19,7 +19,7 @@ public class VirtualStreamTest { * @throws java.lang.Exception */ @BeforeEach - public void setUpBeforeClass() throws Exception { + public void setUpBeforeClass() { testSystem = new SystemSrkEos(298.0, 10.0); testSystem.addComponent("methane", 100.0); testSystem.addComponent("ethane", 100.0); diff --git a/src/test/java/neqsim/processsimulation/util/example/process1Test.java b/src/test/java/neqsim/processsimulation/util/example/process1Test.java index de7c93c41..29b54c02d 100644 --- a/src/test/java/neqsim/processsimulation/util/example/process1Test.java +++ b/src/test/java/neqsim/processsimulation/util/example/process1Test.java @@ -1,52 +1,44 @@ package neqsim.processsimulation.util.example; -import org.junit.jupiter.api.AfterEach; import org.junit.jupiter.api.BeforeAll; import org.junit.jupiter.api.Test; import neqsim.processsimulation.processequipment.stream.Stream; class process1Test extends neqsim.NeqSimTest { - static neqsim.thermo.system.SystemInterface testSystem; - static neqsim.processsimulation.processsystem.ProcessSystem operations; - - /** - *

- * setUp. - *

- */ - @BeforeAll - public static void setUp() { - testSystem = new neqsim.thermo.system.SystemSrkCPA((273.15 + 25.0), 50.00); - testSystem.addComponent("methane", 180.00); - testSystem.addComponent("ethane", 10.00); - testSystem.addComponent("propane", 1.00); - testSystem.createDatabase(true); - testSystem.setMultiPhaseCheck(true); - testSystem.setMixingRule(2); - - Stream stream_1 = new Stream("Stream1", testSystem); - - neqsim.processsimulation.processequipment.compressor.Compressor compr = - new neqsim.processsimulation.processequipment.compressor.Compressor("compr", - stream_1); - compr.setOutletPressure(80.0); - compr.setPolytropicEfficiency(0.9); - compr.setIsentropicEfficiency(0.9); - compr.setUsePolytropicCalc(true); - - operations = new neqsim.processsimulation.processsystem.ProcessSystem(); - operations.add(stream_1); - operations.add(compr); - } - - /** - * @throws Exception - */ - @AfterEach - void tearDown() throws Exception {} - - @Test - void runTest() { - operations.run(); - } + static neqsim.thermo.system.SystemInterface testSystem; + static neqsim.processsimulation.processsystem.ProcessSystem operations; + + /** + *

+ * setUp. + *

+ */ + @BeforeAll + public static void setUp() { + testSystem = new neqsim.thermo.system.SystemSrkCPA((273.15 + 25.0), 50.00); + testSystem.addComponent("methane", 180.00); + testSystem.addComponent("ethane", 10.00); + testSystem.addComponent("propane", 1.00); + testSystem.createDatabase(true); + testSystem.setMultiPhaseCheck(true); + testSystem.setMixingRule(2); + + Stream stream_1 = new Stream("Stream1", testSystem); + + neqsim.processsimulation.processequipment.compressor.Compressor compr = + new neqsim.processsimulation.processequipment.compressor.Compressor("compr", stream_1); + compr.setOutletPressure(80.0); + compr.setPolytropicEfficiency(0.9); + compr.setIsentropicEfficiency(0.9); + compr.setUsePolytropicCalc(true); + + operations = new neqsim.processsimulation.processsystem.ProcessSystem(); + operations.add(stream_1); + operations.add(compr); + } + + @Test + void runTest() { + operations.run(); + } } diff --git a/src/test/java/neqsim/pvtsimulation/simulation/SaturationPressureTest.java b/src/test/java/neqsim/pvtsimulation/simulation/SaturationPressureTest.java index c3aac46b0..123f3217b 100644 --- a/src/test/java/neqsim/pvtsimulation/simulation/SaturationPressureTest.java +++ b/src/test/java/neqsim/pvtsimulation/simulation/SaturationPressureTest.java @@ -8,7 +8,7 @@ class SaturationPressureTest extends neqsim.NeqSimTest { @BeforeAll - static void setUpBeforeClass() throws Exception {} + static void setUpBeforeClass() {} @Test void testCalcSaturationPressure() { diff --git a/src/test/java/neqsim/pvtsimulation/simulation/SaturationTemperatureTest.java b/src/test/java/neqsim/pvtsimulation/simulation/SaturationTemperatureTest.java index a2ca5424d..8671fdc19 100644 --- a/src/test/java/neqsim/pvtsimulation/simulation/SaturationTemperatureTest.java +++ b/src/test/java/neqsim/pvtsimulation/simulation/SaturationTemperatureTest.java @@ -2,7 +2,6 @@ import static org.junit.jupiter.api.Assertions.assertEquals; import static org.junit.jupiter.api.Assertions.assertTrue; -import org.junit.jupiter.api.BeforeAll; import org.junit.jupiter.api.DisplayName; import org.junit.jupiter.api.Test; import neqsim.thermo.system.SystemInterface; @@ -14,12 +13,6 @@ * @author ESOL */ class SaturationTemperatureTest extends neqsim.NeqSimTest { - /** - * @throws java.lang.Exception - */ - @BeforeAll - static void setUpBeforeClass() throws Exception {} - /** * Test method for * {@link neqsim.pvtsimulation.simulation.SaturationTemperature#calcSaturationTemperature()}. diff --git a/src/test/java/neqsim/standards/gasquality/Standard_ISO15403Test.java b/src/test/java/neqsim/standards/gasquality/Standard_ISO15403Test.java index 78c205667..cafce6227 100644 --- a/src/test/java/neqsim/standards/gasquality/Standard_ISO15403Test.java +++ b/src/test/java/neqsim/standards/gasquality/Standard_ISO15403Test.java @@ -16,7 +16,7 @@ public class Standard_ISO15403Test { * @throws java.lang.Exception */ @BeforeAll - static void setUpBeforeClass() throws Exception { + static void setUpBeforeClass() { testSystem = new SystemSrkEos(273.15 + 20.0, 1.0); testSystem.addComponent("methane", 0.82); testSystem.addComponent("ethane", 0.1); diff --git a/src/test/java/neqsim/standards/gasquality/Standard_ISO6976Test.java b/src/test/java/neqsim/standards/gasquality/Standard_ISO6976Test.java index ee20348dd..1812a018e 100644 --- a/src/test/java/neqsim/standards/gasquality/Standard_ISO6976Test.java +++ b/src/test/java/neqsim/standards/gasquality/Standard_ISO6976Test.java @@ -19,7 +19,7 @@ class Standard_ISO6976Test extends neqsim.NeqSimTest { * @throws java.lang.Exception */ @BeforeAll - static void setUpBeforeClass() throws Exception { + static void setUpBeforeClass() { testSystem = new SystemSrkEos(273.15 + 20.0, 1.0); testSystem.addComponent("methane", 0.931819); testSystem.addComponent("ethane", 0.025618); diff --git a/src/test/java/neqsim/standards/gasquality/Standard_ISO6976_2016_Test.java b/src/test/java/neqsim/standards/gasquality/Standard_ISO6976_2016_Test.java index 36f19c84b..06f7ba338 100644 --- a/src/test/java/neqsim/standards/gasquality/Standard_ISO6976_2016_Test.java +++ b/src/test/java/neqsim/standards/gasquality/Standard_ISO6976_2016_Test.java @@ -19,7 +19,7 @@ class Standard_ISO6976_2016_Test extends neqsim.NeqSimTest { * @throws java.lang.Exception */ @BeforeAll - static void setUpBeforeClass() throws Exception { + static void setUpBeforeClass() { testSystem = new SystemSrkEos(273.15 + 20.0, 1.0); testSystem.addComponent("methane", 0.931819); testSystem.addComponent("ethane", 0.025618); diff --git a/src/test/java/neqsim/standards/salescontract/BaseContractTest.java b/src/test/java/neqsim/standards/salescontract/BaseContractTest.java index c4a641f6f..41b76a81c 100644 --- a/src/test/java/neqsim/standards/salescontract/BaseContractTest.java +++ b/src/test/java/neqsim/standards/salescontract/BaseContractTest.java @@ -18,7 +18,7 @@ class BaseContractTest extends neqsim.NeqSimTest { * @throws java.lang.Exception */ @BeforeAll - static void testRunCheck() throws Exception { + static void testRunCheck() { testSystem = new SystemGERGwaterEos(273.15 - 5.0, 20.0); testSystem.addComponent("methane", 0.9); testSystem.addComponent("ethane", 0.04); diff --git a/src/test/java/neqsim/thermo/component/AmmoniaTest.java b/src/test/java/neqsim/thermo/component/AmmoniaTest.java index adaf085eb..39e6e767b 100644 --- a/src/test/java/neqsim/thermo/component/AmmoniaTest.java +++ b/src/test/java/neqsim/thermo/component/AmmoniaTest.java @@ -15,7 +15,7 @@ public class AmmoniaTest extends neqsim.NeqSimTest { * @throws java.lang.Exception */ @BeforeAll - static void setUpBeforeClass() throws Exception { + static void setUpBeforeClass() { thermoSystem = new SystemSrkEos(298.0, ThermodynamicConstantsInterface.referencePressure); thermoSystem.addComponent("ammonia", 1.0); thermoSystem.init(0); diff --git a/src/test/java/neqsim/thermo/component/ComponentHydrateGFTest.java b/src/test/java/neqsim/thermo/component/ComponentHydrateGFTest.java index 2be981574..8aff402d4 100644 --- a/src/test/java/neqsim/thermo/component/ComponentHydrateGFTest.java +++ b/src/test/java/neqsim/thermo/component/ComponentHydrateGFTest.java @@ -22,7 +22,7 @@ class ComponentHydrateGFTest extends neqsim.NeqSimTest { * @throws java.lang.Exception */ @BeforeAll - static void setUpBeforeClass() throws Exception { + static void setUpBeforeClass() { thermoSystem = new SystemSrkCPAstatoil(298.0, 100.0); thermoSystem.addComponent("methane", 11.0); thermoSystem.addComponent("CO2", 1.0); diff --git a/src/test/java/neqsim/thermo/component/NewComponentTest.java b/src/test/java/neqsim/thermo/component/NewComponentTest.java index 4fbad4dfa..be89520e8 100644 --- a/src/test/java/neqsim/thermo/component/NewComponentTest.java +++ b/src/test/java/neqsim/thermo/component/NewComponentTest.java @@ -2,7 +2,6 @@ import static org.junit.jupiter.api.Assertions.assertEquals; import org.junit.jupiter.api.Assertions; -import org.junit.jupiter.api.BeforeAll; import org.junit.jupiter.api.Test; import neqsim.thermo.ThermodynamicConstantsInterface; import neqsim.thermo.phase.PhaseSrkEos; @@ -13,12 +12,6 @@ public class NewComponentTest extends neqsim.NeqSimTest { static SystemInterface thermoSystem = null; - /** - * @throws java.lang.Exception - */ - @BeforeAll - static void setUpBeforeClass() throws Exception {} - @Test public void createComponentTest() { PhaseSrkEos p = new PhaseSrkEos(); diff --git a/src/test/java/neqsim/thermo/util/readwrite/EclipseFluidReadWriteTest.java b/src/test/java/neqsim/thermo/util/readwrite/EclipseFluidReadWriteTest.java index bcccb7a3f..b14f71754 100644 --- a/src/test/java/neqsim/thermo/util/readwrite/EclipseFluidReadWriteTest.java +++ b/src/test/java/neqsim/thermo/util/readwrite/EclipseFluidReadWriteTest.java @@ -2,7 +2,6 @@ import java.io.File; import java.io.IOException; -import org.junit.jupiter.api.BeforeAll; import org.junit.jupiter.api.Test; import neqsim.thermodynamicoperations.ThermodynamicOperations; @@ -19,12 +18,6 @@ class EclipseFluidReadWriteTest extends neqsim.NeqSimTest { String fileA17 = file.getAbsolutePath() + "/A-17.E300"; String fileA19 = file.getAbsolutePath() + "/A-19.E300"; - /** - * @throws java.lang.Exception - */ - @BeforeAll - static void setUpBeforeClass() throws Exception {} - /** * Test method for * {@link neqsim.thermo.util.readwrite.EclipseFluidReadWrite#read(java.lang.String)}. diff --git a/src/test/java/neqsim/thermodynamicoperations/flashops/Degasser.java b/src/test/java/neqsim/thermodynamicoperations/flashops/Degasser.java index d3ef05e85..442d0ee5c 100644 --- a/src/test/java/neqsim/thermodynamicoperations/flashops/Degasser.java +++ b/src/test/java/neqsim/thermodynamicoperations/flashops/Degasser.java @@ -18,7 +18,7 @@ class Degasser { * @throws java.lang.Exception */ @BeforeEach - void setUp() throws Exception { + void setUp() { testSystem = new neqsim.thermo.system.SystemPrEos(243.15, 300.0); testSystem.addComponent("methane", 90.0); testSystem.addComponent("ethane", 0.0); diff --git a/src/test/java/neqsim/thermodynamicoperations/flashops/PHFlashGERG2008Test.java b/src/test/java/neqsim/thermodynamicoperations/flashops/PHFlashGERG2008Test.java index c92f95721..1b28ae682 100644 --- a/src/test/java/neqsim/thermodynamicoperations/flashops/PHFlashGERG2008Test.java +++ b/src/test/java/neqsim/thermodynamicoperations/flashops/PHFlashGERG2008Test.java @@ -16,7 +16,7 @@ class PHFlashGERG2008Test { * @throws java.lang.Exception */ @BeforeEach - void setUp() throws Exception { + void setUp() { testSystem = new neqsim.thermo.system.SystemPrEos(298.0, 50.0); testSystem.addComponent("nitrogen", 0.01); testSystem.addComponent("CO2", 0.01); diff --git a/src/test/java/neqsim/thermodynamicoperations/flashops/PHFlashTest.java b/src/test/java/neqsim/thermodynamicoperations/flashops/PHFlashTest.java index aad34d66f..59cd53f89 100644 --- a/src/test/java/neqsim/thermodynamicoperations/flashops/PHFlashTest.java +++ b/src/test/java/neqsim/thermodynamicoperations/flashops/PHFlashTest.java @@ -16,7 +16,7 @@ class PHFlashTest { * @throws java.lang.Exception */ @BeforeEach - void setUp() throws Exception { + void setUp() { testSystem = new neqsim.thermo.system.SystemPrEos(243.15, 300.0); testSystem.addComponent("methane", 90.0); testSystem.addComponent("ethane", 0.0); diff --git a/src/test/java/neqsim/thermodynamicoperations/flashops/PSFlashGERG2008Test.java b/src/test/java/neqsim/thermodynamicoperations/flashops/PSFlashGERG2008Test.java index 4d32ddb7b..04a248868 100644 --- a/src/test/java/neqsim/thermodynamicoperations/flashops/PSFlashGERG2008Test.java +++ b/src/test/java/neqsim/thermodynamicoperations/flashops/PSFlashGERG2008Test.java @@ -16,7 +16,7 @@ class PSFlashGERG2008Test { * @throws java.lang.Exception */ @BeforeEach - void setUp() throws Exception { + void setUp() { testSystem = new neqsim.thermo.system.SystemPrEos(298.0, 10.0); testSystem.addComponent("nitrogen", 0.01); testSystem.addComponent("CO2", 0.01); diff --git a/src/test/java/neqsim/thermodynamicoperations/flashops/TPFlashTest.java b/src/test/java/neqsim/thermodynamicoperations/flashops/TPFlashTest.java index 1ce8297c5..26c5d8cd3 100644 --- a/src/test/java/neqsim/thermodynamicoperations/flashops/TPFlashTest.java +++ b/src/test/java/neqsim/thermodynamicoperations/flashops/TPFlashTest.java @@ -16,7 +16,7 @@ class TPFlashTest { * @throws java.lang.Exception */ @BeforeEach - void setUp() throws Exception { + void setUp() { testSystem = new neqsim.thermo.system.SystemPrEos(243.15, 300.0); testSystem.addComponent("nitrogen", 1.0); testSystem.addComponent("methane", 90.0); @@ -135,8 +135,7 @@ void testRun6() { testOps = new ThermodynamicOperations(testSystem5); testOps.TPflash(); testSystem5.initProperties(); - assertEquals(0.2838675588923609 - , testSystem5.getBeta(), 1e-6); + assertEquals(0.2838675588923609, testSystem5.getBeta(), 1e-6); assertEquals(3, testSystem5.getNumberOfPhases()); } diff --git a/src/test/java/neqsim/thermodynamicoperations/flashops/TPFlashTestWellFluid.java b/src/test/java/neqsim/thermodynamicoperations/flashops/TPFlashTestWellFluid.java index 82165c16a..4004f6b9d 100644 --- a/src/test/java/neqsim/thermodynamicoperations/flashops/TPFlashTestWellFluid.java +++ b/src/test/java/neqsim/thermodynamicoperations/flashops/TPFlashTestWellFluid.java @@ -16,7 +16,7 @@ class TPFlashTestWellFluid { * @throws java.lang.Exception */ @BeforeEach - void setUp() throws Exception { + void setUp() { wellFluid = new neqsim.thermo.system.SystemSrkCPAstatoil(273.15 + 30.0, 65.00); wellFluid.addComponent("oxygen", 0.0); wellFluid.addComponent("H2S", 0.00008); @@ -69,7 +69,6 @@ void testTPflashComp2() { 8.96e-3, 1.539e-3, 5.9921e-1}); testOps = new ThermodynamicOperations(wellFluid); testOps.TPflash(); - assertEquals(1.432253736300898 - , wellFluid.getPhase(0).getDensity(), 1e-5); + assertEquals(1.432253736300898, wellFluid.getPhase(0).getDensity(), 1e-5); } } diff --git a/src/test/java/neqsim/thermodynamicoperations/flashops/TVFlashTest.java b/src/test/java/neqsim/thermodynamicoperations/flashops/TVFlashTest.java index d8bb5d87f..8584361ac 100644 --- a/src/test/java/neqsim/thermodynamicoperations/flashops/TVFlashTest.java +++ b/src/test/java/neqsim/thermodynamicoperations/flashops/TVFlashTest.java @@ -23,7 +23,7 @@ class TVFlashTest { * @throws java.lang.Exception */ @BeforeEach - void setUp() throws Exception { + void setUp() { testSystem = new neqsim.thermo.system.SystemUMRPRUMCEos(293.15, 0.1); testSystem.addComponent("methane", 0.0); testSystem.addComponent("ethane", 0.0); diff --git a/src/test/java/neqsim/thermodynamicoperations/flashops/VUFlashTest.java b/src/test/java/neqsim/thermodynamicoperations/flashops/VUFlashTest.java index 15ade68ec..de9cb3f31 100644 --- a/src/test/java/neqsim/thermodynamicoperations/flashops/VUFlashTest.java +++ b/src/test/java/neqsim/thermodynamicoperations/flashops/VUFlashTest.java @@ -3,7 +3,6 @@ import static org.junit.jupiter.api.Assertions.assertEquals; import org.apache.logging.log4j.LogManager; import org.apache.logging.log4j.Logger; -import org.junit.jupiter.api.BeforeEach; import org.junit.jupiter.api.Test; import neqsim.thermodynamicoperations.ThermodynamicOperations; @@ -17,14 +16,6 @@ class VUFlashTest { static neqsim.thermo.system.SystemInterface testSystem2 = null; static ThermodynamicOperations testOps = null; - /** - * Sets up test system. - * - * @throws java.lang.Exception - */ - @BeforeEach - void setUp() throws Exception {} - @Test void testVUflash() { testSystem = new neqsim.thermo.system.SystemUMRPRUMCEos(293.15, 23.5); diff --git a/src/test/java/neqsim/thermodynamicoperations/flashops/WaxFlashTest.java b/src/test/java/neqsim/thermodynamicoperations/flashops/WaxFlashTest.java index 1e92fb121..4fe2b79e8 100644 --- a/src/test/java/neqsim/thermodynamicoperations/flashops/WaxFlashTest.java +++ b/src/test/java/neqsim/thermodynamicoperations/flashops/WaxFlashTest.java @@ -22,7 +22,7 @@ class WaxFlashTest { * @throws java.lang.Exception */ @BeforeEach - void setUp() throws Exception { + void setUp() { NeqSimDataBase.setCreateTemporaryTables(true); testSystem = new SystemSrkEos(273.0 + 30, 50.0); testSystem.addComponent("CO2", 0.018);