﻿id	summary	reporter	owner	description	type	status	priority	milestone	component	version	resolution	keywords	cc
4910	Package constant not evaluated in function body by the NF	Francesco Casella	Per Östlund	"Please check [https://libraries.openmodelica.org/branches/newInst/ScalableTestSuite_noopt/files/ScalableTestSuite_noopt_ScalableTestSuite.Thermal.Advection.ScaledExperiments.SteamPipe_N_10.err ScalableTestSuite.Thermal.Advection.ScaledExperiments.SteamPipe_N_10]. The following error is generated
{{{
ScalableTestSuite_noopt_ScalableTestSuite.Thermal.Advection.ScaledExperiments.SteamPipe_N_10_functions.c:598:19:
error: use of undeclared identifier '_Modelica'
  _Tlim = fmin(_T,_Modelica._Media._Water._IF97_Utilities._BaseIF97._data._TCRIT);
                  ^
}}}
Flattening with the old FE produces
{{{
function Modelica.Media.Water.IF97_Utilities.BaseIF97.Basic.dptofT ""Derivative of pressure w.r.t. temperature along the saturation pressure curve""
  input Real T(quantity = ""ThermodynamicTemperature"", unit = ""K"", displayUnit = ""degC"", min = 0.0, start = 288.15, nominal = 300.0) ""Temperature (K)"";
  output Real dpt(unit = ""Pa/K"") ""Temperature derivative of pressure"";
  protected Real[31] o ""Vector of auxiliary variables"";
  protected Real Tlim ""Temperature limited to TCRIT"";
algorithm
  Tlim := min(T, 647.096);
}}}
while the new FE gives
{{{
function Modelica.Media.Water.IF97_Utilities.BaseIF97.Basic.dptofT ""Derivative of pressure w.r.t. temperature along the saturation pressure curve""
  input Real T(quantity = ""ThermodynamicTemperature"", unit = ""K"", displayUnit = ""degC"", min = 0.0, start = 288.15, nominal = 300.0) ""Temperature (K)"";
  output Real dpt(unit = ""Pa/K"") ""Temperature derivative of pressure"";
  protected Real[31] o ""Vector of auxiliary variables"";
  protected Real Tlim ""Temperature limited to TCRIT"";
algorithm
  Tlim := min(T, Modelica.Media.Water.IF97_Utilities.BaseIF97.data.TCRIT);
}}}
I guess {{{TCRIT}}} should be evaluated to a numerical literal by the front-end"	defect	closed	high	2.0.0	New Instantiation		fixed		
