Skip to content

Commit

Permalink
update
Browse files Browse the repository at this point in the history
  • Loading branch information
EvenSol committed Dec 11, 2023
1 parent cdd4f76 commit b80d89a
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -688,8 +688,10 @@ public void runTransient(double dt, UUID id) {
inStream.getThermoSystem().init(3);
outStream.getThermoSystem().init(3);

double polytropicHead = outStream.getThermoSystem().getEnthalpy("kJ/kg")
- inStream.getThermoSystem().getEnthalpy("kJ/kg");
polytropicEfficiency =
compressorChart.getPolytropicEfficiency(inStream.getFlowRate("m3/hr"), speed);
double polytropicHead = (outStream.getThermoSystem().getEnthalpy("kJ/kg")
- inStream.getThermoSystem().getEnthalpy("kJ/kg")) * polytropicEfficiency / 100.0;
// polytropicHead = 106.44278644;
polytropicFluidHead = polytropicHead;
// System.out.println("polytropic head " + polytropicFluidHead + " pres inn "
Expand All @@ -712,6 +714,7 @@ public void runTransient(double dt, UUID id) {
} catch (Exception e) {
logger.error(e.getMessage());
}

dH = polytropicFluidHead * 1000.0 * thermoSystem.getMolarMass() / getPolytropicEfficiency()
* inStream.getThermoSystem().getTotalNumberOfMoles();
setCalculationIdentifier(id);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -708,7 +708,7 @@ public void testAntiSurgeControl() {
valve1.setPercentValveOpening(5.0);
// valve2.setPercentValveOpening(5.0);

for (int i = 0; i < 100; i++) {
for (int i = 0; i < 200; i++) {
System.out.println("time " + i + " speed " + compressor1.getSpeed() + "feed flow "
+ stream1.getFlowRate("kg/hr") + " compressor flow rate "
+ compressor1.getInletStream().getFlowRate("kg/hr") + " out flow "
Expand All @@ -727,7 +727,7 @@ public void testAntiSurgeControl() {
valve1.setPercentValveOpening(50.0);
// valve2.setPercentValveOpening(5.0);

for (int i = 0; i < 100; i++) {
for (int i = 0; i < 1000; i++) {
System.out.println("time " + i + " speed " + compressor1.getSpeed() + "feed flow "
+ stream1.getFlowRate("kg/hr") + " compressor flow rate "
+ compressor1.getInletStream().getFlowRate("kg/hr") + " out flow "
Expand Down

0 comments on commit b80d89a

Please sign in to comment.