Modelica 封闭热流体回路中的介质

Modelica 封闭热流体回路中的介质,modelica,dymola,openmodelica,Modelica,Dymola,Openmodelica,在一个太阳能热电厂的项目中,我在平衡封闭热流体回路中的压力时遇到了一些困难,所以我决定制作一个简单的系统来消除一些错误。以下是两个储罐之间的简单回路,使用MSL中的水介质可正常工作: model TankTestfluid Modelica.Fluid.Pipes.StaticPipe pipe( p_a_start=system.p_ambient, length=20, height_ab=-20, redeclare package Medium =

在一个太阳能热电厂的项目中,我在平衡封闭热流体回路中的压力时遇到了一些困难,所以我决定制作一个简单的系统来消除一些错误。以下是两个储罐之间的简单回路,使用MSL中的水介质可正常工作:

model TankTestfluid

  Modelica.Fluid.Pipes.StaticPipe pipe(
    p_a_start=system.p_ambient,
    length=20,
    height_ab=-20,
    redeclare package Medium = Medium,
    diameter=0.1) annotation (Placement(transformation(
        extent={{-10,-10},{10,10}},
        rotation=-90,
        origin={50,10})));
  Modelica.Fluid.Pipes.StaticPipe pipe1(
    p_a_start=system.p_ambient,
    length=20,
    height_ab=20,
    redeclare package Medium = Medium,
    diameter=0.1) annotation (Placement(transformation(
        extent={{-10,-10},{10,10}},
        rotation=90,
        origin={-50,10})));
  Modelica.Fluid.Machines.ControlledPump pump(
    redeclare package Medium = Medium,
    p_a_nominal=system.p_ambient,
    m_flow_nominal=100,
    p_b_nominal=200000) annotation (Placement(transformation(
        extent={{-10,-10},{10,10}},
        rotation=90,
        origin={-50,-42})));
  inner Modelica.Fluid.System system
    annotation (Placement(transformation(extent={{-80,60},{-60,80}})));
  Modelica.Fluid.Vessels.OpenTank tank1(
    height=10,
    crossArea=3,
    redeclare package Medium = Medium,
    nPorts=2,
    portsData={Modelica.Fluid.Vessels.BaseClasses.VesselPortsData(diameter=0.05),
        Modelica.Fluid.Vessels.BaseClasses.VesselPortsData(diameter=0.05)},
    level_start=7,
    use_portsData=false,
    use_HeatTransfer=false,
    T_start=363.15)
    annotation (Placement(transformation(extent={{-12,-82},{28,-42}})));
  Modelica.Fluid.Vessels.OpenTank tank2(
    height=10,
    crossArea=3,
    nPorts=2,
    redeclare package Medium = Medium,
    portsData={Modelica.Fluid.Vessels.BaseClasses.VesselPortsData(diameter=0.05),
        Modelica.Fluid.Vessels.BaseClasses.VesselPortsData(diameter=0.05)},
    level_start=3,
    use_portsData=false,
    use_HeatTransfer=false,
    T_start=353.15)
    annotation (Placement(transformation(extent={{-20,30},{20,70}})));
//    replaceable package Medium = SolarTherm.Media.MoltenSalt.MoltenSalt_base
//      constrainedby Modelica.Media.Interfaces.PartialMedium annotation (
//        __Dymola_choicesAllMatching=true);
   replaceable package Medium = Modelica.Media.Water.StandardWater
     constrainedby Modelica.Media.Interfaces.PartialMedium annotation (
       __Dymola_choicesAllMatching=true);
equation 
  connect(pump.port_b, pipe1.port_a)
    annotation (Line(points={{-50,-32},{-50,0}}, color={0,127,255}));
  connect(pipe1.port_b, tank2.ports[1]) annotation (Line(points={{-50,20},{-28,20},
          {-28,30},{-4,30}}, color={0,127,255}));
  connect(tank2.ports[2], pipe.port_a) annotation (Line(points={{4,30},{26,30},{
          26,20},{50,20}}, color={0,127,255}));
  connect(pipe.port_b, tank1.ports[1]) annotation (Line(points={{50,0},{32,0},{32,
          -82},{4,-82}}, color={0,127,255}));
  connect(tank1.ports[2], pump.port_a) annotation (Line(points={{12,-82},{-22,-82},
          {-22,-52},{-50,-52}}, color={0,127,255}));
  annotation (uses(Modelica(version="3.2.2"), SolarTherm(version="0.2")));
end TankTestfluid;
现在,当我尝试使用熔盐介质的完全相同的模型时,我得到了一个错误。我使用的熔盐介质位于(阿尔伯托分公司):

唯一的区别(除了介质)是起始温度(因此盐仍然是液体):

现在,无论我使用什么泵的质量流量,我永远不能填满“顶部”油箱,事实上,顶部油箱的排水速度越快,我设置的质量流量越大

这里的错误来源可能是什么

model MoltenSaltTest

  Modelica.Fluid.Pipes.StaticPipe pipe(
    p_a_start=system.p_ambient,
    length=20,
    height_ab=-20,
    redeclare package Medium = Medium,
    diameter=0.1) annotation (Placement(transformation(
        extent={{-10,-10},{10,10}},
        rotation=-90,
        origin={50,10})));
  Modelica.Fluid.Pipes.StaticPipe pipe1(
    p_a_start=system.p_ambient,
    length=20,
    height_ab=20,
    redeclare package Medium = Medium,
    diameter=0.1) annotation (Placement(transformation(
        extent={{-10,-10},{10,10}},
        rotation=90,
        origin={-50,10})));
  Modelica.Fluid.Machines.ControlledPump pump(
    redeclare package Medium = Medium,
    p_a_nominal=system.p_ambient,
    T_start=673.15,
    p_b_nominal=200000,
    m_flow_nominal=10)  annotation (Placement(transformation(
        extent={{-10,-10},{10,10}},
        rotation=90,
        origin={-50,-42})));
  inner Modelica.Fluid.System system
    annotation (Placement(transformation(extent={{-80,60},{-60,80}})));
  Modelica.Fluid.Vessels.OpenTank tank1(
    height=10,
    crossArea=3,
    redeclare package Medium = Medium,
    nPorts=2,
    portsData={Modelica.Fluid.Vessels.BaseClasses.VesselPortsData(diameter=0.05),
        Modelica.Fluid.Vessels.BaseClasses.VesselPortsData(diameter=0.05)},
    level_start=7,
    use_portsData=false,
    use_HeatTransfer=false,
    T_start=673.15)
    annotation (Placement(transformation(extent={{-12,-82},{28,-42}})));
  Modelica.Fluid.Vessels.OpenTank tank2(
    height=10,
    crossArea=3,
    nPorts=2,
    redeclare package Medium = Medium,
    portsData={Modelica.Fluid.Vessels.BaseClasses.VesselPortsData(diameter=0.05),
        Modelica.Fluid.Vessels.BaseClasses.VesselPortsData(diameter=0.05)},
    level_start=3,
    use_portsData=false,
    use_HeatTransfer=false,
    T_start=573.15)
    annotation (Placement(transformation(extent={{-20,30},{20,70}})));
   replaceable package Medium = SolarTherm.Media.MoltenSalt.MoltenSalt_base
     constrainedby Modelica.Media.Interfaces.PartialMedium annotation (
       __Dymola_choicesAllMatching=true);
   // replaceable package Medium = Modelica.Media.Water.StandardWater
   //   constrainedby Modelica.Media.Interfaces.PartialMedium annotation (
   //     __Dymola_choicesAllMatching=true);
equation 
  connect(pump.port_b, pipe1.port_a)
    annotation (Line(points={{-50,-32},{-50,0}}, color={0,127,255}));
  connect(pipe1.port_b, tank2.ports[1]) annotation (Line(points={{-50,20},{-28,20},
          {-28,30},{-4,30}}, color={0,127,255}));
  connect(tank2.ports[2], pipe.port_a) annotation (Line(points={{4,30},{26,30},{
          26,20},{50,20}}, color={0,127,255}));
  connect(pipe.port_b, tank1.ports[1]) annotation (Line(points={{50,0},{32,0},{32,
          -82},{4,-82}}, color={0,127,255}));
  connect(tank1.ports[2], pump.port_a) annotation (Line(points={{12,-82},{-22,-82},
          {-22,-52},{-50,-52}}, color={0,127,255}));
  annotation (uses(Modelica(version="3.2.2"), SolarTherm(version="0.2")));
end MoltenSaltTest;