Skip to content

Commit

Permalink
added test for flow setter for simple process (#841)
Browse files Browse the repository at this point in the history
  • Loading branch information
EvenSol authored Nov 9, 2023
1 parent 6c1a283 commit 6828284
Show file tree
Hide file tree
Showing 3 changed files with 200 additions and 137 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -152,6 +152,9 @@ public void setGasFlowRate(double flowRate, String flowUnit) {
case "Sm3/day":
conversionFactor = 1.0 / 3600.0 / 24.0;
break;
case "MSm3/day":
conversionFactor = 1.0 / 3600.0 / 24.0 * 1e6;
break;
default:
throw new RuntimeException("unit not supported " + flowUnit);
}
Expand Down Expand Up @@ -297,9 +300,8 @@ public double getWaterFlowRate(String flowUnit) {
@Override
public void run(UUID id) {
SystemInterface tempFluid = inStream.getThermoSystem().clone();
double flow = tempFluid.getFlowRate("kg/sec");

if (flow < 1e-6) {
if (tempFluid.getFlowRate("kg/sec") < 1e-6) {
outStream.setThermoSystem(tempFluid);
return;
}
Expand Down
Loading

0 comments on commit 6828284

Please sign in to comment.