diff --git a/src/main/java/neqsim/chemicalReactions/chemicalEquilibriaum/ChemicalEquilibrium.java b/src/main/java/neqsim/chemicalReactions/chemicalEquilibriaum/ChemicalEquilibrium.java index b299bd485d..ab3115c7ce 100644 --- a/src/main/java/neqsim/chemicalReactions/chemicalEquilibriaum/ChemicalEquilibrium.java +++ b/src/main/java/neqsim/chemicalReactions/chemicalEquilibriaum/ChemicalEquilibrium.java @@ -269,7 +269,6 @@ public void updateMoles() { phasenumb); } - // changeMoles += n_mol[i] - // system.getPhase(phasenumb).getComponents()[components[i].getComponentNumber()] // .getNumberOfMolesInPhase(); diff --git a/src/main/java/neqsim/fluidMechanics/flowNode/twoPhaseNode/TwoPhaseFlowNode.java b/src/main/java/neqsim/fluidMechanics/flowNode/twoPhaseNode/TwoPhaseFlowNode.java index be313ef672..bf2bb61b58 100644 --- a/src/main/java/neqsim/fluidMechanics/flowNode/twoPhaseNode/TwoPhaseFlowNode.java +++ b/src/main/java/neqsim/fluidMechanics/flowNode/twoPhaseNode/TwoPhaseFlowNode.java @@ -94,7 +94,6 @@ public double initVelocity() { /** {@inheritDoc} */ @Override public void initFlowCalc() { - initVelocity(); init(); @@ -402,7 +401,9 @@ public void update() { } /** - *
update.
+ *+ * update. + *
* * @param deltaTime a double */ @@ -424,6 +425,5 @@ public void update(double deltaTime) { getBulkSystem().initBeta(); getBulkSystem().init_x_y(); getBulkSystem().initProperties(); - } } diff --git a/src/main/java/neqsim/processSimulation/controllerDevice/ControllerDeviceBaseClass.java b/src/main/java/neqsim/processSimulation/controllerDevice/ControllerDeviceBaseClass.java index 78f8766259..e05e29633a 100644 --- a/src/main/java/neqsim/processSimulation/controllerDevice/ControllerDeviceBaseClass.java +++ b/src/main/java/neqsim/processSimulation/controllerDevice/ControllerDeviceBaseClass.java @@ -55,7 +55,6 @@ public ControllerDeviceBaseClass() { this("controller"); } - /** {@inheritDoc} */ @Override public void setActive(boolean isActive) { diff --git a/src/main/java/neqsim/processSimulation/measurementDevice/MultiPhaseMeter.java b/src/main/java/neqsim/processSimulation/measurementDevice/MultiPhaseMeter.java index 7db456a340..ef8ecc9a16 100644 --- a/src/main/java/neqsim/processSimulation/measurementDevice/MultiPhaseMeter.java +++ b/src/main/java/neqsim/processSimulation/measurementDevice/MultiPhaseMeter.java @@ -254,7 +254,6 @@ public double getMeasuredValue(String measurement, String unit) { double GOR_via_corrected_volume = tempFluid.getPhase("gas").getCorrectedVolume() / tempFluid.getPhase("oil").getCorrectedVolume(); - System.out.println("Stream 2 (results inside MPM) " + " GOR sm3/sm3 " + GOR_in_sm3_sm3 + " GOR Corrected by volume " + GOR_via_corrected_volume); diff --git a/src/main/java/neqsim/processSimulation/measurementDevice/WaterDewPointAnalyser.java b/src/main/java/neqsim/processSimulation/measurementDevice/WaterDewPointAnalyser.java index 6ab3770606..f18c4629fe 100644 --- a/src/main/java/neqsim/processSimulation/measurementDevice/WaterDewPointAnalyser.java +++ b/src/main/java/neqsim/processSimulation/measurementDevice/WaterDewPointAnalyser.java @@ -31,7 +31,6 @@ public class WaterDewPointAnalyser extends StreamMeasurementDeviceBaseClass { */ public WaterDewPointAnalyser(StreamInterface stream) { this("WaterDewPointAnalyser", stream); - } /** diff --git a/src/main/java/neqsim/processSimulation/measurementDevice/simpleFlowRegime/Pipe.java b/src/main/java/neqsim/processSimulation/measurementDevice/simpleFlowRegime/Pipe.java index 44d1dd3310..b797fb517b 100644 --- a/src/main/java/neqsim/processSimulation/measurementDevice/simpleFlowRegime/Pipe.java +++ b/src/main/java/neqsim/processSimulation/measurementDevice/simpleFlowRegime/Pipe.java @@ -175,5 +175,4 @@ public double getAngle(String unit) { public double getArea() { return pi * Math.pow(this.internalDiameter, 2) / 4; } - } diff --git a/src/main/java/neqsim/processSimulation/measurementDevice/simpleFlowRegime/SevereSlugAnalyser.java b/src/main/java/neqsim/processSimulation/measurementDevice/simpleFlowRegime/SevereSlugAnalyser.java index 7e435f2751..2bad207261 100644 --- a/src/main/java/neqsim/processSimulation/measurementDevice/simpleFlowRegime/SevereSlugAnalyser.java +++ b/src/main/java/neqsim/processSimulation/measurementDevice/simpleFlowRegime/SevereSlugAnalyser.java @@ -458,7 +458,6 @@ public double stratifiedHoldUp(FluidSevereSlug fluid, Pipe pipe, SevereSlugAnaly logger.debug("Could not find solution for stratified flow holdup"); } else { holdUp = (gamma - 0.5 * Math.sin(2 * gamma)) / (pi); - } return holdUp; } @@ -754,7 +753,6 @@ public static void main(String[] args) { // inputStream.setFlowRate(0.00001, "MSm^3/day"); // System.out.println(inputStream.getFlowRate("kg/sec")); // mySevereSlug4.getPredictedFlowRegime(); - } // To be implemented diff --git a/src/main/java/neqsim/processSimulation/mechanicalDesign/MechanicalDesign.java b/src/main/java/neqsim/processSimulation/mechanicalDesign/MechanicalDesign.java index 7579c31012..1713d29cae 100644 --- a/src/main/java/neqsim/processSimulation/mechanicalDesign/MechanicalDesign.java +++ b/src/main/java/neqsim/processSimulation/mechanicalDesign/MechanicalDesign.java @@ -1188,6 +1188,4 @@ public boolean equals(Object obj) { && Double.doubleToLongBits(weigthVesselShell) == Double .doubleToLongBits(other.weigthVesselShell); } - - } diff --git a/src/main/java/neqsim/processSimulation/processEquipment/ProcessEquipmentInterface.java b/src/main/java/neqsim/processSimulation/processEquipment/ProcessEquipmentInterface.java index fc1507259a..a6262aedf9 100644 --- a/src/main/java/neqsim/processSimulation/processEquipment/ProcessEquipmentInterface.java +++ b/src/main/java/neqsim/processSimulation/processEquipment/ProcessEquipmentInterface.java @@ -28,9 +28,7 @@ public interface ProcessEquipmentInterface extends SimulationInterface { * Get ainitMechanicalDesign
for the equipment.
*
**/
- default void initMechanicalDesign() {
-
- }
+ default void initMechanicalDesign() {}
/**
* diff --git a/src/main/java/neqsim/processSimulation/processEquipment/compressor/CompressorChartGenerator.java b/src/main/java/neqsim/processSimulation/processEquipment/compressor/CompressorChartGenerator.java index 6aa50411b0..7645dff291 100644 --- a/src/main/java/neqsim/processSimulation/processEquipment/compressor/CompressorChartGenerator.java +++ b/src/main/java/neqsim/processSimulation/processEquipment/compressor/CompressorChartGenerator.java @@ -51,7 +51,6 @@ public CompressorChart generateCompressorChart(String generationOption) { compChart.setHeadUnit("kJ/kg"); compChart.setCurves(chartConditions, speed, flow, head, polyEff); - // Generating surge curve double minFlowSurgeFlow = 0.7 * refflow; double refSurgeFlow = 0.8 * refflow; diff --git a/src/main/java/neqsim/processSimulation/processEquipment/distillation/DistillationColumn.java b/src/main/java/neqsim/processSimulation/processEquipment/distillation/DistillationColumn.java index f945e8de79..b6dc5b6ce0 100644 --- a/src/main/java/neqsim/processSimulation/processEquipment/distillation/DistillationColumn.java +++ b/src/main/java/neqsim/processSimulation/processEquipment/distillation/DistillationColumn.java @@ -56,8 +56,8 @@ public class DistillationColumn extends ProcessEquipmentBaseClass implements Dis *
* * @param numberOfTraysLocal a int - * @param hasReboiler a boolean - * @param hasCondenser a boolean + * @param hasReboiler a boolean + * @param hasCondenser a boolean */ public DistillationColumn(int numberOfTraysLocal, boolean hasReboiler, boolean hasCondenser) { super("DistillationColumn"); @@ -86,9 +86,8 @@ public DistillationColumn(int numberOfTraysLocal, boolean hasReboiler, boolean h * addFeedStream. * * - * @param inputStream a - * {@link neqsim.processSimulation.processEquipment.stream.StreamInterface} - * object + * @param inputStream a {@link neqsim.processSimulation.processEquipment.stream.StreamInterface} + * object * @param feedTrayNumber a int */ public void addFeedStream(StreamInterface inputStream, int feedTrayNumber) { @@ -158,15 +157,16 @@ public void init() { double feedTrayTemperature = getTray(getFeedTrayNumber()).getTemperature(); if (trays.get(numberOfTrays - 1).getNumberOfInputStreams() > 0) { - condenserTemperature = ((MixerInterface) trays.get(numberOfTrays - 1)).getThermoSystem().getTemperature(); + condenserTemperature = + ((MixerInterface) trays.get(numberOfTrays - 1)).getThermoSystem().getTemperature(); } else { condenserTemperature = feedTrayTemperature - 1.0; } reboilerTemperature = ((MixerInterface) trays.get(0)).getThermoSystem().getTemperature(); - double deltaTempCondenser = (feedTrayTemperature - condenserTemperature) - / (numberOfTrays * 1.0 - feedTrayNumber - 1); + double deltaTempCondenser = + (feedTrayTemperature - condenserTemperature) / (numberOfTrays * 1.0 - feedTrayNumber - 1); double deltaTempReboiler = (reboilerTemperature - feedTrayTemperature) / (feedTrayNumber * 1.0); double delta = 0; @@ -199,7 +199,6 @@ public void init() { ((Runnable) trays.get(0)).run(); // massBalanceCheck(); - } /** @@ -207,9 +206,7 @@ public void init() { * Getter for the fieldgasOutStream
.
*
*
- * @return a
- * {@link neqsim.processSimulation.processEquipment.stream.StreamInterface}
- * object
+ * @return a {@link neqsim.processSimulation.processEquipment.stream.StreamInterface} object
*/
public StreamInterface getGasOutStream() {
return gasOutStream;
@@ -220,9 +217,7 @@ public StreamInterface getGasOutStream() {
* Getter for the field liquidOutStream
.
*
*
- * @return a
- * {@link neqsim.processSimulation.processEquipment.stream.StreamInterface}
- * object
+ * @return a {@link neqsim.processSimulation.processEquipment.stream.StreamInterface} object
*/
public StreamInterface getLiquidOutStream() {
return liquidOutStream;
@@ -234,9 +229,7 @@ public StreamInterface getLiquidOutStream() {
*
*
* @param trayNumber a int
- * @return a
- * {@link neqsim.processSimulation.processEquipment.distillation.SimpleTray}
- * object
+ * @return a {@link neqsim.processSimulation.processEquipment.distillation.SimpleTray} object
*/
public SimpleTray getTray(int trayNumber) {
return trays.get(trayNumber);
@@ -431,7 +424,6 @@ public boolean componentMassBalanceCheck(String componentName) {
.getComponent(componentName).getFlowRate("kg/hr");
}
}
-
}
for (int i = 0; i < numberOfTrays; i++) {
@@ -456,7 +448,6 @@ public boolean componentMassBalanceCheck(String componentName) {
+ trays.get(i).getLiquidOutStream().getFluid().getComponent("water").getFlowRate("kg/hr")
+ " pressure " + trays.get(i).getGasOutStream().getPressure() + " temperature "
+ trays.get(i).getGasOutStream().getTemperature("C") + " feedtotray " + massFeedInput[i]);
-
}
double massError = 0.0;
@@ -503,15 +494,12 @@ public boolean massBalanceCheck() {
+ trays.get(i).getGasOutStream().getPressure() + " temperature "
+ trays.get(i).getGasOutStream().getTemperature("C"));
/*
- * System.out.println( "tray " + i + " number of input streams " +
- * numberOfInputStreams +
+ * System.out.println( "tray " + i + " number of input streams " + numberOfInputStreams +
* " water in gasout " +
* trays.get(i).getGasOutStream().getFluid().getPhase(0).getComponent("water")
* .getNumberOfmoles() + " water in liquidout " +
- * trays.get(i).getLiquidOutStream().getFluid().getPhase(0).getComponent(
- * "water")
- * .getNumberOfmoles() + " pressure " +
- * trays.get(i).getGasOutStream().getPressure() +
+ * trays.get(i).getLiquidOutStream().getFluid().getPhase(0).getComponent( "water")
+ * .getNumberOfmoles() + " pressure " + trays.get(i).getGasOutStream().getPressure() +
* " temperature " + trays.get(i).getGasOutStream().getTemperature("C"));
*/
}
@@ -562,7 +550,8 @@ public void energyBalanceCheck() {
* @param args an array of {@link java.lang.String} objects
*/
public static void main(String[] args) {
- neqsim.thermo.system.SystemInterface testSystem = new neqsim.thermo.system.SystemSrkEos((273.15 - 0.0), 15.000);
+ neqsim.thermo.system.SystemInterface testSystem =
+ new neqsim.thermo.system.SystemSrkEos((273.15 - 0.0), 15.000);
// testSystem.addComponent("methane", 10.00);
testSystem.addComponent("ethane", 10.0);
testSystem.addComponent("CO2", 10.0);
@@ -586,7 +575,8 @@ public static void main(String[] args) {
// column.getCondenser().setHeatInput(-70000.0);
// ((Condenser) column.getCondenser()).setRefluxRatio(0.2);
- neqsim.processSimulation.processSystem.ProcessSystem operations = new neqsim.processSimulation.processSystem.ProcessSystem();
+ neqsim.processSimulation.processSystem.ProcessSystem operations =
+ new neqsim.processSimulation.processSystem.ProcessSystem();
operations.add(stream_1);
operations.add(column);
operations.run();
@@ -601,9 +591,7 @@ public static void main(String[] args) {
* getReboiler.
*
*
- * @return a
- * {@link neqsim.processSimulation.processEquipment.distillation.SimpleTray}
- * object
+ * @return a {@link neqsim.processSimulation.processEquipment.distillation.SimpleTray} object
*/
public SimpleTray getReboiler() {
return trays.get(0);
@@ -614,9 +602,7 @@ public SimpleTray getReboiler() {
* getCondenser.
*
*
- * @return a
- * {@link neqsim.processSimulation.processEquipment.distillation.SimpleTray}
- * object
+ * @return a {@link neqsim.processSimulation.processEquipment.distillation.SimpleTray} object
*/
public SimpleTray getCondenser() {
return trays.get(trays.size() - 1);
diff --git a/src/main/java/neqsim/processSimulation/processEquipment/heatExchanger/Heater.java b/src/main/java/neqsim/processSimulation/processEquipment/heatExchanger/Heater.java
index 70d196ec35..29313d64b0 100644
--- a/src/main/java/neqsim/processSimulation/processEquipment/heatExchanger/Heater.java
+++ b/src/main/java/neqsim/processSimulation/processEquipment/heatExchanger/Heater.java
@@ -154,7 +154,6 @@ public void setOutTP(double temperature, double pressure) {
public boolean needRecalculation() {
if (inStream == null) {
return true;
-
}
if (inStream.getFluid().getTemperature() == lastTemperature
&& inStream.getFluid().getPressure() == lastPressure
@@ -234,10 +233,8 @@ public void runTransient(double dt, UUID id) {
increaseTime(dt);
return;
}
-
}
-
/** {@inheritDoc} */
@Override
public void displayResult() {
diff --git a/src/main/java/neqsim/processSimulation/processEquipment/manifold/Manifold.java b/src/main/java/neqsim/processSimulation/processEquipment/manifold/Manifold.java
index 5779920dc7..ab9c747e3e 100644
--- a/src/main/java/neqsim/processSimulation/processEquipment/manifold/Manifold.java
+++ b/src/main/java/neqsim/processSimulation/processEquipment/manifold/Manifold.java
@@ -69,7 +69,6 @@ public StreamInterface getSplitStream(int i) {
return localsplitter.getSplitStream(i);
}
-
/**
*
* getMixedStream.
@@ -88,5 +87,4 @@ public void run(UUID id) {
localsplitter.setInletStream(localmixer.getOutletStream());
localsplitter.run();
}
-
}
diff --git a/src/main/java/neqsim/processSimulation/processEquipment/pipeline/PipeBeggsAndBrills.java b/src/main/java/neqsim/processSimulation/processEquipment/pipeline/PipeBeggsAndBrills.java
index b0767f6461..6f0b3aa78f 100644
--- a/src/main/java/neqsim/processSimulation/processEquipment/pipeline/PipeBeggsAndBrills.java
+++ b/src/main/java/neqsim/processSimulation/processEquipment/pipeline/PipeBeggsAndBrills.java
@@ -115,7 +115,6 @@ public class PipeBeggsAndBrills extends Pipeline {
double length;
double elevation;
-
// Results initialization (for each segment)
private List
* Setter for the field
* Setter for the field
* Setter for the field
* calcHydrostaticPressureDifference
@@ -512,7 +502,6 @@ public double calcHydrostaticPressureDifference() {
SG = system.getPhase(1).getDensity("lb/ft3") / (1000 * 0.0624279606);
}
-
double APIgrav = (141.5 / (SG)) - 131.0;
double sigma68 = 39.0 - 0.2571 * APIgrav;
double sigma100 = 37.5 - 0.2571 * APIgrav;
@@ -737,10 +726,8 @@ public void run(UUID id) {
elevationProfile.add(cumulativeElevation);
incrementsProfile.add(getNumberOfIncrements());
-
outStream.setThermoSystem(system);
outStream.setCalculationIdentifier(id);
-
}
/**
@@ -755,7 +742,6 @@ public void runTransient(double dt, UUID id) {
run(id);
increaseTime(dt);
return;
-
}
/** {@inheritDoc} */
@@ -777,7 +763,6 @@ public double getInletSuperficialVelocity() {
/ (Math.PI / 4.0 * Math.pow(insideDiameter, 2.0));
}
-
/**
*
* getOutletSuperficialVelocity.
@@ -789,7 +774,6 @@ public double getOutletSuperficialVelocity() {
return getSegmentMixtureSuperficialVelocity(numberOfIncrements);
}
-
/**
*
* getNumberOfIncrements
@@ -801,8 +785,6 @@ public int getNumberOfIncrements() {
return numberOfIncrements;
}
-
-
/**
* @return angle in degrees
*/
@@ -810,7 +792,6 @@ public double getAngle() {
return angle;
}
-
/**
* @return total length of the pipe in m
*/
@@ -825,8 +806,6 @@ public double getElevation() {
return cumulativeElevation;
}
-
-
/**
*
* getDiameter.
@@ -849,7 +828,6 @@ public String getFlowRegime() {
return regime;
}
-
/**
*
* Getter for the field
* Getter for the field
* getSegmentPressure
@@ -902,7 +877,6 @@ public Double getSegmentPressure(int index) {
}
}
-
/**
*
* @return list of results
@@ -912,7 +886,6 @@ public List
* Constructor for WellFlow.
@@ -104,5 +103,4 @@ public void setWellProductionIndex(double wellProductionIndex) {
useWellProductionIndex = true;
this.wellProductionIndex = wellProductionIndex;
}
-
}
diff --git a/src/main/java/neqsim/processSimulation/processEquipment/separator/GasScrubber.java b/src/main/java/neqsim/processSimulation/processEquipment/separator/GasScrubber.java
index f97b416211..d515bb6d04 100644
--- a/src/main/java/neqsim/processSimulation/processEquipment/separator/GasScrubber.java
+++ b/src/main/java/neqsim/processSimulation/processEquipment/separator/GasScrubber.java
@@ -76,5 +76,4 @@ public GasScrubber(String name, StreamInterface inletStream) {
public GasScrubberMechanicalDesign getMechanicalDesign() {
return new GasScrubberMechanicalDesign(this);
}
-
}
diff --git a/src/main/java/neqsim/processSimulation/processEquipment/separator/Separator.java b/src/main/java/neqsim/processSimulation/processEquipment/separator/Separator.java
index e1765f7c64..22fbabe9ee 100644
--- a/src/main/java/neqsim/processSimulation/processEquipment/separator/Separator.java
+++ b/src/main/java/neqsim/processSimulation/processEquipment/separator/Separator.java
@@ -60,8 +60,6 @@ public class Separator extends ProcessEquipmentBaseClass implements SeparatorInt
/** Inner diameter/height of separator volume. */
private double internalDiameter = 1.0;
-
-
/** LiquidLevel as volume fraction of liquidvolume/(liquid + gas volume). */
private double liquidLevel = 0.5;
double liquidVolume =
diff --git a/src/main/java/neqsim/processSimulation/processEquipment/stream/Stream.java b/src/main/java/neqsim/processSimulation/processEquipment/stream/Stream.java
index e03b25f49a..d8877c3096 100644
--- a/src/main/java/neqsim/processSimulation/processEquipment/stream/Stream.java
+++ b/src/main/java/neqsim/processSimulation/processEquipment/stream/Stream.java
@@ -196,7 +196,6 @@ public Stream clone() {
clonedSystem.thermoSystem = thermoSystem.clone();
}
-
return clonedSystem;
}
@@ -607,5 +606,4 @@ public SystemInterface getFluid() {
return thermoSystem;
}
}
-
}
diff --git a/src/main/java/neqsim/processSimulation/processEquipment/stream/StreamInterface.java b/src/main/java/neqsim/processSimulation/processEquipment/stream/StreamInterface.java
index 29151b4d08..86706217aa 100644
--- a/src/main/java/neqsim/processSimulation/processEquipment/stream/StreamInterface.java
+++ b/src/main/java/neqsim/processSimulation/processEquipment/stream/StreamInterface.java
@@ -235,5 +235,4 @@ public default double getFlowRate(String unit) {
/** {@inheritDoc} */
@Override
public int hashCode();
-
}
diff --git a/src/main/java/neqsim/processSimulation/processEquipment/subsea/SimpleFlowLine.java b/src/main/java/neqsim/processSimulation/processEquipment/subsea/SimpleFlowLine.java
index 24bc57ba8f..0915c85f78 100644
--- a/src/main/java/neqsim/processSimulation/processEquipment/subsea/SimpleFlowLine.java
+++ b/src/main/java/neqsim/processSimulation/processEquipment/subsea/SimpleFlowLine.java
@@ -33,7 +33,6 @@ public class SimpleFlowLine extends TwoPortEquipment {
@Deprecated
public SimpleFlowLine(StreamInterface inStream) {
this("SimpleFlowLine", inStream);
-
}
/**
diff --git a/src/main/java/neqsim/processSimulation/processEquipment/util/Adjuster.java b/src/main/java/neqsim/processSimulation/processEquipment/util/Adjuster.java
index 1f8308141c..93ae48b902 100644
--- a/src/main/java/neqsim/processSimulation/processEquipment/util/Adjuster.java
+++ b/src/main/java/neqsim/processSimulation/processEquipment/util/Adjuster.java
@@ -364,7 +364,6 @@ public void setMinAdjustedValue(double minVal) {
if (minAdjustedValue > maxAdjustedValue) {
maxAdjustedValue = minAdjustedValue;
}
-
}
public double getMaxAdjustedValue() {
@@ -374,5 +373,4 @@ public double getMaxAdjustedValue() {
public double getMinAdjustedValue() {
return minAdjustedValue;
}
-
}
diff --git a/src/main/java/neqsim/processSimulation/processEquipment/util/Calculator.java b/src/main/java/neqsim/processSimulation/processEquipment/util/Calculator.java
index 02566e80f3..65049fde21 100644
--- a/src/main/java/neqsim/processSimulation/processEquipment/util/Calculator.java
+++ b/src/main/java/neqsim/processSimulation/processEquipment/util/Calculator.java
@@ -8,7 +8,6 @@
import neqsim.processSimulation.processEquipment.ProcessEquipmentBaseClass;
import neqsim.processSimulation.processEquipment.ProcessEquipmentInterface;
-
/**
*
* Calculator class.
diff --git a/src/main/java/neqsim/processSimulation/processEquipment/util/FlowSetter.java b/src/main/java/neqsim/processSimulation/processEquipment/util/FlowSetter.java
index 4bf1169bda..a54a2a356a 100644
--- a/src/main/java/neqsim/processSimulation/processEquipment/util/FlowSetter.java
+++ b/src/main/java/neqsim/processSimulation/processEquipment/util/FlowSetter.java
@@ -73,7 +73,6 @@ public FlowSetter(String name, StreamInterface stream) {
super(name, stream);
}
-
/**
* {@inheritDoc}
*
@@ -400,5 +399,4 @@ public void setSeparationPT(double[] pressure, String unitP, double[] temperatur
this.temperature = temperature;
this.unitT = unitT;
}
-
}
diff --git a/src/main/java/neqsim/processSimulation/processEquipment/util/PressureDrop.java b/src/main/java/neqsim/processSimulation/processEquipment/util/PressureDrop.java
index 38dc472117..fc8e196091 100644
--- a/src/main/java/neqsim/processSimulation/processEquipment/util/PressureDrop.java
+++ b/src/main/java/neqsim/processSimulation/processEquipment/util/PressureDrop.java
@@ -73,5 +73,4 @@ public void run(UUID id) {
outStream.setFluid(thermoSystem);
}
-
}
diff --git a/src/main/java/neqsim/processSimulation/processEquipment/valve/ThrottlingValve.java b/src/main/java/neqsim/processSimulation/processEquipment/valve/ThrottlingValve.java
index c9be581df5..69971625f5 100644
--- a/src/main/java/neqsim/processSimulation/processEquipment/valve/ThrottlingValve.java
+++ b/src/main/java/neqsim/processSimulation/processEquipment/valve/ThrottlingValve.java
@@ -54,9 +54,8 @@ public ThrottlingValve() {
* Constructor for ThrottlingValve.
* length
.
@@ -230,7 +228,6 @@ public void setDiameter(double diameter) {
insideDiameter = diameter;
}
-
/**
* angle
.
@@ -264,7 +261,6 @@ public void setNumberOfIncrements(int numberOfIncrements) {
this.numberOfIncrements = numberOfIncrements;
}
-
/**
* runIsothermal
.
@@ -276,7 +272,6 @@ public void setRunIsothermal(boolean runIsothermal) {
this.runIsothermal = runIsothermal;
}
-
/**
* Converts the input values from the system measurement units to imperial units. Needed because
* the main equations and coefficients are developed for imperial system
@@ -322,10 +317,8 @@ public void convertSystemUnitToMetric() {
length = length / 3.2808399;
pipeWallRoughness = pipeWallRoughness / 3.2808399;
pressureDrop = pressureDrop * 1.48727E-05;
-
}
-
public void calculateMissingValue() {
if (Double.isNaN(totalLength)) {
totalLength = calculateLength();
@@ -345,7 +338,6 @@ public void calculateMissingValue() {
new neqsim.util.exception.InvalidInputException("PipeBeggsAndBrills", "calcMissingValue",
"elevation or length or angle or inlet diameter", "cannot be null"));
}
-
}
/**
@@ -456,8 +448,6 @@ public String calcFlowRegime() {
return regime;
}
-
-
/**
* LastSegmentPressureDrop
.
@@ -872,7 +850,6 @@ public double getPressureDrop() {
return totalPressureDrop;
}
-
/**
* PressureProfile
.
@@ -884,8 +861,6 @@ public List
PhasePrEosvolcor class.
+ *+ * PhasePrEosvolcor class. + *
* * @author Even Solbraa * @version $Id: $Id @@ -37,11 +39,12 @@ public void init(double totalNumberOfMoles, int numberOfComponents, int type, Ph super.init(totalNumberOfMoles, numberOfComponents, type, phase, beta); loc_C = calcC(this, temperature, pressure, numberOfComponents); CT = calcCT(this, temperature, pressure, numberOfComponents); - } /** - *getCT.
+ *+ * getCT. + *
* * @return a double */ @@ -50,7 +53,9 @@ public double getCT() { } /** - *getCTT.
+ *+ * getCTT. + *
* * @return a double */ @@ -77,14 +82,15 @@ public double calcf() { public double dFdV() { // return super.dFdV(); return -numberOfMolesInPhase * gV() - getA() / temperature * fv(); - } // note that in future the next thre lines should be modified to handle various mixing rules for // the translation /** - *getcij.
+ *+ * getcij. + *
* * @param compArray a {@link neqsim.thermo.component.ComponentEosInterface} object * @param compArray2 a {@link neqsim.thermo.component.ComponentEosInterface} object @@ -96,7 +102,9 @@ public double getcij(ComponentEosInterface compArray, ComponentEosInterface comp } /** - *getcijT.
+ *+ * getcijT. + *
* * @param compArray a {@link neqsim.thermo.component.ComponentEosInterface} object * @param compArray2 a {@link neqsim.thermo.component.ComponentEosInterface} object @@ -108,7 +116,9 @@ public double getcijT(ComponentEosInterface compArray, ComponentEosInterface com } /** - *getcijTT.
+ *+ * getcijTT. + *
* * @param compi a {@link neqsim.thermo.component.ComponentPRvolcor} object * @param compj a {@link neqsim.thermo.component.ComponentPRvolcor} object @@ -121,7 +131,9 @@ public double getcijTT(ComponentPRvolcor compi, ComponentPRvolcor compj) { // @Override /** - *calcCi.
+ *+ * calcCi. + *
* * @param compNumb a int * @param phase a {@link neqsim.thermo.phase.PhaseInterface} object @@ -145,7 +157,9 @@ public double calcCi(int compNumb, PhaseInterface phase, double temperature, dou } /** - *calcCij.
+ *+ * calcCij. + *
* * @param compNumb a int * @param compNumbj a int @@ -166,7 +180,9 @@ public double calcCij(int compNumb, int compNumbj, PhaseInterface phase, double } /** - *calcCiT.
+ *+ * calcCiT. + *
* * @param compNumb a int * @param phase a {@link neqsim.thermo.phase.PhaseInterface} object @@ -190,7 +206,9 @@ public double calcCiT(int compNumb, PhaseInterface phase, double temperature, do } /** - *calcCT.
+ *+ * calcCT. + *
* * @param phase a {@link neqsim.thermo.phase.PhaseInterface} object * @param temperature a double @@ -203,7 +221,9 @@ public double calcCT(PhaseInterface phase, double temperature, double pressure, } /** - *calcC.
+ *+ * calcC. + *
* * @param phase a {@link neqsim.thermo.phase.PhaseInterface} object * @param temperature a double @@ -231,7 +251,9 @@ private double loc_C() { } /** - *getc.
+ *+ * getc. + *
* * @return a double */ @@ -240,7 +262,9 @@ public double getc() { } /** - *getC.
+ *+ * getC. + *
* * @return a double */ @@ -273,7 +297,9 @@ public double gVV() { } /** - *gVVV.
+ *+ * gVVV. + *
* * @return a double */ @@ -306,7 +332,9 @@ public double fVV() { } /** - *fVVV.
+ *+ * fVVV. + *
* * @return a double */ @@ -336,7 +364,9 @@ public double gb() { // derivative of small g with regards to c /** - *gc.
+ *+ * gc. + *
* * @return a double */ @@ -347,7 +377,9 @@ public double gc() { // derivative of small f with regards to c-->equal to fv /** - *fc.
+ *+ * fc. + *
* * @return a double */ @@ -364,7 +396,9 @@ public double fb() { // second derivative of small f with regards to cc-->equal to fvv /** - *fcc.
+ *+ * fcc. + *
* * @return a double */ @@ -374,7 +408,9 @@ public double fcc() { // second derivative of small f with regards to bc-->equal to fvv /** - *fbc.
+ *+ * fbc. + *
* * @return a double */ @@ -384,7 +420,9 @@ public double fbc() { // second derivative of small f with regards to cv-->equal to fvv /** - *fcv.
+ *+ * fcv. + *
* * @return a double */ @@ -424,7 +462,9 @@ public double gBB() { // second derivative of small g with regards to bc--> /** - *gBC.
+ *+ * gBC. + *
* * @return a double */ @@ -435,7 +475,9 @@ public double gBC() { // second derivative of small g with regards to cv--> /** - *gCV.
+ *+ * gCV. + *
* * @return a double */ @@ -446,7 +488,9 @@ public double gCV() { // second derivative of small g with regards to cc--> /** - *gCC.
+ *+ * gCC. + *
* * @return a double */ @@ -466,7 +510,9 @@ public double F() { // derivative of big F with regards to C // @Override /** - *FC.
+ *+ * FC. + *
* * @return a double */ @@ -475,7 +521,9 @@ public double FC() { } /** - *FnC.
+ *+ * FnC. + *
* * @return a double */ @@ -484,7 +532,9 @@ public double FnC() { } /** - *FTC.
+ *+ * FTC. + *
* * @return a double */ @@ -493,7 +543,9 @@ public double FTC() { } /** - *FBC.
+ *+ * FBC. + *
* * @return a double */ @@ -502,7 +554,9 @@ public double FBC() { } /** - *FCV.
+ *+ * FCV. + *
* * @return a double */ @@ -511,7 +565,9 @@ public double FCV() { } /** - *FCC.
+ *+ * FCC. + *
* * @return a double */ @@ -520,7 +576,9 @@ public double FCC() { } /** - *FCD.
+ *+ * FCD. + *
* * @return a double */ diff --git a/src/main/java/neqsim/util/database/NeqSimContractDataBase.java b/src/main/java/neqsim/util/database/NeqSimContractDataBase.java index 6574a18456..cc29c7c443 100644 --- a/src/main/java/neqsim/util/database/NeqSimContractDataBase.java +++ b/src/main/java/neqsim/util/database/NeqSimContractDataBase.java @@ -55,7 +55,6 @@ public NeqSimContractDataBase() { } } - /** * Drops and re-creates table from contents in csv file. * @@ -65,7 +64,6 @@ public static void updateTable(String tableName) { updateTable(tableName, "commercial/" + tableName + ".csv"); } - public static void initH2DatabaseFromCSVfiles() { h2IsInitalizing = true; neqsim.util.database.NeqSimContractDataBase.connectionString = diff --git a/src/main/java/neqsim/util/database/NeqSimProcessDesignDataBase.java b/src/main/java/neqsim/util/database/NeqSimProcessDesignDataBase.java index fbec4591ef..ccfabfe8f7 100644 --- a/src/main/java/neqsim/util/database/NeqSimProcessDesignDataBase.java +++ b/src/main/java/neqsim/util/database/NeqSimProcessDesignDataBase.java @@ -13,8 +13,7 @@ * @author Even Solbraa * @version June 2023 */ -public class NeqSimProcessDesignDataBase extends NeqSimDataBase -{ +public class NeqSimProcessDesignDataBase extends NeqSimDataBase { private static final long serialVersionUID = 1000; static Logger logger = LogManager.getLogger(NeqSimProcessDesignDataBase.class); @@ -62,7 +61,6 @@ public NeqSimProcessDesignDataBase() { } } - /** * Drops and re-creates table from contents in csv file. * @@ -72,7 +70,6 @@ public static void updateTable(String tableName) { updateTable(tableName, "designdata/" + tableName + ".csv"); } - public static void initH2DatabaseFromCSVfiles() { h2IsInitalizing = true; neqsim.util.database.NeqSimProcessDesignDataBase.connectionString = diff --git a/src/main/java/neqsim/util/unit/LengthUnit.java b/src/main/java/neqsim/util/unit/LengthUnit.java index 007b6b6edf..b8b1aad6d9 100644 --- a/src/main/java/neqsim/util/unit/LengthUnit.java +++ b/src/main/java/neqsim/util/unit/LengthUnit.java @@ -17,7 +17,6 @@ public class LengthUnit extends neqsim.util.unit.BaseUnit { private static final long serialVersionUID = 1000; - /** ** Constructor for LengthUnit. diff --git a/src/main/java/neqsim/util/unit/TimeUnit.java b/src/main/java/neqsim/util/unit/TimeUnit.java index 28c293b628..466f12a5d7 100644 --- a/src/main/java/neqsim/util/unit/TimeUnit.java +++ b/src/main/java/neqsim/util/unit/TimeUnit.java @@ -28,5 +28,4 @@ public class TimeUnit extends neqsim.util.unit.BaseUnit { public TimeUnit(double value, String name) { super(value, name); } - } diff --git a/src/test/java/neqsim/PVTsimulation/simulation/SaturationPressureTest.java b/src/test/java/neqsim/PVTsimulation/simulation/SaturationPressureTest.java index abb20d024d..6f887368cc 100644 --- a/src/test/java/neqsim/PVTsimulation/simulation/SaturationPressureTest.java +++ b/src/test/java/neqsim/PVTsimulation/simulation/SaturationPressureTest.java @@ -10,7 +10,6 @@ class SaturationPressureTest extends neqsim.NeqSimTest { @BeforeAll static void setUpBeforeClass() throws Exception {} - @Test void testCalcSaturationPressure() { SystemInterface tempSystem = new SystemSrkEos(273.15 + 20, 10.0); diff --git a/src/test/java/neqsim/fluidMechanics/flowSystem/twoPhaseFlowSystem/shipSystem/LNGshipTest.java b/src/test/java/neqsim/fluidMechanics/flowSystem/twoPhaseFlowSystem/shipSystem/LNGshipTest.java index 09e781873d..a1061431c9 100644 --- a/src/test/java/neqsim/fluidMechanics/flowSystem/twoPhaseFlowSystem/shipSystem/LNGshipTest.java +++ b/src/test/java/neqsim/fluidMechanics/flowSystem/twoPhaseFlowSystem/shipSystem/LNGshipTest.java @@ -1,59 +1,62 @@ package neqsim.fluidMechanics.flowSystem.twoPhaseFlowSystem.shipSystem; -import neqsim.thermo.system.SystemInterface; +import static org.junit.jupiter.api.Assertions.assertEquals; +import static org.junit.jupiter.api.Assertions.assertNull; import org.junit.jupiter.api.BeforeEach; import org.junit.jupiter.api.Test; - -import static org.junit.jupiter.api.Assertions.*; +import neqsim.thermo.system.SystemInterface; class LNGshipTest { - LNGship testShip; - SystemInterface testSystem; - @BeforeEach - void setUp() { - testSystem = new neqsim.thermo.system.SystemSrkEos(100, 1.0); - testSystem.addComponent("methane", 0.9); - testSystem.addComponent("nitrogen", 0.1); - testSystem.init(0); - - testShip = new LNGship(testSystem, 1_000_000, 0.01); - } - - @Test - void createSystem() { - assertEquals(0.7, testShip.getLiquidDensity()); - assertEquals(0.0, testShip.dailyBoilOffVolume); - assertEquals(0.0, testShip.initialNumberOffMoles); - testShip.createSystem(); - assertEquals(474.3293447569919, testShip.getLiquidDensity()); - assertEquals(10_000.0, testShip.dailyBoilOffVolume); - assertEquals(2.7513223265419292E10, testShip.initialNumberOffMoles); - - } - - @Test - public void testSolveSteadyState() { - assertEquals(-173.15, testShip.getThermoSystem().getTemperature("C"), 1e-2); - testShip.createSystem(); - testShip.solveSteadyState(1, null); - assertEquals(-176.43, testShip.getThermoSystem().getTemperature("C"), 1e-2); - assertEquals(testSystem.getPhase("oil").getComponent("nitrogen").getx(), testShip.getThermoSystem().getPhase("oil").getComponent("nitrogen").getx(), 1e-4); - assertEquals(testSystem.getPhase("oil").getComponent("methane").getx(), testShip.getThermoSystem().getPhase("oil").getComponent("methane").getx(), 1e-4); - } - - @Test - void solveTransient() { - assertNull(testShip.volume); - assertEquals(0.0, testShip.endVolume); - assertEquals(1_000_000, testShip.totalTankVolume); // Initial cargo volume - - testShip.createSystem(); - testShip.solveSteadyState(0, null); - testShip.solveTransient(0, null); - - - assertEquals(testShip.numberOffTimeSteps, testShip.tankTemperature.length); // Check that the results have correct length - assertEquals(600_000.0, testShip.endVolume); - } -} \ No newline at end of file + LNGship testShip; + SystemInterface testSystem; + + @BeforeEach + void setUp() { + testSystem = new neqsim.thermo.system.SystemSrkEos(100, 1.0); + testSystem.addComponent("methane", 0.9); + testSystem.addComponent("nitrogen", 0.1); + testSystem.init(0); + + testShip = new LNGship(testSystem, 1_000_000, 0.01); + } + + @Test + void createSystem() { + assertEquals(0.7, testShip.getLiquidDensity()); + assertEquals(0.0, testShip.dailyBoilOffVolume); + assertEquals(0.0, testShip.initialNumberOffMoles); + testShip.createSystem(); + assertEquals(474.3293447569919, testShip.getLiquidDensity()); + assertEquals(10_000.0, testShip.dailyBoilOffVolume); + assertEquals(2.7513223265419292E10, testShip.initialNumberOffMoles); + } + + @Test + public void testSolveSteadyState() { + assertEquals(-173.15, testShip.getThermoSystem().getTemperature("C"), 1e-2); + testShip.createSystem(); + testShip.solveSteadyState(1, null); + assertEquals(-176.43, testShip.getThermoSystem().getTemperature("C"), 1e-2); + assertEquals(testSystem.getPhase("oil").getComponent("nitrogen").getx(), + testShip.getThermoSystem().getPhase("oil").getComponent("nitrogen").getx(), 1e-4); + assertEquals(testSystem.getPhase("oil").getComponent("methane").getx(), + testShip.getThermoSystem().getPhase("oil").getComponent("methane").getx(), 1e-4); + } + + @Test + void solveTransient() { + assertNull(testShip.volume); + assertEquals(0.0, testShip.endVolume); + assertEquals(1_000_000, testShip.totalTankVolume); // Initial cargo volume + + testShip.createSystem(); + testShip.solveSteadyState(0, null); + testShip.solveTransient(0, null); + + assertEquals(testShip.numberOffTimeSteps, testShip.tankTemperature.length); // Check that the + // results have + // correct length + assertEquals(600_000.0, testShip.endVolume); + } +} diff --git a/src/test/java/neqsim/processSimulation/mechanicalDesign/SystemMechanicalDesignTest.java b/src/test/java/neqsim/processSimulation/mechanicalDesign/SystemMechanicalDesignTest.java index 0cda62fdec..1e5c7d317f 100644 --- a/src/test/java/neqsim/processSimulation/mechanicalDesign/SystemMechanicalDesignTest.java +++ b/src/test/java/neqsim/processSimulation/mechanicalDesign/SystemMechanicalDesignTest.java @@ -156,7 +156,6 @@ void testRunDesignCalculationforSeparator() { @Test void testRunDesignCalculationforGasScrubber() { - SystemInterface thermoSystem = new SystemSrkEos(298.0, 120.0); thermoSystem.addComponent("nitrogen", 1.0); thermoSystem.addComponent("methane", 99.0); @@ -171,7 +170,6 @@ void testRunDesignCalculationforGasScrubber() { GasScrubber sep1 = new GasScrubber(inlets); sep1.run(); - GasScrubberMechanicalDesign sepMechDesign = new GasScrubberMechanicalDesign(sep1); sepMechDesign.setMaxOperationPressure(180); sepMechDesign.calcDesign(); @@ -180,7 +178,6 @@ void testRunDesignCalculationforGasScrubber() { System.out.println("separator weight structual steel " + sepMechDesign.weightStructualSteel); sep1.addSeparatorSection("first mesh", "meshpad"); sepMechDesign.calcDesign(); - } @Test @@ -193,7 +190,6 @@ void testRunDesignCalculationforValve() { @Test void testRunDesignForPipeline() { - AdiabaticPipe pipe = new AdiabaticPipe("pipe1", ((neqsim.processSimulation.processEquipment.separator.ThreePhaseSeparator) operations .getUnit("1st stage separator")).getGasOutStream()); diff --git a/src/test/java/neqsim/processSimulation/processEquipment/compressor/CompressorTest.java b/src/test/java/neqsim/processSimulation/processEquipment/compressor/CompressorTest.java index f52bce181b..b54d6c71dd 100644 --- a/src/test/java/neqsim/processSimulation/processEquipment/compressor/CompressorTest.java +++ b/src/test/java/neqsim/processSimulation/processEquipment/compressor/CompressorTest.java @@ -224,7 +224,6 @@ public void testCompressorWithGERG2008_2() { double head2 = compressor1.getPolytropicHead("kJ/kg"); logger.info("gerg power " + compressor1.getPower() + " W"); assertEquals(compressor1.getPolytropicHead("kJ/kg"), 94.32923841459161, 0.01); - } /** diff --git a/src/test/java/neqsim/processSimulation/processEquipment/distillation/DistillationColumnTest.java b/src/test/java/neqsim/processSimulation/processEquipment/distillation/DistillationColumnTest.java index f7d1f555a0..98814ee444 100644 --- a/src/test/java/neqsim/processSimulation/processEquipment/distillation/DistillationColumnTest.java +++ b/src/test/java/neqsim/processSimulation/processEquipment/distillation/DistillationColumnTest.java @@ -101,7 +101,6 @@ public void DistillationColumnTest() throws Exception { * column.getLiquidOutStream().getFluid().getComponent("water").getMolarMass() * column.getLiquidOutStream().getFluid().getComponent("water").getz(); - double totalWaterIn = waterFlowRateInColumn2 + waterFlowRateInColumnGasToReb; double totalWaterOut = waterFlowRateOutColumn + waterFlowRateOutColumnLeanTEG; /* @@ -120,7 +119,6 @@ public void DistillationColumnTest() throws Exception { * ((Condenser) column.getCondenser()).getDuty()); */ assertEquals(totalWaterIn, totalWaterOut, 1.0); - } /** diff --git a/src/test/java/neqsim/processSimulation/processEquipment/manifold/ManifoldTest.java b/src/test/java/neqsim/processSimulation/processEquipment/manifold/ManifoldTest.java index 451ff3d914..7266b0b2f3 100644 --- a/src/test/java/neqsim/processSimulation/processEquipment/manifold/ManifoldTest.java +++ b/src/test/java/neqsim/processSimulation/processEquipment/manifold/ManifoldTest.java @@ -9,7 +9,6 @@ public class ManifoldTest { @Test void testRun() { - SystemSrkEos testSystem = new SystemSrkEos(298.0, 10.0); testSystem.addComponent("methane", 100.0); testSystem.addComponent("ethane", 10.0); @@ -46,7 +45,6 @@ void testRun() { @Test void testRun2() { - SystemSrkEos testSystem = new SystemSrkEos(298.0, 10.0); testSystem.addComponent("methane", 100.0); testSystem.addComponent("ethane", 10.0); @@ -88,8 +86,5 @@ void testRun2() { assertEquals(stream1FromManifold.getFluid().getComponent(0).getx(), manifold1.getSplitStream(0).getFluid().getComponent(0).getx(), 1e-6); assertEquals(5.0, manifold1.getMixedStream().getFlowRate("MSm3/day"), 0.01); - - - } } diff --git a/src/test/java/neqsim/processSimulation/processEquipment/pipeline/BeggsAndBrillsPipeTest.java b/src/test/java/neqsim/processSimulation/processEquipment/pipeline/BeggsAndBrillsPipeTest.java index 68d9e917fa..88609b6ee8 100644 --- a/src/test/java/neqsim/processSimulation/processEquipment/pipeline/BeggsAndBrillsPipeTest.java +++ b/src/test/java/neqsim/processSimulation/processEquipment/pipeline/BeggsAndBrillsPipeTest.java @@ -45,7 +45,6 @@ public void testFlowVolumeCorrection() { @Test public void testPipeLineBeggsAndBrills() { - double pressure = 50; // bara double temperature = 40; // C double massFlowRate = 1100000.000000000; @@ -90,13 +89,10 @@ public void testPipeLineBeggsAndBrills() { Assertions.assertEquals(temperatureOut, 39.3374, 1); Assertions.assertEquals(pipe.getOutletSuperficialVelocity(), pipe.getSegmentMixtureSuperficialVelocity(pipe.getNumberOfIncrements()), 0.1); - } - @Test public void testPipeLineBeggsAndBrills2() { - double pressure = 50; // bara double temperature = 40; // C double massFlowRate = 110000.000000000; @@ -141,12 +137,10 @@ public void testPipeLineBeggsAndBrills2() { Assertions.assertEquals(pipe.getFlowRegime(), "INTERMITTENT"); Assertions.assertEquals(pipe.getOutletSuperficialVelocity(), pipe.getSegmentMixtureSuperficialVelocity(pipe.getNumberOfIncrements()), 0.1); - } @Test public void testPipeLineBeggsAndBrills3() { - double pressure = 50; // bara double temperature = 80; // C double massFlowRate = 110000.000000000; @@ -214,8 +208,6 @@ public void testPipeLineBeggsAndBrills3() { Assertions.assertEquals(pipe.getOutletStream().getTemperature() - 273.15, 80, 1.0); } - - @Test public void testPipeLineBeggsAndBrills4() { // One phase @@ -259,7 +251,6 @@ public void testPipeLineBeggsAndBrills4() { Assertions.assertEquals(temperatureOut, 75.0748, 1); Assertions.assertEquals(pressureOut, 124.04439, 1); - Assertions.assertEquals(pipe.getPressureDrop(), 25.955604559293917, 1.0); Assertions.assertEquals(pipe.getSegmentPressure(10), 124.04439544070608, 1.0); Assertions.assertEquals(pipe.getSegmentPressure(0), 150, 1.0); @@ -279,7 +270,6 @@ public void testPipeLineBeggsAndBrills4() { Assertions.assertEquals(pipe.getOutletSuperficialVelocity(), pipe.getSegmentMixtureSuperficialVelocity(pipe.getNumberOfIncrements()), 0.1); - neqsim.thermo.system.SystemInterface testSystem2 = new neqsim.thermo.system.SystemSrkEos( (273.15 + 45), ThermodynamicConstantsInterface.referencePressure); @@ -311,11 +301,8 @@ public void testPipeLineBeggsAndBrills4() { double pressureOut2 = pipe2.getOutletPressure(); - Assertions.assertEquals(pressureOut2, 238.8205556280226, 1); - - neqsim.thermo.system.SystemInterface testSystem3 = new neqsim.thermo.system.SystemSrkEos( (273.15 + 45), ThermodynamicConstantsInterface.referencePressure); @@ -358,9 +345,5 @@ public void testPipeLineBeggsAndBrills4() { Assertions.assertEquals(temperatureOut3, -11.04463, 1); Assertions.assertEquals(pressureOut3, 18.3429, 1); - - } - - } diff --git a/src/test/java/neqsim/processSimulation/processEquipment/pipeline/PipelineTest.java b/src/test/java/neqsim/processSimulation/processEquipment/pipeline/PipelineTest.java index 2511ca02a7..00a4dfae0b 100644 --- a/src/test/java/neqsim/processSimulation/processEquipment/pipeline/PipelineTest.java +++ b/src/test/java/neqsim/processSimulation/processEquipment/pipeline/PipelineTest.java @@ -8,7 +8,6 @@ public class PipelineTest { @Test public void testMain() { - double flow = 60.0; double temperature = 20.0; double pressure = 200.0; diff --git a/src/test/java/neqsim/processSimulation/processEquipment/powerGeneration/GasTurbineTest.java b/src/test/java/neqsim/processSimulation/processEquipment/powerGeneration/GasTurbineTest.java index d5fe5667a6..1fd56cbc56 100644 --- a/src/test/java/neqsim/processSimulation/processEquipment/powerGeneration/GasTurbineTest.java +++ b/src/test/java/neqsim/processSimulation/processEquipment/powerGeneration/GasTurbineTest.java @@ -54,7 +54,6 @@ void testRun() { @Test void testIdealAiFuelRatio() { - testSystem = new SystemSrkEos(298.15, 1.0); testSystem.addComponent("nitrogen", 1.0); testSystem.addComponent("CO2", 2.0); @@ -76,6 +75,5 @@ void testIdealAiFuelRatio() { gasturb.setInletStream(gasStream); double AFR = gasturb.calcIdealAirFuelRatio(); assertEquals(15.8430086719654, AFR, 0.0001); - } } diff --git a/src/test/java/neqsim/processSimulation/processEquipment/pump/PumpTest.java b/src/test/java/neqsim/processSimulation/processEquipment/pump/PumpTest.java index 24a8688a47..7a652fec80 100644 --- a/src/test/java/neqsim/processSimulation/processEquipment/pump/PumpTest.java +++ b/src/test/java/neqsim/processSimulation/processEquipment/pump/PumpTest.java @@ -70,7 +70,6 @@ void testRun() { @Test void testSimplePumpCurve() { - neqsim.thermo.system.SystemInterface feedDecane = new neqsim.thermo.system.SystemSrkEos(273.15 + 20.0, 10.00); feedDecane.addComponent("n-pentane", 0.5, "kg/sec"); @@ -99,8 +98,5 @@ void testSimplePumpCurve() { pump1.run(); Assertions.assertEquals(7.274237081101, pump1.getOutletPressure(), 1e-5); - } - - } diff --git a/src/test/java/neqsim/processSimulation/processEquipment/reservoir/WellFlowTest.java b/src/test/java/neqsim/processSimulation/processEquipment/reservoir/WellFlowTest.java index b78d3e4c68..58ea795fa6 100644 --- a/src/test/java/neqsim/processSimulation/processEquipment/reservoir/WellFlowTest.java +++ b/src/test/java/neqsim/processSimulation/processEquipment/reservoir/WellFlowTest.java @@ -10,7 +10,6 @@ public class WellFlowTest { @Test void testRun() { - neqsim.thermo.system.SystemInterface fluid1 = new neqsim.thermo.system.SystemPrEos(373.15, 100.0); fluid1.addComponent("water", 3.599); @@ -82,7 +81,6 @@ void testRunTransient() { chokeValve.setInletStream(pipeline.getOutletStream()); chokeValve.setOutletPressure(5.0, "bara"); - Adjuster adjuster = new Adjuster("adjuster"); adjuster.setTargetVariable(pipeline.getOutletStream(), "pressure", chokeValve.getOutletPressure(), "bara"); @@ -128,10 +126,8 @@ void testRunTransient() { * System.out.println("gas velocity " + pipeline.getInletSuperficialVelocity()); */ } - } - @Test void testCalcWellFlow() { neqsim.thermo.system.SystemInterface fluid1 = @@ -157,6 +153,4 @@ void testCalcWellFlow() { // wellflow.setDarcyLawParameters(permeability, ); // wellflow.setWellProductionIndex(10.000100751427403E-3); } - - } diff --git a/src/test/java/neqsim/processSimulation/processEquipment/util/AdjusterTest.java b/src/test/java/neqsim/processSimulation/processEquipment/util/AdjusterTest.java index 9ca1412631..ea5983556d 100644 --- a/src/test/java/neqsim/processSimulation/processEquipment/util/AdjusterTest.java +++ b/src/test/java/neqsim/processSimulation/processEquipment/util/AdjusterTest.java @@ -6,7 +6,6 @@ public class AdjusterTest { @Test void testRun() { - double wellheadpressure = 120.0; double bottomholepressure = 200.0; @@ -27,7 +26,6 @@ void testRun() { flowline1.setElevation(1200.0); flowline1.setNumberOfIncrements(20); - neqsim.processSimulation.processEquipment.util.Adjuster adjuster = new neqsim.processSimulation.processEquipment.util.Adjuster("adjuster"); adjuster.setTargetVariable(flowline1.getOutletStream(), "pressure", wellheadpressure, "bara"); @@ -47,11 +45,8 @@ void testRun() { assertEquals(flowline1.getOutletStream().getFlowRate("MSm3/day"), 4.0, 0.1); } - - @Test void testRun2() { - double wellheadpressure = 120.0; double bottomholepressure = 200.0; @@ -72,7 +67,6 @@ void testRun2() { flowline1.setElevation(1200.0); flowline1.setNumberOfIncrements(20); - neqsim.processSimulation.processEquipment.util.Adjuster adjuster = new neqsim.processSimulation.processEquipment.util.Adjuster("adjuster"); adjuster.setTargetVariable(flowline1.getOutletStream(), "pressure", wellheadpressure, "bara"); diff --git a/src/test/java/neqsim/processSimulation/processEquipment/util/FlowSetterTest.java b/src/test/java/neqsim/processSimulation/processEquipment/util/FlowSetterTest.java index e101f2e17b..51f5388b63 100644 --- a/src/test/java/neqsim/processSimulation/processEquipment/util/FlowSetterTest.java +++ b/src/test/java/neqsim/processSimulation/processEquipment/util/FlowSetterTest.java @@ -55,7 +55,6 @@ void testMain() { @Test void testProcessWithFlowSetter() { - double gasFlow = 10.0; // MSm3/day double oilFlow = 2000.0; // m3/hr double waterFLow = 1000.0; // m3/hr @@ -90,7 +89,6 @@ void testProcessWithFlowSetter() { StreamInterface gasFromSepStream = separator.getGasOutStream(); - neqsim.processSimulation.processSystem.ProcessSystem operations = new neqsim.processSimulation.processSystem.ProcessSystem(); operations.add(stream_1); @@ -104,7 +102,6 @@ void testProcessWithFlowSetter() { @Test void testProcessWithFlowSetter2() { - double gasFlow = 10.0; // MSm3/day double oilFlow = 2000.0; // m3/hr double waterFlow = 1000.0; // m3/hr @@ -137,7 +134,6 @@ void testProcessWithFlowSetter2() { flowset.setWaterFlowRate(waterFlow, "m3/hr"); flowset.run(); - assertEquals(gasFlow, ((StreamInterface) flowset.getReferenceProcess().getUnit("gas")).getFlowRate("MSm3/day"), 0.01); diff --git a/src/test/java/neqsim/processSimulation/processEquipment/util/StreamSaturatorUtilTest.java b/src/test/java/neqsim/processSimulation/processEquipment/util/StreamSaturatorUtilTest.java index 546cdd7194..0d8ec34ce3 100644 --- a/src/test/java/neqsim/processSimulation/processEquipment/util/StreamSaturatorUtilTest.java +++ b/src/test/java/neqsim/processSimulation/processEquipment/util/StreamSaturatorUtilTest.java @@ -36,7 +36,6 @@ void testRun() { assertEquals(0.0012319218375683974, streamSaturator.getOutletStream().getFluid().getPhase(0).getComponent("water").getx(), 1e-16); - } @Test diff --git a/src/test/java/neqsim/processSimulation/processSystem/CompressorModule.java b/src/test/java/neqsim/processSimulation/processSystem/CompressorModule.java index 83fdd52863..bd98c77877 100644 --- a/src/test/java/neqsim/processSimulation/processSystem/CompressorModule.java +++ b/src/test/java/neqsim/processSimulation/processSystem/CompressorModule.java @@ -56,7 +56,6 @@ public void testProcess() { 0.050908, 0.007751, 0.014665, 0.004249, 0.004878, 0.004541, 0.007189, 0.006904, 0.004355, 0.007658, 0.003861, 0.003301, 0.002624, 0.001857, 0.001320, 0.001426, 0.001164, 0.000916}); - Stream feedStream = new Stream("feed stream", thermoSystem); feedStream.setFlowRate(604094, "kg/hr"); feedStream.setTemperature(25.5, "C"); @@ -110,7 +109,6 @@ public void testProcess() { recycle2.addStream(recycleValve.getOutletStream()); recycle2.setOutletStream(gasResycleStream); - Recycle recycle1 = new Recycle("recycle 1"); recycle1.addStream(scrubber1.getLiquidOutStream()); recycle1.setOutletStream(resycleScrubberStream); diff --git a/src/test/java/neqsim/processSimulation/processSystem/GlycolModulesTest.java b/src/test/java/neqsim/processSimulation/processSystem/GlycolModulesTest.java index d9eae237bb..d5223d0bfd 100644 --- a/src/test/java/neqsim/processSimulation/processSystem/GlycolModulesTest.java +++ b/src/test/java/neqsim/processSimulation/processSystem/GlycolModulesTest.java @@ -104,7 +104,6 @@ public void runProcessTEG() throws InterruptedException { double[] splitSmøbukk = {0.9999999999, 1e-10}; SmøbukkSplit.setSplitFactors(splitSmøbukk); - Stream dryFeedGasMidgard = new Stream("dry feed gas Midgard201", feedGas.clone()); dryFeedGasMidgard.setFlowRate(13.943929595435336, "MSm3/day"); dryFeedGasMidgard.setTemperature(8.617179027757128, "C"); @@ -124,7 +123,6 @@ public void runProcessTEG() throws InterruptedException { double[] splitMidgard = {0.11245704038738272, 0.8875429596126173}; MidgardSplit.setSplitFactors(splitMidgard); - StaticMixer TrainA = new StaticMixer("mixer TrainA"); TrainA.addStream(MidgardSplit.getSplitStream(0)); TrainA.addStream(SmøbukkSplit.getSplitStream(0)); @@ -231,7 +229,6 @@ 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"); @@ -264,11 +261,9 @@ 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"); - WaterStripperColumn stripper = new WaterStripperColumn("TEG stripper"); stripper.addSolventInStream(column.getLiquidOutStream()); stripper.addGasInStream(strippingGas); @@ -287,7 +282,6 @@ public void runProcessTEG() throws InterruptedException { recycleFlareGas.setPriority(1000); // recycleFlareGas.setTolerance(0.1); - 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, @@ -309,7 +303,6 @@ public void runProcessTEG() throws InterruptedException { makeupMixer.addStream(stripper.getLiquidOutStream()); makeupMixer.addStream(makeupTEG); - Pump hotLeanTEGPump = new Pump(makeupMixer.getOutStream()); hotLeanTEGPump.setName("lean TEG LP pump"); hotLeanTEGPump.setOutletPressure(39.67967207899729); @@ -330,7 +323,6 @@ public void runProcessTEG() throws InterruptedException { resycleLeanTEG.setPriority(200); resycleLeanTEG.setDownstreamProperty("flow rate"); - neqsim.processSimulation.processSystem.ProcessSystem operations1 = new neqsim.processSimulation.processSystem.ProcessSystem(); operations1.add(dryFeedGasSmøbukk); @@ -400,8 +392,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); @@ -421,7 +411,6 @@ public void runProcessTEG() throws InterruptedException { new neqsim.processSimulation.processSystem.ProcessModule("Finish Process"); module4.add(operations5); - neqsim.processSimulation.processSystem.ProcessModule modules = new neqsim.processSimulation.processSystem.ProcessModule("Modules wrapper"); modules.add(module1); diff --git a/src/test/java/neqsim/processSimulation/processSystem/MLA_bug_test.java b/src/test/java/neqsim/processSimulation/processSystem/MLA_bug_test.java index d95e1209b5..019931598b 100644 --- a/src/test/java/neqsim/processSimulation/processSystem/MLA_bug_test.java +++ b/src/test/java/neqsim/processSimulation/processSystem/MLA_bug_test.java @@ -342,7 +342,6 @@ public void runProcessTEG() throws InterruptedException { richGLycolHeaterCondenser.setEnergyStream(column.getCondenser().getEnergyStream()); - Thread runThr = p.runAsThread(); try { runThr.join(100000); diff --git a/src/test/java/neqsim/processSimulation/processSystem/OilGasProcessTest.java b/src/test/java/neqsim/processSimulation/processSystem/OilGasProcessTest.java index 4c11b6c944..d8cf896156 100644 --- a/src/test/java/neqsim/processSimulation/processSystem/OilGasProcessTest.java +++ b/src/test/java/neqsim/processSimulation/processSystem/OilGasProcessTest.java @@ -80,8 +80,6 @@ public void runProcess() throws InterruptedException { seprator3rdStage.addStream(valve2.getOutletStream()); seprator3rdStage.addStream(recircstream1); - - ThrottlingValve pipeloss1st = new ThrottlingValve("pipeloss1st", seprator3rdStage.getGasOutStream()); pipeloss1st.setOutletPressure(2.7 - 0.03); @@ -127,6 +125,5 @@ public void runProcess() throws InterruptedException { // System.out.println("recycle flow " + recycle1.getOutletStream().getFlowRate("kg/hr")); // valveLP1.getOutletStream().getFluid().prettyPrint(); - } } diff --git a/src/test/java/neqsim/processSimulation/processSystem/ProcessSystemRunTransientTest.java b/src/test/java/neqsim/processSimulation/processSystem/ProcessSystemRunTransientTest.java index 255b9028cf..05453e0546 100644 --- a/src/test/java/neqsim/processSimulation/processSystem/ProcessSystemRunTransientTest.java +++ b/src/test/java/neqsim/processSimulation/processSystem/ProcessSystemRunTransientTest.java @@ -392,8 +392,6 @@ public void testDynamicCompressor22() { */ assertEquals(100.0, compressor1.getOutletStream().getPressure(), 0.01); - - // System.out.println("steady state with compressor curves....."); neqsim.processSimulation.processEquipment.compressor.CompressorChartGenerator compchartgenerator = new neqsim.processSimulation.processEquipment.compressor.CompressorChartGenerator( @@ -436,7 +434,6 @@ public void testDynamicCompressor22() { * " pres inn " + compressor1.getInletStream().getPressure() + " pres out " + * compressor1.getOutletStream().getPressure()); */ - } @Test @@ -483,7 +480,6 @@ public void testDynamicCompressorSpeedControl() { PressureTransmitter separatorPressureTransmitter = new PressureTransmitter(separator2.getGasOutStream()); - ControllerDeviceInterface speedController = new ControllerDeviceBaseClass(); speedController.setReverseActing(true); speedController.setTransmitter(separatorPressureTransmitter); @@ -499,8 +495,6 @@ public void testDynamicCompressorSpeedControl() { p.add(valve2); compressor1.setController(speedController); - - p.run(); /* * System.out.println(" speed " + compressor1.getSpeed() + "feed flow " + @@ -728,7 +722,6 @@ public void testAntiSurgeControl() { p.runTransient(); } - valve1.setPercentValveOpening(1.0); valve2.setPercentValveOpening(1.0); @@ -778,5 +771,4 @@ public void testAntiSurgeControl() { p.runTransient(); } } - } diff --git a/src/test/java/neqsim/thermo/characterization/CharacteriseTest.java b/src/test/java/neqsim/thermo/characterization/CharacteriseTest.java index db7e836147..a7c5f9bf0b 100644 --- a/src/test/java/neqsim/thermo/characterization/CharacteriseTest.java +++ b/src/test/java/neqsim/thermo/characterization/CharacteriseTest.java @@ -5,7 +5,7 @@ import neqsim.thermo.system.SystemInterface; import neqsim.thermo.system.SystemSrkEos; -public class CharacteriseTest extends neqsim.NeqSimTest{ +public class CharacteriseTest extends neqsim.NeqSimTest { static SystemInterface thermoSystem = null; @Test @@ -18,7 +18,7 @@ void testCharacterisePlusFraction() { thermoSystem.addTBPfraction("C7", 1.0, 110.0 / 1000.0, 0.73); thermoSystem.addTBPfraction("C8", 1.0, 120.0 / 1000.0, 0.76); thermoSystem.addTBPfraction("C9", 1.0, 140.0 / 1000.0, 0.79); - thermoSystem.addPlusFraction("C10", 11.0, 290.0/1000.0, 0.82); + thermoSystem.addPlusFraction("C10", 11.0, 290.0 / 1000.0, 0.82); thermoSystem.getCharacterization().setLumpingModel("no lumping"); thermoSystem.getCharacterization().characterisePlusFraction(); // logger.info("number of components " + thermoSystem.getNumberOfComponents()); @@ -32,11 +32,10 @@ void testCharacterisePlusFraction() { thermoSystem.addTBPfraction("C7", 1.0, 110.0 / 1000.0, 0.73); thermoSystem.addTBPfraction("C8", 1.0, 120.0 / 1000.0, 0.76); thermoSystem.addTBPfraction("C9", 1.0, 140.0 / 1000.0, 0.79); - thermoSystem.addPlusFraction("C10", 11.0, 290.0/1000.0, 0.82); + thermoSystem.addPlusFraction("C10", 11.0, 290.0 / 1000.0, 0.82); thermoSystem.getCharacterization().getLumpingModel().setNumberOfPseudoComponents(12); thermoSystem.getCharacterization().setLumpingModel("PVTlumpingModel"); thermoSystem.getCharacterization().characterisePlusFraction(); assertEquals(15, thermoSystem.getNumberOfComponents()); - } } diff --git a/src/test/java/neqsim/thermo/system/SystemPrEosTest.java b/src/test/java/neqsim/thermo/system/SystemPrEosTest.java index bab6ad75fa..585b491570 100644 --- a/src/test/java/neqsim/thermo/system/SystemPrEosTest.java +++ b/src/test/java/neqsim/thermo/system/SystemPrEosTest.java @@ -54,8 +54,6 @@ public void testMolarVolume() { testSystem.getMolarMass("kg/mol") / testSystem.getDensity("kg/m3")); } - - /** *
* testTPflash2. diff --git a/src/test/java/neqsim/thermo/system/SystemUMRPRUMCEosNewTest.java b/src/test/java/neqsim/thermo/system/SystemUMRPRUMCEosNewTest.java index 96925abf07..d545100170 100644 --- a/src/test/java/neqsim/thermo/system/SystemUMRPRUMCEosNewTest.java +++ b/src/test/java/neqsim/thermo/system/SystemUMRPRUMCEosNewTest.java @@ -270,6 +270,5 @@ public void checkPhaseEnvelope2() throws Exception { SaturationPressure satPresSim = new SaturationPressure(testSystem); satPresSim.run(); assertEquals(satPresSim.getThermoSystem().getPressure(), 104.7532, 0.001); - } } diff --git a/src/test/java/neqsim/thermo/util/readwrite/EclipseFluidReadWriteTest.java b/src/test/java/neqsim/thermo/util/readwrite/EclipseFluidReadWriteTest.java index 8716c19e8c..f81e9baf61 100644 --- a/src/test/java/neqsim/thermo/util/readwrite/EclipseFluidReadWriteTest.java +++ b/src/test/java/neqsim/thermo/util/readwrite/EclipseFluidReadWriteTest.java @@ -66,8 +66,6 @@ void testReadAndAddFluids2() throws IOException { // neqsim.thermo.util.readwrite.TablePrinter.printTable((((PhaseEos // )testSystem.getPhase(0)).getMixingRule().getBinaryInteractionParameters())); - - } @Test diff --git a/src/test/java/neqsim/thermodynamicOperations/ThermodynamicOperationsTest.java b/src/test/java/neqsim/thermodynamicOperations/ThermodynamicOperationsTest.java index f59bf01c9b..d4dde8beb7 100644 --- a/src/test/java/neqsim/thermodynamicOperations/ThermodynamicOperationsTest.java +++ b/src/test/java/neqsim/thermodynamicOperations/ThermodynamicOperationsTest.java @@ -439,7 +439,6 @@ public CalculationResult getOutput() throws IOException { for (int kProp = 0; kProp < calcresult.get(kSample).size(); kProp++) { try { calcResult[kSample][kProp] = calcresult.get(kSample).get(kProp); - } catch (Exception e) { calcResult[kSample][kProp] = Double.NaN; } diff --git a/src/test/java/neqsim/thermodynamicOperations/flashOps/Degasser.java b/src/test/java/neqsim/thermodynamicOperations/flashOps/Degasser.java index e0d040f75f..a2d7521321 100644 --- a/src/test/java/neqsim/thermodynamicOperations/flashOps/Degasser.java +++ b/src/test/java/neqsim/thermodynamicOperations/flashOps/Degasser.java @@ -87,19 +87,16 @@ void testRun() { String[] componentNames = fluid1.getComponentNames(); for (int i = 0; i < intParameter.length; i++) { - int componentIndex = findComponentIndex(componentNames, componentNames[i + 1]);// except // nitrogen 0 int waterIndex = findComponentIndex(componentNames, "water"); if (componentIndex != -1 && waterIndex != -1) { - ((PhaseEosInterface) fluid1.getPhases()[0]).getMixingRule() .setBinaryInteractionParameter(componentIndex, waterIndex, intParameter[i]); ((PhaseEosInterface) fluid1.getPhases()[1]).getMixingRule() .setBinaryInteractionParameter(componentIndex, waterIndex, intParameter[i]); - } else { } } @@ -161,25 +158,19 @@ void testRun() { System.out.println("Gas out from degasser2 " + heater_TP_setter_test_stream2.getOutStream() .getFluid().getPhase("gas").getFlowRate("kg/hr")); - } private int findComponentIndex(String[] componentNames, String componentName) { - for (int i = 0; i < componentNames.length; i++) { if (componentNames[i].equals(componentName)) { - return i; - } } return -1; // Component not found - } - /** * Test method for */ diff --git a/src/test/java/neqsim/thermodynamicOperations/flashOps/TPFlashTest.java b/src/test/java/neqsim/thermodynamicOperations/flashOps/TPFlashTest.java index fcff3e2630..83590e1678 100644 --- a/src/test/java/neqsim/thermodynamicOperations/flashOps/TPFlashTest.java +++ b/src/test/java/neqsim/thermodynamicOperations/flashOps/TPFlashTest.java @@ -168,6 +168,5 @@ void testTPflash1() { testOps.TPflash(); assertEquals(2, testSystem.getNumberOfPhases()); // testSystem.prettyPrint(); - } } diff --git a/src/test/java/neqsim/thermodynamicOperations/flashOps/VUFlashTest.java b/src/test/java/neqsim/thermodynamicOperations/flashOps/VUFlashTest.java index 1cf0cd3216..6a09ad7d7e 100644 --- a/src/test/java/neqsim/thermodynamicOperations/flashOps/VUFlashTest.java +++ b/src/test/java/neqsim/thermodynamicOperations/flashOps/VUFlashTest.java @@ -23,9 +23,7 @@ class VUFlashTest { * @throws java.lang.Exception */ @BeforeEach - void setUp() throws Exception { - - } + void setUp() throws Exception {} @Test void testVUflash() { @@ -45,5 +43,4 @@ void testVUflash() { assertEquals(21.387, testSystem.getPressure(), 0.01); } - } diff --git a/src/test/java/neqsim/thermodynamicOperations/phaseEnvelopeOps/multicomponentEnvelopeOps/PTphaseEnvelopeTest.java b/src/test/java/neqsim/thermodynamicOperations/phaseEnvelopeOps/multicomponentEnvelopeOps/PTphaseEnvelopeTest.java index 190af0c597..34c40e0ab4 100644 --- a/src/test/java/neqsim/thermodynamicOperations/phaseEnvelopeOps/multicomponentEnvelopeOps/PTphaseEnvelopeTest.java +++ b/src/test/java/neqsim/thermodynamicOperations/phaseEnvelopeOps/multicomponentEnvelopeOps/PTphaseEnvelopeTest.java @@ -1,70 +1,65 @@ package neqsim.thermodynamicOperations.phaseEnvelopeOps.multicomponentEnvelopeOps; -import neqsim.thermodynamicOperations.ThermodynamicOperations; +import static org.junit.jupiter.api.Assertions.assertArrayEquals; +import static org.junit.jupiter.api.Assertions.assertThrows; +import java.util.Arrays; import org.junit.jupiter.api.BeforeEach; import org.junit.jupiter.api.Test; - -import java.util.Arrays; - -import static org.junit.jupiter.api.Assertions.*; +import neqsim.thermodynamicOperations.ThermodynamicOperations; class PTPhaseEnvelopeTest { - static neqsim.thermo.system.SystemInterface testSystem = null; - static ThermodynamicOperations testOps = null; - - @BeforeEach - void setUp() { - testSystem = new neqsim.thermo.system.SystemSrkEos(298.0, 50.0); - } - - /** - * Test method for {@link neqsim.thermodynamicOperations.phaseEnvelopeOps.multicomponentEnvelopeOps.pTphaseEnvelope}. - */ - @Test - void testDewP() { - testSystem.addComponent("nitrogen", 0.01); - testSystem.addComponent("CO2", 0.01); - testSystem.addComponent("methane", 0.98); - testSystem.setMixingRule("classic"); - - testOps = new ThermodynamicOperations(testSystem); - testOps.TPflash(); - testSystem.initProperties(); - testOps.calcPTphaseEnvelope(); - double[] dewPointPressures = testOps.get("dewP"); - double[] expectedDewPointPressures = - new double[]{ - 1.1051709180756477, 1.2214027581601699, 1.3498588075760032, 1.4918246976412703, - 1.6652911949458864, 1.8794891289619104, 2.1418131227502055, 2.4690864123141987, - 2.881197018974799, 3.404779997613969, 4.075230307874481, 4.938583914869986, 6.051801019586486, - 7.477304695462727, 9.260793952051571, 11.364101185282063, 13.480106047577934, 14.53423776629387, - 13.607498029406681, 11.181207439509638, 9.189487040488075, 9.612827246459474, - 10.706126846063928, 12.501491987760147, 15.075672692089958, 18.51283799420178, - 23.330378296334104, 29.71319711031059, 37.25532259549197, 43.660805656603934, 45.75836660678656, - 46.42490219574348, 46.83203503669948, 46.869568345957006, 46.903557772489435 - }; - System.out.println(Arrays.toString(dewPointPressures)); - assertArrayEquals(expectedDewPointPressures, dewPointPressures, 10E-10); - - } - - @Test - void testFailingCaseWithWater() { - testSystem.addComponent("nitrogen", 0.04); - testSystem.addComponent("CO2", 0.06); - testSystem.addComponent("methane", 0.80); - testSystem.addComponent("water", 0.00000000001); - - testSystem.setMixingRule("classic"); - - testOps = new ThermodynamicOperations(testSystem); - testOps.TPflash(); - testSystem.initProperties(); - - - Exception exception = assertThrows(ArrayIndexOutOfBoundsException.class, () -> testOps.calcPTphaseEnvelope()); - - } - - + static neqsim.thermo.system.SystemInterface testSystem = null; + static ThermodynamicOperations testOps = null; + + @BeforeEach + void setUp() { + testSystem = new neqsim.thermo.system.SystemSrkEos(298.0, 50.0); + } + + /** + * Test method for + * {@link neqsim.thermodynamicOperations.phaseEnvelopeOps.multicomponentEnvelopeOps.pTphaseEnvelope}. + */ + @Test + void testDewP() { + testSystem.addComponent("nitrogen", 0.01); + testSystem.addComponent("CO2", 0.01); + testSystem.addComponent("methane", 0.98); + testSystem.setMixingRule("classic"); + + testOps = new ThermodynamicOperations(testSystem); + testOps.TPflash(); + testSystem.initProperties(); + testOps.calcPTphaseEnvelope(); + double[] dewPointPressures = testOps.get("dewP"); + double[] expectedDewPointPressures = + new double[] {1.1051709180756477, 1.2214027581601699, 1.3498588075760032, + 1.4918246976412703, 1.6652911949458864, 1.8794891289619104, 2.1418131227502055, + 2.4690864123141987, 2.881197018974799, 3.404779997613969, 4.075230307874481, + 4.938583914869986, 6.051801019586486, 7.477304695462727, 9.260793952051571, + 11.364101185282063, 13.480106047577934, 14.53423776629387, 13.607498029406681, + 11.181207439509638, 9.189487040488075, 9.612827246459474, 10.706126846063928, + 12.501491987760147, 15.075672692089958, 18.51283799420178, 23.330378296334104, + 29.71319711031059, 37.25532259549197, 43.660805656603934, 45.75836660678656, + 46.42490219574348, 46.83203503669948, 46.869568345957006, 46.903557772489435}; + System.out.println(Arrays.toString(dewPointPressures)); + assertArrayEquals(expectedDewPointPressures, dewPointPressures, 10E-10); + } + + @Test + void testFailingCaseWithWater() { + testSystem.addComponent("nitrogen", 0.04); + testSystem.addComponent("CO2", 0.06); + testSystem.addComponent("methane", 0.80); + testSystem.addComponent("water", 0.00000000001); + + testSystem.setMixingRule("classic"); + + testOps = new ThermodynamicOperations(testSystem); + testOps.TPflash(); + testSystem.initProperties(); + + Exception exception = + assertThrows(ArrayIndexOutOfBoundsException.class, () -> testOps.calcPTphaseEnvelope()); + } } diff --git a/src/test/java/neqsim/util/database/NeqSimContractDataBaseTest.java b/src/test/java/neqsim/util/database/NeqSimContractDataBaseTest.java index 19c98804ca..041ae78ba1 100644 --- a/src/test/java/neqsim/util/database/NeqSimContractDataBaseTest.java +++ b/src/test/java/neqsim/util/database/NeqSimContractDataBaseTest.java @@ -4,12 +4,8 @@ public class NeqSimContractDataBaseTest { @Test - void testInitH2DatabaseFromCSVfiles() { - - } + void testInitH2DatabaseFromCSVfiles() {} @Test - void testUpdateTable() { - - } + void testUpdateTable() {} } diff --git a/src/test/java/neqsim/util/generator/PropertyGeneratorTest.java b/src/test/java/neqsim/util/generator/PropertyGeneratorTest.java index ecf4828481..94a1cd0f81 100644 --- a/src/test/java/neqsim/util/generator/PropertyGeneratorTest.java +++ b/src/test/java/neqsim/util/generator/PropertyGeneratorTest.java @@ -7,7 +7,6 @@ public class PropertyGeneratorTest { @Test void testCalculate() { - SystemInterface fluid = new SystemSrkEos(273.15 + 45.0, 22.0); fluid.addComponent("water", 0.1); fluid.addComponent("nitrogen", 0.02); @@ -30,7 +29,5 @@ void testCalculate() { double[] pres = new double[] {10.0, 20.0}; PropertyGenerator generator = new PropertyGenerator(fluid, temps, pres); generator.calculate(); - - } }