﻿id	summary	reporter	owner	description	type	status	priority	milestone	component	version	resolution	keywords	cc
4316	Simulation of Modelica.Fluid.Examples.Pumpingsystem and HeatingSystem fail	anonymous	Francesco Casella	"Modelica Library 3.2.1 Build3
Openmodelica 1.12.0~dev-513-gc9b9653
Ubuntu 16.04

The examples PumpingSystem and HeatingSystem both fail to simulate. The process for simulating PumpingSystem ends with:

{{{
stdout | OMEditInfo | <p>/tmp/OpenModelica_briant/OMEdit/Modelica.Fluid.Examples.PumpingSystem -port=42081 -logFormat=xmltcp -override=startTime=0,stopTime=2000,stepSize=0.4,tolerance=1e-06,solver=dassl,outputFormat=mat,variableFilter=.* -r=Modelica.Fluid.Examples.PumpingSystem_res.mat -w -lv=LOG_STATS</p>
LOG_NLS | warning | <p>Matrix singular!</p>
LOG_NLS | warning | <p>under-determined linear system not solvable!</p>
LOG_NLS | warning | <p>Matrix singular!</p>
LOG_NLS | warning | <p>under-determined linear system not solvable!</p>
LOG_NLS | warning | <p>Matrix singular!</p>
LOG_NLS | warning | <p>under-determined linear system not solvable!</p>
LOG_NLS_V | warning | <p>Warning: maximal number of iteration reached but no root found</p>
stdout | warning | <p>While solving non-linear system an assertion failed during initialization.</p>
LOG_NLS_V | warning | <p>Warning: maximal number of iteration reached but no root found</p>
stdout | warning | <p>While solving non-linear system an assertion failed during initialization.</p>
stdout | warning | <p>While solving non-linear system an assertion failed during initialization.</p>
LOG_NLS | warning | <p>nonlinear system 118 fails: at t=0</p>
assert | debug | <p>Solving non-linear system 118 failed at time=0.<br>
For more information please use -lv LOG_NLS.</p>
assert | info | <p>simulation terminated by an assertion at initialization</p>
stdout | error | <p>Simulation process failed. Exited with code 255.</p>
}}}

HeatingSystem does not compile:


