Opened 13 years ago

Last modified 13 years ago

#1599 closed defect (worksforme)

initial values not respected in inertia-clutch model

Reported by: Peter Junglas Owned by: Peter Junglas
Priority: high Milestone:
Component: Version:
Keywords: Cc: Peter Junglas,

Description

The attached model contains two inertias coupled by a clutch. The initial velocities have different values, but the simulation uses w = 0 for both. Setting the initial state of the clutch to unlocked doesn't help.

loadModel(Modelica,{"3.1"});
loadString("
model testJInit
  annotation(Diagram(), experiment(StartTime = 0.0, StopTime = 2.0, Tolerance = 1e-06));
  Modelica.Mechanics.Rotational.Components.Clutch clutch1(mue_pos = [0,0.5], peak = 1.3, cgeo = 0.4, fn_max = 1000, locked(start = false, fixed = true)) annotation(Placement(visible = true, transformation(origin = {-8.5,11.5}, extent = {{-15,-15},{15,15}}, rotation = 0)));
  Modelica.Mechanics.Rotational.Components.Inertia inertia2(J = 5, stateSelect = StateSelect.default, w(start = 0, fixed = true)) annotation(Placement(visible = true, transformation(origin = {31,12}, extent = {{-15,-15},{15,15}}, rotation = 0)));
  Modelica.Mechanics.Rotational.Components.Inertia inertia1(J = 1, stateSelect = StateSelect.default, w(start = 200, fixed = true)) annotation(Placement(visible = true, transformation(origin = {-50,11}, extent = {{-15,-15},{15,15}}, rotation = 0)));
  Modelica.Blocks.Sources.Constant constant1(k = 1) annotation(Placement(visible = true, transformation(origin = {-8.5,62.5}, extent = {{-15,-15},{15,15}}, rotation = 0)));
equation
  connect(constant1.y,clutch1.f_normalized) annotation(Line(points = {{-8.5,46},{-8.5,42},{-8.5,28},{-8.5,28}}));
  connect(clutch1.flange_b,inertia2.flange_a) annotation(Line(points = {{6.5,11.5},{16.5,11.5},{16.5,12},{16,12}}));
  connect(inertia1.flange_b,clutch1.flange_a) annotation(Line(points = {{-35,11},{-23.5,11},{-23.5,11.5},{-23.5,11.5}}));
end testJInit;
");
simulate(testJInit,startTime=0.0,stopTime=2.0);
plot3({inertia1.w, inertia2.w});

Attachments (3)

testJInit.mo (1.4 KB ) - added by Peter Junglas 13 years ago.
testJInit.mos (127 bytes ) - added by Peter Junglas 13 years ago.
inertia-clutch.png (46.2 KB ) - added by Martin Sjölund 13 years ago.
Plot in OMC trunk

Download all attachments as: .zip

Change History (4)

by Peter Junglas, 13 years ago

Attachment: testJInit.mos added

comment:1 by Martin Sjölund, 13 years ago

What version of OpenModelica are you running? For me, the starting values are 0 and 200 (will attach a screenshot).

by Martin Sjölund, 13 years ago

Attachment: inertia-clutch.png added

Plot in OMC trunk

comment:2 by Peter Junglas, 13 years ago

Your plot shows exactly what I'd like to see.

I'm using 9040-1, because the daily build doesn't work for me (cf. my post in the forum).

Note: See TracTickets for help on using tickets.