From 7da26e5cddeeb15d38dca5871ba967943e55b12e Mon Sep 17 00:00:00 2001
From: Sviatoslav Eroshkin <109044598+Sviatose@users.noreply.github.com>
Date: Thu, 31 Oct 2024 14:39:33 +0000
Subject: [PATCH 1/3] feat: param process run step
---
.../processsystem/ProcessSystem.java | 21 ++++++++++++++++++-
1 file changed, 20 insertions(+), 1 deletion(-)
diff --git a/src/main/java/neqsim/processsimulation/processsystem/ProcessSystem.java b/src/main/java/neqsim/processsimulation/processsystem/ProcessSystem.java
index e047c52be..c8829d0a7 100644
--- a/src/main/java/neqsim/processsimulation/processsystem/ProcessSystem.java
+++ b/src/main/java/neqsim/processsimulation/processsystem/ProcessSystem.java
@@ -43,6 +43,7 @@ public class ProcessSystem extends SimulationBaseClass {
new ArrayList
@@ -459,7 +460,7 @@ public void run(UUID id) {
* signalDB[timeStepNumber][3 * i + 3] = ((MeasurementDeviceInterface)
* measurementDevices.get(i)) .getUnit(); }
*/
- } while ((!isConverged || (iter < 2 && hasRecycle)) && iter < 100);
+ } while (((!isConverged || (iter < 2 && hasRecycle)) && iter < 100) && runStep);
for (int i = 0; i < unitOperations.size(); i++) {
unitOperations.get(i).setCalculationIdentifier(id);
@@ -736,6 +737,24 @@ public void setName(String name) {
this.name = name;
}
+ /**
+ * Setter for the field
* getEntropyProduction.
From 9531058b59116fb1a31cea2dc3c219486028b4dc Mon Sep 17 00:00:00 2001
From: Even Solbraa <41290109+EvenSol@users.noreply.github.com>
Date: Tue, 19 Nov 2024 19:37:31 +0000
Subject: [PATCH 2/3] update
---
src/main/java/neqsim/process/processmodel/ProcessSystem.java | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/src/main/java/neqsim/process/processmodel/ProcessSystem.java b/src/main/java/neqsim/process/processmodel/ProcessSystem.java
index 359ee5a96..c3434d111 100644
--- a/src/main/java/neqsim/process/processmodel/ProcessSystem.java
+++ b/src/main/java/neqsim/process/processmodel/ProcessSystem.java
@@ -43,7 +43,7 @@ public class ProcessSystem extends SimulationBaseClass {
new ArrayList
From bc4ee0ecff9032edb45f6c3e32fb4d3ac182b7b1 Mon Sep 17 00:00:00 2001
From: Even Solbraa <41290109+EvenSol@users.noreply.github.com>
Date: Tue, 19 Nov 2024 19:45:54 +0000
Subject: [PATCH 3/3] update
---
.../process/processmodel/ProcessSystem.java | 45 ++++++++-----------
1 file changed, 18 insertions(+), 27 deletions(-)
diff --git a/src/main/java/neqsim/process/processmodel/ProcessSystem.java b/src/main/java/neqsim/process/processmodel/ProcessSystem.java
index c3434d111..62775dbcd 100644
--- a/src/main/java/neqsim/process/processmodel/ProcessSystem.java
+++ b/src/main/java/neqsim/process/processmodel/ProcessSystem.java
@@ -68,8 +68,7 @@ public ProcessSystem(String name) {
* Add to end.
* runStep
.
+ *
+ * @param runStep A boolean
value if run only one iteration
+ */
+ public void setRunStep(boolean runStep) {
+ this.runStep = runStep;
+ }
+
+ /**
+ * Getter for the field runStep
.
+ *
+ * @return A boolean
value if run only one iteration
+ */
+ public boolean isRunStep() {
+ return runStep;
+ }
+
/**
*
runStep
.
- *
- * @return A boolean
value if run only one iteration
- */
+ * Getter for the field runStep
.
+ *
+ * @return A boolean
value if run only one iteration
+ */
public boolean isRunStep() {
return runStep;
}
@@ -803,11 +799,10 @@ public double getPower(String unit) {
double power = 0.0;
for (int i = 0; i < unitOperations.size(); i++) {
if (unitOperations.get(i).getClass().getSimpleName().equals("Compressor")) {
- power += ((neqsim.process.equipment.compressor.Compressor) unitOperations
- .get(i)).getPower();
+ power +=
+ ((neqsim.process.equipment.compressor.Compressor) unitOperations.get(i)).getPower();
} else if (unitOperations.get(i).getClass().getSimpleName().equals("Pump")) {
- power += ((neqsim.process.equipment.pump.Pump) unitOperations.get(i))
- .getPower();
+ power += ((neqsim.process.equipment.pump.Pump) unitOperations.get(i)).getPower();
}
}
if (unit.equals("MW")) {
@@ -831,9 +826,7 @@ public double getCoolerDuty(String unit) {
double heat = 0.0;
for (int i = 0; i < unitOperations.size(); i++) {
if (unitOperations.get(i).getClass().getSimpleName().equals("Cooler")) {
- heat +=
- ((neqsim.process.equipment.heatexchanger.Cooler) unitOperations.get(i))
- .getDuty();
+ heat += ((neqsim.process.equipment.heatexchanger.Cooler) unitOperations.get(i)).getDuty();
}
}
if (unit.equals("MW")) {
@@ -857,9 +850,7 @@ public double getHeaterDuty(String unit) {
double heat = 0.0;
for (int i = 0; i < unitOperations.size(); i++) {
if (unitOperations.get(i).getClass().getSimpleName().equals("Heater")) {
- heat +=
- ((neqsim.process.equipment.heatexchanger.Heater) unitOperations.get(i))
- .getDuty();
+ heat += ((neqsim.process.equipment.heatexchanger.Heater) unitOperations.get(i)).getDuty();
}
}
if (unit.equals("MW")) {