Skip to content

Commit 6828284

Browse files
authored
added test for flow setter for simple process (#841)
1 parent 6c1a283 commit 6828284

File tree

3 files changed

+200
-137
lines changed

3 files changed

+200
-137
lines changed

src/main/java/neqsim/processSimulation/processEquipment/util/FlowSetter.java

+4-2
Original file line numberDiff line numberDiff line change
@@ -152,6 +152,9 @@ public void setGasFlowRate(double flowRate, String flowUnit) {
152152
case "Sm3/day":
153153
conversionFactor = 1.0 / 3600.0 / 24.0;
154154
break;
155+
case "MSm3/day":
156+
conversionFactor = 1.0 / 3600.0 / 24.0 * 1e6;
157+
break;
155158
default:
156159
throw new RuntimeException("unit not supported " + flowUnit);
157160
}
@@ -297,9 +300,8 @@ public double getWaterFlowRate(String flowUnit) {
297300
@Override
298301
public void run(UUID id) {
299302
SystemInterface tempFluid = inStream.getThermoSystem().clone();
300-
double flow = tempFluid.getFlowRate("kg/sec");
301303

302-
if (flow < 1e-6) {
304+
if (tempFluid.getFlowRate("kg/sec") < 1e-6) {
303305
outStream.setThermoSystem(tempFluid);
304306
return;
305307
}

0 commit comments

Comments
 (0)