-
Notifications
You must be signed in to change notification settings - Fork 30
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
added compressor test and initial code (#877)
* added compressor test and initial code * some more work * some further work to get dynamic compressor to work * strugling to find error * improve compressor calcs * added compressor mointor * further work in dynamic compressors * update * updates * updated * further work * update dynamic * update * update * update * update * update * update * update * update * update power * add maxminspeed setters * check if controller is active * removed try catch block and added check for actualFlowRateNew * removed print to screen in test
- Loading branch information
Showing
15 changed files
with
869 additions
and
117 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
58 changes: 58 additions & 0 deletions
58
src/main/java/neqsim/processSimulation/measurementDevice/CompressorMonitor.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,58 @@ | ||
package neqsim.processSimulation.measurementDevice; | ||
|
||
import neqsim.processSimulation.processEquipment.compressor.Compressor; | ||
|
||
/** | ||
* <p> | ||
* CompressorMonitor class. | ||
* </p> | ||
* | ||
* @author ESOL | ||
* @version $Id: $Id | ||
*/ | ||
public class CompressorMonitor extends MeasurementDeviceBaseClass { | ||
private static final long serialVersionUID = 1000; | ||
protected Compressor compressor = null; | ||
|
||
/** | ||
* <p> | ||
* Constructor for CompressorMonitor. | ||
* </p> | ||
* | ||
* @param compressor a {@link neqsim.processSimulation.processEquipment.compressor.Compressor} | ||
* object | ||
*/ | ||
public CompressorMonitor(Compressor compressor) { | ||
this("Compressor Monitor", compressor); | ||
} | ||
|
||
/** | ||
* <p> | ||
* Constructor for CompressorMonitor. | ||
* </p> | ||
* | ||
* @param name Name of Compressor | ||
* @param compressor a {@link neqsim.processSimulation.processEquipment.compressor.Compressor} | ||
*/ | ||
public CompressorMonitor(String name, Compressor compressor) { | ||
super(name, "rpm"); | ||
this.compressor = compressor; | ||
} | ||
|
||
/** {@inheritDoc} */ | ||
@Override | ||
public void displayResult() { | ||
System.out.println("measured speed " + compressor.getSpeed()); | ||
} | ||
|
||
/** {@inheritDoc} */ | ||
@Override | ||
public double getMeasuredValue(String unit) { | ||
if (unit.equals("distance to surge")) { | ||
return compressor.getDistanceToSurge(); | ||
} else { | ||
return compressor.getDistanceToSurge(); | ||
// return compressor.getSpeed(); | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.