0

一段时间以来,我一直在尝试在 OpenModelica 上构建 Rankine Power Cycle,并且遇到了一个反复出现的问题,我只是不确定如何进行故障排除。

我的问题:我能够让我的所有 Rankine Power Cycle 模型迭代中的大部分至少获得一个经过检查的模型以及一个成功的实例化。在这一点上,我认为我的模型已准备好尝试和模拟。通常会破坏我的模拟的错误类型是位于我的模型正在使用的扩展模型中的变量。

例如:目前我正在检查和验证 Rankine Power Cycle 的子组件,以便能够正确验证哪些组件在 x、y、z 情况下工作,哪些不工作。我的热交换器模型经过检查并且能够实例化,但在模拟时我得到错误代码:

[22] 14:34:06 Symbolic Error
[ThermoPower.Gas: 1053:5-1053:66]: Model is structurally singular, error 
found sorting equations 
125: 0.0 = 0.0;
for variables 
HX.gasFlow.vbar[5](140), HX.gasFlow.drbdX1[2,4](125)

对我来说,这里的问题是上述错误或这些类型的所有错误都超链接到我自己的模型扩展的部分模型或包。因此,“vbar”或“drbdX1”上方的变量在我构建的 HeatExchanger 模型中不存在,但我自己模型中的组件以某种方式扩展到这些不可避免地导致错误的变量。

我尝试过的事情:

我尝试向扩展的超链接模型/包添加值以修复错误。这没有任何作用。

我已经尝试将上述代码行复制并粘贴到我自己的模型中,以声明已在扩展中声明的任何包/函数。这不起作用,因为通常会因不正确的声明而产生错误。

超链接错误几乎无助于我应该如何修复模型,或者我应该修复它的位置或模型。

如果您对如何解决此类问题有任何见解或建议,请随时在下面发表评论!感谢您抽出宝贵的时间阅读我的求助信息:)

热交换器代码:

型号 HX_Turbine_Check

ThermoPower.PowerPlants.HRSG.Components.HE HX(
FluidPhaseStart = ThermoPower.Choices.FluidPhase.FluidPhases.Steam, 
N_F = 6, 
N_G = 6, Tstartbar_G(displayUnit = "K") = 800, 
exchSurface_F = 2000, 
exchSurface_G = 1000, 
extSurfaceTub = 1500, 
fluidNomFlowRate = 10, 
fluidNomPressure = 2e+06, 
fluidVol = 5, 
gasNomFlowRate = 100, 
gasNomPressure = 101325, 
gasVol = 10, 
lambda = 20, 
metalVol = 10, 
pstart_F = 2e+06, 
pstart_G = 101325, 
rhomcm = 7900, 
rhonom_F(displayUnit = "kg/m3") = 0.6, 
rhonom_G(displayUnit = "kg/m3") = 0.33)  annotation(
Placement(visible = true, transformation(origin = {-30, 30}, extent = 
{{-10, -10}, {10, 10}}, rotation = 0)));

ThermoPower.Gas.SourceMassFlow FlueGasSource(
redeclare package Medium = ThermoPower.Media.FlueGas, 
T = 800, 
p0 = 101325, 
w0 = 100)  annotation(
Placement(visible = true, transformation(origin = {-92, 30}, extent = 
{{-10, -10}, {10, 10}}, rotation = 0)));

ThermoPower.Gas.SinkMassFlow FlueGasSink(
redeclare package Medium = ThermoPower.Media.FlueGas, 
p0 = 101325, 
w0 = 100)  annotation(
Placement(visible = true, transformation(origin = {32, 30}, extent = 
{{-10, -10}, {10, 10}}, rotation = 0)));

ThermoPower.Water.SourceMassFlow WaterSource(
T = 212.4 + 273, 
h = 2799500, 
p0 = 20e5, 
w0 = 10)  annotation(
Placement(visible = true, transformation(origin = {-30, 92}, extent = 
{{-10, -10}, {10, 10}}, rotation = -90)));

ThermoPower.Water.SinkMassFlow SteamSink(
p0 = 1.01325e5, 
w0 = 10)  annotation(
Placement(visible = true, transformation(origin = {48, 0}, extent = {{-10, 
-10}, {10, 10}}, rotation = 0)));

ThermoPower.Gas.SensT TGas_Inlet(
redeclare package Medium = ThermoPower.Media.FlueGas)  annotation(
Placement(visible = true, transformation(origin = {-58, 34}, extent = 
{{-10, -10}, {10, 10}}, rotation = 0)));

ThermoPower.Gas.SensT TGas_Outlet(
redeclare package Medium = ThermoPower.Media.FlueGas)  annotation(
Placement(visible = true, transformation(origin = {0, 34}, extent = {{-10, 
-10}, {10, 10}}, rotation = 0)));

