- Index
- » Developer
- » OpenModelica development
- » Simulation failure: assertion failed...
Simulation failure: assertion failed...
Simulation failure: assertion failed...
Hello all,
I have faced a problem with the model Gears. Simulation crashes with an error message:
Simulation execution failed for model: Gears
Assertion failed: current_state.real_buffer_ptr + n < NR_REAL_ELEMENTS, file memory_pool.c, line 101
Can someone give me help with this problem? Is there something missing in the model?
I am working with:
OMEdit - OpenModelica Connection Editor Version: 1.7.0, revision 8711.
Thanks,
pekka
model Gears
Modelica.Blocks.Sources.Ramp ramp1(height = 1, duration = 0.5, offset = 0, startTime = 0.2);
Modelica.Mechanics.Rotational.Sources.Torque torque1;
Modelica.Mechanics.Rotational.Components.Fixed fixed1;
Modelica.Mechanics.Rotational.Components.Inertia inertia1(J = 1);
Modelica.Mechanics.Rotational.Components.Clutch clutch1(mue_pos = [0,0.5], peak = 1, cgeo = 1, fn_max = 1000);
Modelica.Mechanics.Rotational.Components.Clutch clutch2(mue_pos = [0,0.5], peak = 1, cgeo = 1, fn_max = 1000);
Modelica.Mechanics.Rotational.Components.Clutch clutch3(mue_pos = [0,0.5], peak = 1, cgeo = 1, fn_max = 1000);
Modelica.Mechanics.Rotational.Components.Clutch clutch4(mue_pos = [0,0.5], peak = 1, cgeo = 1, fn_max = 1000);
Modelica.Mechanics.Rotational.Components.Clutch clutch5(mue_pos = [0,0.5], peak = 1, cgeo = 1, fn_max = 1000);
Modelica.Blocks.Sources.Constant constant1(k = 1);
Modelica.Blocks.Sources.Constant constant2(k = 0);
Modelica.Mechanics.Rotational.Components.IdealGear idealgear1(ratio = 8);
Modelica.Mechanics.Rotational.Components.IdealGear idealgear2(ratio = 6);
Modelica.Mechanics.Rotational.Components.IdealGear idealgear3(ratio = 4);
Modelica.Mechanics.Rotational.Components.IdealGear idealgear4(ratio = 2);
Modelica.Mechanics.Rotational.Components.IdealGear idealgear5(ratio = 1);
Modelica.Mechanics.Rotational.Components.Inertia inertia2(J = 100);
annotation(experiment(StartTime = 0.0, StopTime = 1.0, Tolerance = 1e-06));
equation
connect(ramp1.y,torque1.tau);
connect(torque1.flange,inertia1.flange_a);
connect(fixed1.flange_b,torque1.support);
connect(inertia1.flange_b,clutch1.flange_a);
connect(inertia1.flange_b,clutch2.flange_a);
connect(inertia1.flange_b,clutch3.flange_a);
connect(inertia1.flange_b,clutch4.flange_a);
connect(inertia1.flange_b,clutch5.flange_a);
connect(constant1.y,clutch1.f_normalized);
connect(constant2.y,clutch2.f_normalized);
connect(constant2.y,clutch3.f_normalized);
connect(constant2.y,clutch4.f_normalized);
connect(constant2.y,clutch5.f_normalized);
connect(clutch1.flange_b,idealgear1.flange_a);
connect(clutch2.flange_b,idealgear2.flange_a);
connect(clutch3.flange_b,idealgear3.flange_a);
connect(clutch4.flange_b,idealgear4.flange_a);
connect(clutch5.flange_b,idealgear5.flange_a);
connect(idealgear1.flange_b,inertia2.flange_a);
connect(idealgear2.flange_b,inertia2.flange_a);
connect(idealgear3.flange_b,inertia2.flange_a);
connect(idealgear4.flange_b,inertia2.flange_a);
connect(idealgear5.flange_b,inertia2.flange_a);
end Gears;
Re: Simulation failure: assertion failed...
This model just barely compiles. It contains a mixed system of size 15 (262k elements) and allocates a 29x29 matrix in each iteration (and free'd after each time step only). This matrix does not need to use the memory pool as I believe its sizes are known during compile-time. I will try to move it to use stack memory instead.
- sjoelund.se
- 1700 Posts
Re: Simulation failure: assertion failed...
The allocation issue is now fixed in trunk (r9666), but DASSL does not like the model using default start/stop time and step size:
Code:
DASSL-- AT T (=R1) SOME ELEMENT OF WT
In above message, R1 = .2000020000000E+00
DASSL-- HAS BECOME .LE. 0.0
DASSL-- ACTION WAS TAKEN. RUN TERMINATED
DASSL-- THE LAST STEP TERMINATED WITH A NEGATIVE
DASSL-- VALUE (=I1) OF IDID AND NO APPROPRIATE
In above message, I1 = -3
- sjoelund.se
- 1700 Posts
Re: Simulation failure: assertion failed...
It is if you are running Linux or OSX nightly builds.
- sjoelund.se
- 1700 Posts
- Index
- » Developer
- » OpenModelica development
- » Simulation failure: assertion failed...