MSL 热电容器可以用于模拟流体对流吗?
我正在建设一个管网。在此模型中,一些管道通过壁与大量流体交换热量。流体的质量和壁的外部通过对流交换热量,我可以估计传热系数。为了对这种流体质量进行建模,我想使用 MSL 中的 HeatCapitor
,因为可以为我的模型估计其热容量。
以下是该模型的直观表示:
这是我使用的代码:
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;
所以我想知道是否可以使用Heatcapacitor
来模拟对流流体的质量,或者错误是否出在我的模型中?
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?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论