ThermoPower.Water.SensT TWater_Inlet annotation(
Placement(visible = true, transformation(origin = {-26, 60}, extent = 
{{-10, -10}, {10, 10}}, rotation = -90)));

ThermoPower.Water.SensT TSteam_Outlet annotation(
Placement(visible = true, transformation(origin = {16, 4}, extent = {{-10, 
-10}, {10, 10}}, rotation = 0)));

ThermoPower.Water.SteamTurbineStodola SteamTurbine(
Kt = 0.0131, 
PRstart = 20, 
pnom = 20e5, 
wnom = 10, 
wstart = 10)  annotation(
Placement(visible = true, transformation(origin = {-20, -30}, extent = 
{{-12, -12}, {12, 12}}, rotation = 0)));

inner ThermoPower.System system annotation(
Placement(visible = true, transformation(origin = {50, 88}, extent = 
{{-10, -10}, {10, 10}}, rotation = 0)));

Modelica.Mechanics.Rotational.Sensors.PowerSensor powerSensor1 annotation(
Placement(visible = true, transformation(origin = {14, -30}, extent = 
{{-10, -10}, {10, 10}}, rotation = 0)));

ThermoPower.Electrical.Generator generator1 annotation(
Placement(visible = true, transformation(origin = {44, -30}, extent = 
{{-10, -10}, {10, 10}}, rotation = 0)));

Modelica.Blocks.Continuous.FirstOrder firstOrder1 annotation(
Placement(visible = true, transformation(origin = {30, -70}, extent = 
{{-10, -10}, {10, 10}}, rotation = 0)));

Modelica.Blocks.Interfaces.RealOutput y annotation(
Placement(visible = true, transformation(origin = {108, -70}, extent = 
{{-10, -10}, {10, 10}}, rotation = 0), iconTransformation(origin = {108, 
-70}, extent = {{-10, -10}, {10, 10}}, rotation = 0)));

equation
connect(firstOrder1.y, y) annotation(
Line(points = {{42, -70}, {100, -70}, {100, -70}, {108, -70}}, color = {0, 
0, 127}));
connect(powerSensor1.power, firstOrder1.u) annotation(
Line(points = {{6, -42}, {6, -42}, {6, -70}, {18, -70}, {18, -70}}, color 
= {0, 0, 127}));
connect(powerSensor1.flange_b, generator1.shaft) annotation(
Line(points = {{24, -30}, {36, -30}, {36, -30}, {36, -30}}));
connect(SteamTurbine.shaft_b, powerSensor1.flange_a) annotation(
Line(points = {{-12, -30}, {4, -30}, {4, -30}, {4, -30}}));
connect(SteamTurbine.outlet, TSteam_Outlet.inlet) annotation(
Line(points = {{-10, -20}, {0, -20}, {0, 0}, {10, 0}}, color = {0, 0, 
255}));
connect(TSteam_Outlet.outlet, SteamSink.flange) annotation(
Line(points = {{22, 0}, {38, 0}}, color = {0, 0, 255}));
connect(HX.waterOut, SteamTurbine.inlet) annotation(
Line(points = {{-30, 20}, {-30, -20}}, color = {0, 0, 255}));
connect(TWater_Inlet.outlet, HX.waterIn) annotation(
Line(points = {{-30, 54}, {-30, 54}, {-30, 40}, {-30, 40}}, color = {0, 0, 
255}));
connect(WaterSource.flange, TWater_Inlet.inlet) annotation(
Line(points = {{-30, 82}, {-30, 82}, {-30, 66}, {-30, 66}}, color = {0, 0, 
255}));
connect(TGas_Outlet.outlet, FlueGasSink.flange) annotation(
Line(points = {{6, 30}, {14, 30}, {14, 30}, {22, 30}, {22, 30}, {22, 30}}, 
color = {159, 159, 223}));
connect(HX.gasOut, TGas_Outlet.inlet) annotation(
Line(points = {{-20, 30}, {-13, 30}, {-13, 30}, {-6, 30}, {-6, 30}, {-6, 
30}, {-6, 30}, {-6, 30}}, color = {159, 159, 223}));
connect(TGas_Inlet.outlet, HX.gasIn) annotation(
Line(points = {{-52, 30}, {-46, 30}, {-46, 30}, {-40, 30}, {-40, 30}, 
{-40, 30}, {-40, 30}, {-40, 30}}, color = {159, 159, 223}));
connect(FlueGasSource.flange, TGas_Inlet.inlet) annotation(
Line(points = {{-82, 30}, {-64, 30}, {-64, 30}, {-64, 30}}, color = {159, 
159, 223}));
connect(HX.gasOut, HX.gasIn) annotation(
Line(points = {{-20, 30}, {-40, 30}}, color = {159, 159, 223}));

annotation(
uses(ThermoPower(version = "3.1"), Modelica(version = "3.2.3")));end 
HX_Turbine_Check;
4

0 回答 0