diff --git a/src/main/java/neqsim/processSimulation/measurementDevice/FlowInducedVibrationAnalyser.java b/src/main/java/neqsim/processSimulation/measurementDevice/FlowInducedVibrationAnalyser.java index 7ec4c2da87..3c87028c0d 100644 --- a/src/main/java/neqsim/processSimulation/measurementDevice/FlowInducedVibrationAnalyser.java +++ b/src/main/java/neqsim/processSimulation/measurementDevice/FlowInducedVibrationAnalyser.java @@ -87,14 +87,14 @@ public double getMeasuredValue(String unit) { double externalDiamater = (pipe.getDiameter() + 2 * pipe.getThickness()) * 1000;// mm double alpha = 0.0; double betta = 0.0; - if (supportArrangement == "Stiff") { + if (supportArrangement.equals("Stiff")) { alpha = 446187 + 646 * externalDiamater + 9.17E-4 * externalDiamater * externalDiamater * externalDiamater; betta = 0.1 * Math.log(externalDiamater) - 1.3739; - } else if (supportArrangement == "Medium stiff") { + } else if (supportArrangement.equals("Medium stiff")) { alpha = 283921 + 370 * externalDiamater; betta = 0.1106 * Math.log(externalDiamater) - 1.501; - } else if (supportArrangement == "Medium") { + } else if (supportArrangement.equals("Medium")) { alpha = 150412 + 209 * externalDiamater; betta = 0.0815 * Math.log(externalDiamater) - 1.3269; } else { @@ -105,7 +105,7 @@ public double getMeasuredValue(String unit) { double Fv = alpha * Math.pow(diameterOverThickness, betta); double LOF = mixDensity * mixVelocity * mixVelocity * FVF / Fv; return LOF; - } else if (method == "FRMS") { + } else if (method.equals("FRMS")) { if (GVF < 0.8) { return GVF; } else { diff --git a/src/main/java/neqsim/processSimulation/measurementDevice/simpleFlowRegime/Pipe.java b/src/main/java/neqsim/processSimulation/measurementDevice/simpleFlowRegime/Pipe.java index b797fb517b..f6e2abdcd0 100644 --- a/src/main/java/neqsim/processSimulation/measurementDevice/simpleFlowRegime/Pipe.java +++ b/src/main/java/neqsim/processSimulation/measurementDevice/simpleFlowRegime/Pipe.java @@ -157,9 +157,9 @@ public void setAngle(double angle) { * @return a double */ public double getAngle(String unit) { - if (unit == "Degree") { + if (unit.equals("Degree")) { return this.angle; - } else if (unit == "Radian") { + } else if (unit.equals("Radian")) { return this.angle * pi / 180; } return this.angle; diff --git a/src/main/java/neqsim/processSimulation/processEquipment/util/FlowRateAdjuster.java b/src/main/java/neqsim/processSimulation/processEquipment/util/FlowRateAdjuster.java index d018a3fa5f..0a27953ed0 100644 --- a/src/main/java/neqsim/processSimulation/processEquipment/util/FlowRateAdjuster.java +++ b/src/main/java/neqsim/processSimulation/processEquipment/util/FlowRateAdjuster.java @@ -137,7 +137,7 @@ public void run(UUID id) { waterStream.setTemperature(temperature, "C"); waterStream.setPressure(pressure, "bara"); - if (unit == "Sm3/hr") { + if (unit.equals("Sm3/hr")) { gasStream.setFlowRate(desiredGasFlow, unit); oilStream.setFlowRate(desiredOilFlow * oilDensity, "kg/hr"); waterStream.setFlowRate(desiredWaterFlow * waterDensity, "kg/hr");