{{{
[1] 22:35:06 Translation Warning
Iteration variables with default zero start attribute in torn nonlinear equation system:
         $DER.pump.dp_pump:DUMMY_DER(fixed = false )  ""Pressure increase"" type: Real 
         $DER.pump.medium.h:DUMMY_DER(fixed = false )  ""Specific enthalpy of medium"" type: Real 


[2] 22:35:06 Symbolic Error
[Modelica.Fluid.Pipes: 1116:13-1116:140]: Model is structurally singular, error found sorting equations 
 18: heater.flowModel.Fs_p[1] = heater.crossAreas[1] * (heater.mediums[1].p - pump.p_b_nominal) * heater.flowModel.nParallel;
17: $cse17 = Modelica.Media.Water.IF97_Utilities.waterBaseProp_ph(heater.mediums[1].p, heater.mediums[1].h, heater.statesFM[2].phase, 0);
19: heater.statesFM[2].phase = if heater.mediums[1].h < Modelica.Media.Water.IF97_Utilities.BaseIF97.Regions.hvl_p(heater.mediums[1].p, Modelica.Media.Water.IF97_Utilities.BaseIF97.Regions.boilingcurve_p(heater.mediums[1].p)) or heater.mediums[1].h > Modelica.Media.Water.IF97_Utilities.BaseIF97.Regions.hvl_p(heater.mediums[1].p, Modelica.Media.Water.IF97_Utilities.BaseIF97.Regions.dewcurve_p(heater.mediums[1].p)) or heater.mediums[1].p > 22064000.0 then 1 else 2;
15: heater.heatTransfer.Ts[1] = Modelica.Media.Water.IF97_Utilities.T_props_ph(heater.mediums[1].p, heater.mediums[1].h, $cse17);
33: pump.heatTransfer.states[1].phase = if pump.medium.h < Modelica.Media.Water.IF97_Utilities.BaseIF97.Regions.hvl_p(pump.p_b_nominal, Modelica.Media.Water.IF97_Utilities.BaseIF97.Regions.boilingcurve_p(pump.p_b_nominal)) or pump.medium.h > Modelica.Media.Water.IF97_Utilities.BaseIF97.Regions.hvl_p(pump.p_b_nominal, Modelica.Media.Water.IF97_Utilities.BaseIF97.Regions.dewcurve_p(pump.p_b_nominal)) or pump.p_b_nominal > 22064000.0 then 1 else 2;
31: $cse6 = Modelica.Media.Water.IF97_Utilities.waterBaseProp_ph(pump.p_b_nominal, pump.medium.h, pump.heatTransfer.states[1].phase, 0);
10: pump.Hb_flow = m_flow * (smooth(0, tank.medium.h) - smooth(0, pump.medium.h));
8: -pump.Hb_flow = pump.W_single * /*Real*/(pump.nParallel);
5: pump.eta = Modelica.Fluid.Machines.ControlledPump$pump.efficiencyCharacteristic(pump.V_flow_single * pump.N_nominal / pump.N, 0.8);
3: pump.dp_pump = pump.p_b_nominal - tank.ports[2].p;
38: $STATESET1.J[3] = pump.W_single - pump.dp_pump * pump.V_flow_single / pump.eta;
29: pump.rho = Modelica.Media.Water.IF97_Utilities.rho_props_ph(pump.p_b_nominal, pump.medium.h, $cse6);
7: pump.V_flow_single = pump.V_flow / /*Real*/(pump.nParallel);
9: pump.V_flow = m_flow / pump.rho;
16: heater.flowModel.dps_fg[1] = -2.0 * heater.flowModel.Fs_p[1] / (heater.flowModel.nParallel * 2.0 * heater.crossAreas[1]);
14: heater.statesFM[2].d = Modelica.Media.Water.IF97_Utilities.rho_props_ph(heater.mediums[1].p, heater.mediums[1].h, $cse17);
13: heater.flowModel.mus[2] = Modelica.Media.Water.IF97_Utilities.dynamicViscosity(heater.statesFM[2].d, heater.heatTransfer.Ts[1], heater.mediums[1].p, heater.statesFM[2].phase);
11: m_flow = $cse43 * heater.flowModel.nParallel;
25: heater.statesFM[1].d = Modelica.Media.Water.IF97_Utilities.rho_props_ph(pump.p_b_nominal, pump.medium.h, $cse27);
12: $cse43 = Modelica.Fluid.Pipes.DynamicPipe$heater.FlowModel$heater$flowModel.WallFriction.massFlowRate_dp_staticHead(heater.flowModel.dps_fg[1], heater.statesFM[1].d, heater.statesFM[2].d, heater.flowModel.mus[1], heater.flowModel.mus[2], heater.pathLengths[1], heater.dimensions[1], 0.0, heater.crossAreas[1], heater.roughnesses[1], 0.5 * heater.flowModel.dp_small, heater.flowModel.Re_turbulent);
21: heater.flowModel.mus[1] = Modelica.Media.Water.IF97_Utilities.dynamicViscosity(heater.statesFM[1].d, heater.statesFM[1].T, pump.p_b_nominal, 0);
23: heater.statesFM[1].T = Modelica.Media.Water.IF97_Utilities.T_props_ph(pump.p_b_nominal, pump.medium.h, $cse27);
35: $cse27 = Modelica.Media.Water.IF97_Utilities.waterBaseProp_ph(pump.p_b_nominal, pump.medium.h, 0, 0);
 for variables 
 heater.flowModel.mus[1](77), $cse17.vt(86), $cse17.vp(81), $cse17.h(91), $cse17.T(83), heater.flowModel.Fs_p[1](80), $cse17.p(88), $cse17.cp(89), tank.portInDensities[2](78), $cse17.cv(92), heater.statesFM[2].phase(79), $cse17.region(84), $cse17.pt(85), $cse17.R(93), $cse17.pd(94), heater.statesFM[2].d(99), pump.dp_pump(110), $cse17.phase(82), pump.V_flow_single(106), $cse1.h(30), $cse6.region(51), $cse6.cv(41), $cse6.pd(49), $cse6.rho(44), $cse6.x(42), $cse6.phase(45), $cse6.R(38), $cse6.h(50), $cse6.p(52), $cse6.s(39), $cse6.dpT(46), $cse6.T(47), $cse6.vp(48), $cse6.cp(43), $cse6.pt(40), $cse6.vt(37), $cse8(107), heater.heatTransfer.Ts[1](98), heater.flowModel.dps_fg[1](97), $cse17.rho(96), pump.rho(54), tank.heatTransfer.states[1].d(53), pump.W_single(105), $cse43(101), pump.V_flow(104), pump.eta(108), $cse17.s(95), heater.statesFM[1].d(58), heater.flowModel.mus[2](100), $cse17.x(87), heater.statesFM[1].T(60), $cse27.rho(3), $cse27.T(4), $cse27.dpT(5), $cse27.vp(6), pump.N(113), $cse27.vt(8), $cse27.p(7), $cse27.cv(10), $cse27.R(9), $cse27.s(11), $cse27.h(13), $cse27.region(14), $cse27.pd(15), $cse27.cp(16), $cse1.pt(23), $cse1.dpT(31), pump.Hb_flow(103)

[3] 22:35:06 Translation Error
Internal error Transformation Module PFPlusExt index Reduction Method Pantelides failed!

[4] 22:35:06 Translation Error
[/build/openmodelica-Mf9OLm/openmodelica-1.12.0~dev-513-gc9b9653/OMCompiler/Compiler/SimCode/SimCodeUtil.mo: 4170:9-4170:59]: Internal error function createStateSetsSets failed.

[5] 22:35:06 Translation Error
[/build/openmodelica-Mf9OLm/openmodelica-1.12.0~dev-513-gc9b9653/OMCompiler/Compiler/SimCode/SimCodeUtil.mo: 592:5-592:146]: Internal error function createSimCode failed [Transformation from optimised DAE to simulation code structure failed]
}}}
"	defect	closed	blocker	2.0.0	*unknown*	v1.12.0	fixed	examples heatingsystem pumpingsystem	
