hi everybody,

i am using modelica fluid library, in fact the mixture gas nasa model. usually i include the medium in the following fashion:

replaceable package Medium = Modelica.Media.Interfaces.PartialMedium;

I like to use the Medium.MMX, which are the molare mass values of all used substances. this constant vector is not defined in the medium (as introduced above) at this point but is known as soon as i specify the final medium (of type mixture gas nasa) which overloads the partial medium.

I like to somehow use the following equation for declaration:

constant Modelica.SIunits.MolarMass[Medium.nS] MMX=Medium.MMX;

then the check is aborted, which is comprehensible since the MMX value is not defined in the partial medium package.

is there a workaround to let the model checking tool know, that this variable is known in the final model (there the check works fine, as expected).As long as the check is aborted i cannot isolate other mistakes.

I also tried:

constant Modelica.SIunits.MolarMass[Medium.nS] MMX=Medium.fluidConstants.molarMass;

but still this produces the following error:

""Error: The record Modelica.Media.Interfaces.PartialMedium.FluidConstants is not a package since it contains the
non-constant components molarMass. Lookup in non-package is restricted to
encapsulated elements.
Component context: FluidConstants.molarMass
Component declared as MolarMass molarMass in Modelica.Media.Interfaces.PartialMedium
File: C:/Programme/Dymola 7.1/Modelica/Library/Modelica 3.0/Media/package.mo, line 4050""

Thx for any hints.

Regards

uwe