【发布时间】:2023-01-03 16:55:51
【问题描述】:
我是一名正在研究 HVAC 的学生。 我正在为热泵系统建模,但遇到了一些问题。
当我要通过 ExternalMedia 获取流体属性时,我遇到了一些错误。
源代码如下:
model Pentane_hs
package wf
extends ExternalMedia.Media.CoolPropMedium(
mediumName = "Pentane",
substanceNames = {"n-Pentane"},
inputChoice=ExternalMedia.Common.InputChoice.hs);
end wf;
wf.BaseProperties fluid "Properties of the two-phase fluid";
Modelica.SIunits.SpecificEnthalpy h;
Modelica.SIunits.Pressure p;
Modelica.SIunits.SpecificEntropy s;
Modelica.SIunits.DerDensityByEnthalpy drdh
"Derivative of average density by enthalpy";
Modelica.SIunits.DerDensityByPressure drdp
"Derivative of average density by pressure";
equation
//p = 1E5;
h = 0 + time*1E6;
s = 1500; //600 + time*2000;
fluid.p = p;
fluid.s = s;
fluid.h = h;
drdp = wf.density_derp_h(fluid.state);
drdh = wf.density_derh_p(fluid.state);
end Pentane_hs;
这是我得到的错误:
我正在使用 Dymola 2023x。
我试图导入库,但失败了。
我想通过压力和温度获得财产。
【问题讨论】: