﻿id	summary	reporter	owner	description	type	status	priority	milestone	component	version	resolution	keywords	cc
6243	Issues with partial packages in Chemical library	Francesco Casella	Per Östlund	"Please run {{{https://libraries.openmodelica.org/branches/newInst/Chemical/files/Chemical_Chemical.Examples.FluidAdapter.err Chemical.Examples.FluidAdapter}}}. The NF fails with
{{{
[Modelica 3.2.3/Media/package.mo:5463:7-5466:18:writable] Error: 
Called function ‘setState_pTX‘ is partial.
[Modelica 3.2.3/Fluid/Interfaces.mo:20:5-21:69:writable] Error:
Class Medium.ExtraProperty not found in scope FluidPort.
}}}
The model uses the medium package {{{StandardWater_C}}}, whose definition is
{{{#!mo
package StandardWater_C
 extends Modelica.Media.Water.StandardWater(
   extraPropertiesNames={""H2O""},
   singleState=true, T_default=310.15, X_default=ones(nX),  C_default={1000});

 extends Chemical.Interfaces.PartialMedium_C(
    redeclare package stateOfMatter = Chemical.Interfaces.Incompressible,
    ThermoStates=Modelica.Media.Interfaces.Choices.IndependentVariables.ph,
    mediumName=""WaterIF97"",
    substanceNames={""water""},
    fixedX=true,
    reference_p(start=50e5),
    reference_T(start=500),
    p_default(start=50e5),
    h_default(start=1.0e5),
    extraPropertiesNames={""H2O""},
    singleState=true,
    T_default(start=500) = 310.15,
    X_default=ones(nX),
    C_default={1000},
    substanceData={Examples.Substances.Water_liquid()});
end StandardWater_C;
}}}
This is a bit tricky: I understand the intention is to add some extra stuff (contained in {{{PartialMedium_C}}}) to the fully functional {{{StandardWater}}}. It seems that the second extends overrides the definitions of function of {{{StandardWater}}} and reinstates something from the partial model {{{PartialMedium_C extends PartialMedium;}}}.

Dymola runs this model without giving any warning about types.

@perost, is there something fishy in this medium definition, or is your partial-package detection still a bit too over-reacting?"	defect	closed	high	1.17.0	New Instantiation	1.16.0	fixed		marek@…
