-
Notifications
You must be signed in to change notification settings - Fork 166
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
Delete variables dens and R_air from Modelica.Mechanics.MultiBody.Examples.Loops.Utilities.GasForce2 #4081
Conversation
@casella and @HansOlsson could also review that PR. |
@MartinOtter @casella @HansOlsson kindly look into the fix for this ticket. |
@@ -24,7 +24,8 @@ model GasForce2 "Rough approximation of gas force in a combustion engine's cylin | |||
SI.Velocity v_rel "Relative piston velocity (<0: compression; >0: expansion)"; | |||
|
|||
protected | |||
constant SI.SpecificHeatCapacity R_air = Modelica.Constants.R/0.0289651159; | |||
constant SI.MolarMass MM_gas = 0.0289651159; |
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.
constant SI.MolarMass MM_gas = 0.0289651159; | |
constant SI.MolarMass MM_gas = 0.0289651159 "Molar mass for dry air; should be changed"; |
This is somewhat complicated. Just having the value for "air" and calling it "gas" without any explanation seems confusing to me.
I see the following possibilities:
- Explain it as proposed.
- Call it "air" as before - but then we get the question of why there's just air in a combustion chamber.
- Call it "gas" without explanation - but using the name "gas" for "air" seems as if we know it is bad, and just try to hide it.
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.
@HansOlsson I fully agree with you. To rename to "gas" was just to be complementary with "gasForce".
To explain the model as purposed, we need the proper molar mass of the gas. This need some recherche. And, of course, the simulation results will change then.
But I agree this is the way we should preferre.
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.
I reviewed the model and, actually, R_air / R_gas
is used just to calculate the gas' density dens
which itself is not further used. So I tend to remove the variables R_air
and dens
completely. The regression results shall not be concerned.
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.
I reviewed the model and, actually,
R_air / R_gas
is used just to calculate the gas' densitydens
which itself is not further used. So I tend to remove the variablesR_air
anddens
completely. The regression results shall not be concerned.
Yes, this makes sense: Remove R_air and dens.
@tobolar were you able to come up with something considering the suggestions of @HansOlsson.Kindly commit the fix if you have worked it out. Many Thanks |
@tobolar were you able to work through the problem?Kindly commit if you have found the fix.Many Thanks.. |
See my last comment #4081 (comment) |
I agree with that idea - but I guess the thumb-up was a bit too subtle. |
@tobolar sorry i somehow missed your comment |
c8ac418
to
9f44ab5
Compare
@HansOlsson Sorry, I really overlooked it. :-O |
1eaba93
to
e2ce981
Compare
Both |
@MartinOtter @HansOlsson would you please approve the PR as the comments are addressed? |
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.
Looks good.
Close #4080