- Index
- » Usage and Applications
- » OpenModelica Usage and Applications
- » Error:Output parameter state was not...
Error:Output parameter state was not assigned a value - Heat Exchanger
Error:Output parameter state was not assigned a value - Heat Exchanger
Dear OM users,
I'm trying to use the heat exchanger model IBPSA.Fluid.HeatExchangers.ConstantEffectiveness.
I put boundary conditions and flow sources in order to test it.
When I run the model, I get the error : Output parameter state was not assigned a value.
I'm looking for several days but I don't know how to fix it.
I attached the model file and put the code here :
Thanks for your help,
Yann (a beginner in OM)
echangeur-test01.mo
model echangeur_test01
package Medium = IBPSA.Media.Water "Medium model";
IBPSA.Fluid.Sources.Boundary_pT sou_1( redeclare package Medium = Medium, nPorts = 1, use_T_in = false) annotation(
Placement(visible = true, transformation(extent = {{-92, -26}, {-72, -6}}, rotation = 0)));
IBPSA.Fluid.Sources.MassFlowSource_T Circuit_EM(redeclare package Medium = Medium, T = 273.15 + 70, m_flow = +0.25, nPorts = 1, use_m_flow_in = false) annotation(
Placement(visible = true, transformation(extent = {{88, -28}, {68, -8}}, rotation = 0)));
IBPSA.Fluid.HeatExchangers.ConstantEffectiveness hex(dp1_nominal = 0, dp2_nominal = 0,eps = 0.5, m1_flow_nominal = 0.25, m2_flow_nominal = 0.1893) annotation(
Placement(visible = true, transformation(origin = {-7, -1}, extent = {{-21, -25}, {21, 25}}, rotation = 0)));
IBPSA.Fluid.Sources.MassFlowSource_T Circuit_ES(T = 273.15 + 14.4, m_flow = 0.1893, nPorts = 1, use_m_flow_in = false) annotation(
Placement(visible = true, transformation(origin = {-82, 14}, extent = {{-10, -10}, {10, 10}}, rotation = 0)));
IBPSA.Fluid.Sources.Boundary_pT sou_2(nPorts = 1, use_T_in = false) annotation(
Placement(visible = true, transformation(origin = {78, 14}, extent = {{10, -10}, {-10, 10}}, rotation = 0)));
equation
connect(hex.port_a2, Circuit_EM.ports[1]) annotation(
Line(points = {{14, -16}, {68, -16}, {68, -18}, {68, -18}}, color = {0, 127, 255}));
connect(sou_1.ports[1], hex.port_b2) annotation(
Line(points = {{-72, -16}, {-28, -16}}, color = {0, 127, 255}));
connect(Circuit_ES.ports[1], hex.port_a1) annotation(
Line(points = {{-72, 14}, {-28, 14}, {-28, 14}, {-28, 14}}, color = {0, 127, 255}));
connect(hex.port_b1, sou_2.ports[1]) annotation(
Line(points = {{14, 14}, {68, 14}, {68, 14}, {68, 14}}, color = {0, 127, 255}));
annotation(
experiment(StartTime = 0, StopTime = 3600, Tolerance = 1e-06, Interval = 7.2),
uses(Modelica(version = "3.2.3"), IBPSA(version = "3.0.0")));
end echangeur_test01;
Re: Error:Output parameter state was not assigned a value - Heat Exchanger
I found the problem for the message "Ouput parameter state was not assigned a value."
=> It is necessary to add manually in the code the declaration of Medium package (at the beginning and inside each component where it is needed):
package Medium1 = IBPSA.Media.Water "Medium model"; (NB : or Medium2, Medium3 ...)
IBPSA.Fluid.Sources.Boundary_pT sou_2(redeclare package Medium = Medium2, ...)
- Index
- » Usage and Applications
- » OpenModelica Usage and Applications
- » Error:Output parameter state was not...