Skip to content

Commit

Permalink
added test for pump curve calculations
Browse files Browse the repository at this point in the history
  • Loading branch information
EvenSol committed Sep 3, 2023
1 parent 17a96fd commit 9d7c6b4
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 7 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -169,7 +169,7 @@ public void run(UUID id) {
thermoOps.TPflash();
thermoSystem.init(3);
} else {
if (calculateAsCompressor) {
if (!pumpChart.isUsePumpChart() && calculateAsCompressor) {
thermoSystem = inStream.getThermoSystem().clone();
thermoSystem.setPressure(pressure, pressureUnit);
// System.out.println("entropy inn.." + entropy);
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
package neqsim.processSimulation.processEquipment.pump;

import org.junit.jupiter.api.Assertions;
import org.junit.jupiter.api.Test;
import neqsim.processSimulation.processEquipment.stream.Stream;

Expand Down Expand Up @@ -92,17 +93,12 @@ void testSimplePumpCurve() {
80.5229826589649, 79.2210931638144, 75.4719133864634, 69.6034181197298, 58.7322388482707}};

Pump pump1 = new Pump("pump1", feedC10Stream);
pump1.setOutletPressure(10);
// pump1.run();
pump1.getPumpChart().setCurves(chartConditions, speed, flow, head, polyEff);
pump1.getPumpChart().setHeadUnit("meter");
pump1.setSpeed(500);
pump1.calculateAsCompressor(false);
// pump1.setusePumpChart()
pump1.run();

pump1.getFluid().prettyPrint();

Assertions.assertEquals(7.274237081101, pump1.getOutletPressure(), 1e-5);

}

Expand Down

0 comments on commit 9d7c6b4

Please sign in to comment.