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

Issue1890 nominal start values #1902

Merged
merged 5 commits into from
Jun 21, 2024
Merged

Conversation

mwetter
Copy link
Contributor

@mwetter mwetter commented Jun 19, 2024

This closes #1890

Copy link
Contributor

@jelgerjansen jelgerjansen left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@mwetter looks good! I did a quick check by compiling IBPSA.Examples.Tutorial.SimpleHouse.SimpleHouse6. It appears that the start value of Modelica.Units.SI.ThermodyanmicTemperature and Modelica.Media.Interfaces.Types.MassFraction gives rise to quite some warnings, but I get that it won't be possible to change these.

However, I also noticed warnings similar to this one:

[16] 10:46:24 Translation Warning
Alias set with conflicting start values
 * Candidate: rad.port_b.h_outflow(start = 83680.0, confidence number = 8)
 * Candidate: rad.vol[5].dynBal.medium.h(start = rad.vol[5].dynBal.hStart = IBPSA.Examples.Tutorial.SimpleHouse.SimpleHouse6.rad.vol.dynBal.Medium.specificEnthalpy_pTX(300000.0, 293.15, {1.0}), confidence number = 4)
 * Candidate: rad.vol[5].dynBal.hOut(start = rad.vol[5].dynBal.hStart = IBPSA.Examples.Tutorial.SimpleHouse.SimpleHouse6.rad.vol.dynBal.Medium.specificEnthalpy_pTX(300000.0, 293.15, {1.0}), confidence number = 4)
=> Select value from rad.vol[5].dynBal.hOut(start = rad.vol[5].dynBal.hStart = IBPSA.Examples.Tutorial.SimpleHouse.SimpleHouse6.rad.vol.dynBal.Medium.specificEnthalpy_pTX(300000.0, 293.15, {1.0})) for variable: rad.vol[5].ports[2].h_outflow

Would it make sense to change hStart in IBPSA.Fluid.Interfaces.ConservationEquation (lines 156-160) to Medium.h_default? Or do you prefer to keep using the function Medium.specificEnthalpy_pTX(p_start, T_start, X_start) as this is a more general (and safe) option?

@mwetter
Copy link
Contributor Author

mwetter commented Jun 20, 2024

@jelgerjansen : hStart should be left as is, e.g., its value should be based on {p,T,X}_start as it is the initial value used for the enthalpy that need to be consistent with p,T,X.

@mwetter mwetter merged commit fbdd4ca into master Jun 21, 2024
3 checks passed
@mwetter mwetter deleted the issue1890_nominal_start_values branch June 21, 2024 16:25
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.

Avoid conflicting nominal and start values
2 participants