Skip to content
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

Merged
merged 15 commits into from
Jul 15, 2022
Merged

Glycolrigfix #458

merged 15 commits into from
Jul 15, 2022

Conversation

EvenSol
Copy link
Collaborator

@EvenSol EvenSol commented Jul 7, 2022

No description provided.

@@ -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()) {
Copy link
Collaborator

@asmfstatoil asmfstatoil Jul 15, 2022

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.

Copy link
Collaborator Author

@EvenSol EvenSol Jul 15, 2022

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);
Copy link
Collaborator

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");
Copy link
Collaborator

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

@EvenSol EvenSol merged commit b16be55 into master Jul 15, 2022
@EvenSol EvenSol deleted the glycolrigfix branch July 15, 2022 08:35
@EvenSol EvenSol restored the glycolrigfix branch July 15, 2022 08:39
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants