- Index
- » Usage and Applications
- » OpenModelica Usage and Applications
- » code 0xffffffffffffffff.
code 0xffffffffffffffff.
code 0xffffffffffffffff.
Hi there
Anyone! Please help.
I have developed a simple model. When I simulate the following error comes out.
"simulation terminated by an assertion at initialization
Simulation process failed. Exited with code 0xffffffffffffffff."
How can I solve this issue?
Thanks in advance
Re: code 0xffffffffffffffff.
Without seeing your model is really hard to find where the error is.
If you cannot share the model publicly maybe you can send it to us privately via email at
OpenModelica@ida.liu.se and we will use it for debugging and then delete it.
- adrpo
- 885 Posts
Re: code 0xffffffffffffffff.
There is no issue to share it publically.
There are the warnings when I checked the model.
[1] 18:25:41 Translation Warning
[ThermoPower.Water: 8839:5-8843:11]: In relation sourceW.G == 0.0, == on Real numbers is only allowed inside functions.
[2] 18:25:41 Translation Warning
[ThermoPower.Water: 8772:5-8776:11]: In relation sinkP.R == 0.0, == on Real numbers is only allowed inside functions.
[3] 18:25:41 Scripting Notification
Check of FirstNewExperiment completed successfully.
Re: code 0xffffffffffffffff.
This is the code:
Code:
model FirstNewExperiment
ThermoPower.Water.SensT sensT annotation(
Placement(visible = true, transformation(origin = {-16, -66}, extent = {{-10, -10}, {10, 10}}, rotation = 0)));
ThermoPower.Water.Flow1DFEM flow1DFEM(A = 0.00031416, L = 10, Nw = 2, dpnom(displayUnit = "Pa") = 200000, omega = 1, wnom = 0.3) annotation(
Placement(visible = true, transformation(origin = {16, -70}, extent = {{-10, -10}, {10, 10}}, rotation = 0)));
ThermoPower.Water.ValveLiq valveLiq annotation(
Placement(visible = true, transformation(origin = {50, -70}, extent = {{-10, -10}, {10, 10}}, rotation = 0)));
Modelica.Blocks.Sources.Step FlowRateStep(height = -0.1, offset = 0.3, startTime = 50) annotation(
Placement(visible = true, transformation(origin = {-80, -30}, extent = {{-10, -10}, {10, 10}}, rotation = 0)));
Modelica.Blocks.Sources.Step SpecificEnthalpyStep(height = 42000, offset = 100000, startTime = 0) annotation(
Placement(visible = true, transformation(origin = {-74, 10}, extent = {{-10, -10}, {10, 10}}, rotation = 0)));
Modelica.Blocks.Sources.Constant Constant(k = 1) annotation(
Placement(visible = true, transformation(origin = {70, -20}, extent = {{10, -10}, {-10, 10}}, rotation = 0)));
Modelica.Blocks.Sources.Step ExternalPower(height = 12500, offset = 0, startTime = 30) annotation(
Placement(visible = true, transformation(origin = {-8, 0}, extent = {{-10, -10}, {10, 10}}, rotation = 0)));
ThermoPower.Thermal.HeatSource1DFEM heatSource1DFEM(L = 1, omega = 1) annotation(
Placement(visible = true, transformation(origin = {16, -34}, extent = {{-10, -10}, {10, 10}}, rotation = 0)));
inner ThermoPower.System system annotation(
Placement(visible = true, transformation(origin = {2, 78}, extent = {{-10, -10}, {10, 10}}, rotation = 0)));
ThermoPower.Water.SourceW sourceW annotation(
Placement(visible = true, transformation(origin = {-50, -70}, extent = {{-10, -10}, {10, 10}}, rotation = 0)));
ThermoPower.Water.SinkP sinkP annotation(
Placement(visible = true, transformation(origin = {84, -70}, extent = {{-10, -10}, {10, 10}}, rotation = 0)));
equation
connect(Constant.y, valveLiq.theta) annotation(
Line(points = {{60, -20}, {50, -20}, {50, -62}}, color = {0, 0, 127}));
connect(sensT.outlet, flow1DFEM.infl) annotation(
Line(points = {{-10, -70}, {6, -70}}, color = {0, 0, 255}));
connect(flow1DFEM.outfl, valveLiq.inlet) annotation(
Line(points = {{26, -70}, {40, -70}}, color = {0, 0, 255}));
connect(heatSource1DFEM.wall, flow1DFEM.wall) annotation(
Line(points = {{16, -37}, {16, -64}}, color = {255, 127, 0}));
connect(heatSource1DFEM.power, ExternalPower.y) annotation(
Line(points = {{16, -30}, {16, 0}, {4, 0}}, color = {0, 0, 127}));
connect(FlowRateStep.y, sourceW.in_w0) annotation(
Line(points = {{-68, -30}, {-54, -30}, {-54, -64}}, color = {0, 0, 127}));
connect(SpecificEnthalpyStep.y, sourceW.in_h) annotation(
Line(points = {{-62, 10}, {-46, 10}, {-46, -64}}, color = {0, 0, 127}));
connect(valveLiq.outlet, sinkP.flange) annotation(
Line(points = {{60, -70}, {74, -70}}, color = {0, 0, 255}));
connect(sourceW.flange, sensT.inlet) annotation(
Line(points = {{-40, -70}, {-22, -70}}, color = {0, 0, 255}));
annotation(
uses(ThermoPower(version = "3.1"), Modelica(version = "3.2.3")));
end FirstNewExperiment;
Re: code 0xffffffffffffffff.
You first get a division by zero:
Code:
division by zero at time 0, (a=0) / (b=0), where divisor b expression is: sqrt(valveLiq.rhonom * valveLiq.dpnom) * FirstNewExperiment.valveLiq.FlowChar(valveLiq.thetanom)
I guess you need to see why the expression
Code:
sqrt(valveLiq.rhonom * valveLiq.dpnom) * FirstNewExperiment.valveLiq.FlowChar(valveLiq.thetanom)
is zero when the system initializes.
It might be because valveLiq.dpnom parameter is zero:
Code:
[4] 15:58:25 Translation Warning
[C:/home/adrpo33/dev/OpenModelica/build/lib/omlibrary/ThermoPower 3.1/Water.mo: 5615:7-5616:61]: Parameter valveLiq.dpnom has no value, and is fixed during initialization (fixed=true), using available start value (start=0.0) as default value.
So you need to give some value to the dpnom parameter in component valveLiq.
I have no idea about modeling so you need to read the documentation or see some other example on how to use ThermoPower.Water.ValveLiq properly.
- adrpo
- 885 Posts
Re: code 0xffffffffffffffff.
I also opened a bug about the crash, the simulation should not crash even if there is an error:
https://github.com/OpenModelica/OpenMod … ssues/8690
- adrpo
- 885 Posts
- Index
- » Usage and Applications
- » OpenModelica Usage and Applications
- » code 0xffffffffffffffff.