I'm building a pipe network. In this model some of the pipes exchange heat through a wall with a mass of fluid. The mass of fluid and the outside of the wall exchange heat by convection and I can estimate the heat transfer coefficient. In order to model this mass of fluid I want to use the HeatCapitor from the MSL as it is possible to estimate its heat capacity for my model.
Here is a visual representation of this model:
The model is balanced, and after the compilation I get this error message :

Here is the code I use :
model Ciruit_hyd_bas_avec_echanges_22_03
replaceable package Medium = Modelica.Media.Water.StandardWater constrainedby Modelica.Media.Interfaces.PartialMedium;
replaceable model HeatTransfer_1 = Modelica.Fluid.Pipes.BaseClasses.HeatTransfer.LocalPipeFlowHeatTransfer;
Modelica.Fluid.Sources.Boundary_pT inlet(redeclare package Medium = Medium, T = 311.15, nPorts = 1, p = 4.4e5) annotation(
Placement(visible = true, transformation(origin = {-86, 0}, extent = {{-10, -10}, {10, 10}}, rotation = 0)));
Modelica.Fluid.Pipes.DynamicPipe secondary_1(redeclare package Medium = Medium, diameter = 13e-3, energyDynamics = Modelica.Fluid.Types.Dynamics.SteadyStateInitial, length = 15, massDynamics = Modelica.Fluid.Types.Dynamics.SteadyStateInitial, momentumDynamics = Modelica.Fluid.Types.Dynamics.SteadyStateInitial, nNodes = 10, roughness = 3.2e-06, use_HeatTransfer = true) annotation(
Placement(visible = true, transformation(origin = {14, 76}, extent = {{-10, 10}, {10, -10}}, rotation = 0)));
Modelica.Fluid.Pipes.DynamicPipe secondary_2(redeclare package Medium = Medium, redeclare final model HeatTransfer = HeatTransfer_1, diameter = 13e-3, energyDynamics = Modelica.Fluid.Types.Dynamics.SteadyStateInitial, length = 15, massDynamics = Modelica.Fluid.Types.Dynamics.SteadyStateInitial, momentumDynamics = Modelica.Fluid.Types.Dynamics.SteadyStateInitial, nNodes = 10, roughness = 3.2e-06, use_HeatTransfer = true) annotation(
Placement(visible = true, transformation(origin = {12, -82}, extent = {{-10, -10}, {10, 10}}, rotation = 0)));
Modelica.Fluid.Pipes.DynamicPipe pipe2(redeclare package Medium = Medium, redeclare final model HeatTransfer = HeatTransfer_1, T_start = 311.15, diameter = 38e-3, energyDynamics = Modelica.Fluid.Types.Dynamics.SteadyStateInitial, length = 1, massDynamics = Modelica.Fluid.Types.Dynamics.SteadyStateInitial, momentumDynamics = Modelica.Fluid.Types.Dynamics.SteadyStateInitial, p_a_start = 4.4e5, roughness = 3.2e-06) annotation(
Placement(visible = true, transformation(origin = {-56, 0}, extent = {{-10, -10}, {10, 10}}, rotation = 0)));
inner Modelica.Fluid.System system annotation(
Placement(visible = true, transformation(origin = {-88, 88}, extent = {{-10, -10}, {10, 10}}, rotation = 0)));
Modelica.Fluid.Examples.HeatExchanger.BaseClasses.WallConstProps wallConstProps(area_h = 0.89535390627, c_wall = 510, energyDynamics = Modelica.Fluid.Types.Dynamics.SteadyStateInitial, k_wall = 60.5, n = 10, rho_wall = 7850, s = 6e-3) annotation(
Placement(visible = true, transformation(origin = {12, -56}, extent = {{-10, -10}, {10, 10}}, rotation = 0)));
Modelica.Fluid.Examples.HeatExchanger.BaseClasses.WallConstProps wallConstProps1(area_h = 0.89535390627, c_wall = 510, energyDynamics = Modelica.Fluid.Types.Dynamics.SteadyStateInitial, k_wall = 60.5, n = 10, rho_wall = 7850, s = 6e-3) annotation(
Placement(visible = true, transformation(origin = {12, 50}, extent = {{-10, -10}, {10, 10}}, rotation = 0)));
Modelica.Fluid.Pipes.DynamicPipe pipe3(redeclare package Medium = Medium, diameter = 38e-3, energyDynamics = Modelica.Fluid.Types.Dynamics.SteadyStateInitial, length = 1, massDynamics = Modelica.Fluid.Types.Dynamics.SteadyStateInitial, momentumDynamics = Modelica.Fluid.Types.Dynamics.SteadyStateInitial, roughness = 3.2e-06) annotation(
Placement(visible = true, transformation(origin = {124, 0}, extent = {{-10, -10}, {10, 10}}, rotation = 0)));
Modelica.Thermal.HeatTransfer.Components.HeatCapacitor heatCapacitor[10](each C = 418, each T(start = 328.15)) annotation(
Placement(visible = true, transformation(origin = {76, 0}, extent = {{-10, -10}, {10, 10}}, rotation = -90)));
Modelica.Fluid.Sources.MassFlowSource_T outlet(redeclare package Medium = Medium, T = 311.15, m_flow = -2.5, nPorts = 1) annotation(
Placement(visible = true, transformation(origin = {150, 0}, extent = {{10, -10}, {-10, 10}}, rotation = 0)));
Modelica.Thermal.HeatTransfer.Components.Convection convection[10] annotation(
Placement(visible = true, transformation(origin = {12, -30}, extent = {{-10, -10}, {10, 10}}, rotation = 90)));
Modelica.Thermal.HeatTransfer.Components.Convection convection2[10] annotation(
Placement(visible = true, transformation(origin = {12, 20}, extent = {{-10, 10}, {10, -10}}, rotation = -90)));
Modelica.Blocks.Sources.Constant const[10](each k = 60) annotation(
Placement(visible = true, transformation(origin = {-58, 20}, extent = {{-10, -10}, {10, 10}}, rotation = 0)));
Modelica.Blocks.Sources.Constant const1[10](each k = 60) annotation(
Placement(visible = true, transformation(origin = {-56, -30}, extent = {{-10, -10}, {10, 10}}, rotation = 0)));
equation
connect(inlet.ports[1], pipe2.port_a) annotation(
Line(points = {{-76, 0}, {-66, 0}}, color = {0, 127, 255}));
connect(pipe2.port_b, secondary_1.port_a) annotation(
Line(points = {{-46, 0}, {-22, 0}, {-22, 76}, {4, 76}}, color = {0, 127, 255}));
connect(pipe2.port_b, secondary_2.port_a) annotation(
Line(points = {{-46, 0}, {-22, 0}, {-22, -82}, {2, -82}}, color = {0, 127, 255}));
connect(secondary_1.port_b, pipe3.port_a) annotation(
Line(points = {{24, 76}, {114, 76}, {114, 0}}, color = {0, 127, 255}));
connect(secondary_2.port_b, pipe3.port_a) annotation(
Line(points = {{22, -82}, {114, -82}, {114, 0}}, color = {0, 127, 255}));
connect(pipe3.port_b, outlet.ports[1]) annotation(
Line(points = {{134, 0}, {140, 0}}, color = {0, 127, 255}));
connect(secondary_1.heatPorts, wallConstProps1.heatPort_a) annotation(
Line(points = {{14, 72}, {10, 72}, {10, 56}, {12, 56}}, color = {127, 0, 0}, thickness = 0.5));
connect(wallConstProps1.heatPort_b, convection2.solid) annotation(
Line(points = {{12, 46}, {12, 46}, {12, 30}, {12, 30}}, color = {191, 0, 0}, thickness = 0.5));
connect(const.y, convection2.Gc) annotation(
Line(points = {{-47, 20}, {2, 20}}, color = {0, 0, 127}, thickness = 0.5));
connect(const1.y, convection.Gc) annotation(
Line(points = {{-44, -30}, {0, -30}, {0, -30}, {2, -30}}, color = {0, 0, 127}, thickness = 0.5));
connect(convection.solid, wallConstProps.heatPort_a) annotation(
Line(points = {{12, -40}, {12, -40}, {12, -50}, {12, -50}}, color = {191, 0, 0}, thickness = 0.5));
connect(wallConstProps.heatPort_b, secondary_2.heatPorts) annotation(
Line(points = {{12, -60}, {12, -60}, {12, -78}, {12, -78}}, color = {191, 0, 0}, thickness = 0.5));
connect(convection2.fluid, heatCapacitor.port) annotation(
Line(points = {{12, 10}, {66, 10}, {66, 0}, {66, 0}}, color = {191, 0, 0}, thickness = 0.5));
connect(convection.fluid, heatCapacitor.port) annotation(
Line(points = {{12, -20}, {66, -20}, {66, 0}, {66, 0}}, color = {191, 0, 0}, thickness = 0.5));
annotation(
uses(Modelica(version = "3.2.3")),
Diagram(coordinateSystem(extent = {{-100, -100}, {175, 100}})),
Icon(coordinateSystem(extent = {{-100, -100}, {175, 100}})),
version = "");
end Ciruit_hyd_bas_avec_echanges_22_03;
So I wonder if it's possible to use the Heatcapacitor to model the mass of a fluid for convection or if the error is in my model?
