Skip to content

Commit

Permalink
fix set lp limit (#885)
Browse files Browse the repository at this point in the history
  • Loading branch information
EvenSol authored Dec 19, 2023
1 parent 32403aa commit a528a35
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@
import neqsim.thermo.ThermodynamicConstantsInterface;
import neqsim.thermo.system.SystemInterface;
import neqsim.thermodynamicOperations.ThermodynamicOperations;
import neqsim.util.unit.PressureUnit;

/**
* <p>
Expand Down Expand Up @@ -858,4 +859,14 @@ public double getOGIP(String unit) {
public double getTime() {
return time;
}

public void setLowPressureLimit(double value, String unit) {
PressureUnit conver = new PressureUnit(value, unit);
lowPressureLimit = conver.getValue("bara");
}

public double getLowPressureLimit(String unit) {
PressureUnit conver = new PressureUnit(lowPressureLimit, "bara");
return conver.getValue(unit);
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -60,5 +60,9 @@ void testRun2() {
}
Assertions.assertEquals(352.274030, reservoirOps.getReservoirFluid().getPressure("bara"), 0.1);
Assertions.assertEquals(11.698, reservoirOps.getWaterProdution("Sm3/day"), 0.1);

reservoirOps.setLowPressureLimit(52.0e5, "Pa");
Assertions.assertEquals(52.0, reservoirOps.getLowPressureLimit("bara"), 0.1);
Assertions.assertEquals(52.0e5, reservoirOps.getLowPressureLimit("Pa"), 0.1);
}
}

0 comments on commit a528a35

Please sign in to comment.