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
Use of partial package SingleGasNasa #731
Comments
Comment by hubertus on 29 Apr 2012 21:40 UTC |
Comment by hansolsson on 2 May 2012 08:08 UTC The h_Tlow_der has in green: And some other code has: Basically it is suspicious if there is any dot-notation with a partial package, e.g., the following strings in the code seems suspicious in general: PartialMedium.<..>, SingleGasNasa.<..> |
Comment by hansolsson on 3 May 2012 12:03 UTC
It might be that it is necessary to also move Choices out of PartialMedium. |
Comment by hansolsson on 3 May 2012 14:42 UTC
Since PartialMedium is partial the use of full name for ThermoStates cannot be correct (this contstant is used in e.g. Fluid-models).
or move Choices-package out of PartialMedium. |
Modified by hansolsson on 22 May 2012 12:11 UTC |
Modified by hubertus on 22 May 2012 12:15 UTC |
Comment by hubertus on 28 May 2012 22:12 UTC |
Comment by hubertus on 10 Jun 2012 23:31 UTC |
Comment by sjoelund.se on 22 Aug 2012 11:44 UTC But Water extends Interfaces.PartialTwoPhaseMedium which extends PartialPureSubstance which extends PartialMedium And not PartialSimpleIdealGasMedium! So it seems to me this is what is breaking OpenModelica at the moment (Choices not found in Water tests). I reverted revisions one at a time until I found this. How does this work in Dymola? Or did I miss some extends somewhere? Was something changed in a later revision? I assumed not since HEAD also does not work, but there may be multiple issues. |
Changelog removed by sjoelund.se on 22 Aug 2012 11:44 UTC |
Comment by hubertus on 22 Aug 2012 11:53 UTC |
Comment by sjoelund.se on 22 Aug 2012 12:05 UTC But then it will not be found, right? Since Choices is no longer existing in PartialMedium, the modifier Choices.IndependentVariables.ph in packages Modelica.Media.Water.XXX cannot be found in any inherited package, and not by going up the scopes either. Doesn't the package structure then look something like:
|
Comment by sjoelund.se on 22 Aug 2012 12:19 UTC
|
Comment by hubertus on 22 Aug 2012 12:19 UTC |
Comment by hubertus on 22 Aug 2012 12:23 UTC |
Comment by sjoelund.se on 22 Aug 2012 12:29 UTC |
Reported by hansolsson on 27 Apr 2012 10:15 UTC
Classes and constants in partial packages should not be used in simulation models in Modelica (except as part of base-packages etc).
However, classes from the partial package Modelica.Media.IdealGases.Common.SingleGasNasa are used directly in three variants:
The ticket Bug in Modelica.Media.Examples.MixtureGases? #710 found one issue that could be avoided by not using the functions from that partial package in MixtureGasNasa. The functions used are at least: h_T, cp_T, s0_T, dynamicViscosityLowPressure, thermalConductivityEstimate
All constants in Modelica.Media.IdealGases.Common.FluidData
use SingleGasNasa.FluidConstants.
MixtureGasNasa.BaseProperties has an import of SingleGasNasa (should probably just be removed).
The proposal for solving the function issue for #710 also applies for those constants, included below with better package name (still subject to change):
Have not yet found any other uses of partial packages in MSL.
Migrated-From: https://trac.modelica.org/Modelica/ticket/731
The text was updated successfully, but these errors were encountered: