-
Notifications
You must be signed in to change notification settings - Fork 32
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Glycolrigfix #458
Glycolrigfix #458
Conversation
@@ -310,6 +310,16 @@ public double findOutPressure(double hinn, double hout, double polytropicEfficie | |||
@Override | |||
public void run() { | |||
thermoSystem = inStream.getThermoSystem().clone(); | |||
|
|||
if(Math.abs(pressure-thermoSystem.getPressure(pressureUnit))<1e-6 && !compressorChart.isUseCompressorChart()) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
the comparison with 1e-6 looks like a unit specific comparison. PressureUnit is a variable?
Code is also not properly formatted.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks - I will try to fix it. PressureUnit is a variable, because it can be specified when setting pressure out of the compressor. The reason for using 1e-6 was just to add a small number, to prevent errors when in and out pressure is the same (compressor not doing work). NeqSim gave an error when pressure in and out was the same, and this was a fix for that (and to prevent unnecessary calculations).
@@ -64,4 +64,6 @@ default public StreamInterface getOutStream() { | |||
/** {@inheritDoc} */ | |||
@Override | |||
public SystemInterface getThermoSystem(); | |||
|
|||
public void removeInputStream(int i); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
No documentation
@@ -1741,12 +1741,14 @@ public ComponentInterface getComponent(String name) { | |||
return componentArray[i]; | |||
} | |||
} | |||
logger.error("could not find component... " + name + " ..returning null"); | |||
logger.error("could not find component " + name + ", returning null"); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Redundant to log when catching and logging just below
No description provided.