- Index
- » Developer
- » OpenModelica development
- » model including two SpringDamper...
model including two SpringDamper blocks leads to compiler error
model including two SpringDamper blocks leads to compiler error
The included model DamperBug1 leads to the following error:
Code:
Unbekannter Fehler warning | division by zero in partial equation: ((-$ZERO.$DER.springdamper3.flange_b.phi) * idealrollingwheel2.radius) / (idealrollingwheel2.radius - idealrollingwheel1.radius) because idealrollingwheel2.radius - idealrollingwheel1.radius == 0: File: /usr/lib/omlibrary/Modelica 3.1/Mechanics/Rotational.mo Line: 3644
| at Time=0.000000
| [line] 487 | [file] DamperBug1.c
throw | [line] 45 | [file] util/division.c
| division by zero
Changing one of the SpringDamper blocks to a Spring works (example DamperBug3).
Deleting the Wheels and staying in the rotational domain works (example DamperBug2).
Greetings
Peter
model DamperBug1
Modelica.Mechanics.Rotational.Sources.ConstantTorque constanttorque1(tau_constant = 100);
Modelica.Mechanics.Rotational.Components.Inertia inertia1(J = 0.6, w(start = 83.7758, fixed = true), phi(start = 0.0, fixed = true));
Modelica.Mechanics.Rotational.Components.SpringDamper springdamper3(c = 7500, d = 1);
Modelica.Mechanics.Rotational.Components.SpringDamper springdamper1(c = 7500, d = 1);
Modelica.Mechanics.Rotational.Components.IdealRollingWheel idealrollingwheel1(radius = 0.3);
Modelica.Mechanics.Rotational.Components.IdealRollingWheel idealrollingwheel2(radius = 0.3);
Modelica.Mechanics.Translational.Components.Mass mass1(m = 1200, v(start = 0, fixed = true));
equation
connect(idealrollingwheel2.flangeT,mass1.flange_a);
connect(idealrollingwheel1.flangeT,mass1.flange_a);
connect(springdamper1.flange_b,idealrollingwheel1.flangeR);
connect(springdamper3.flange_b,idealrollingwheel2.flangeR);
connect(springdamper3.flange_a,inertia1.flange_b);
connect(inertia1.flange_b,springdamper1.flange_a);
connect(constanttorque1.flange,inertia1.flange_a);
end DamperBug1;
model DamperBug2
Modelica.Mechanics.Rotational.Sources.ConstantTorque constanttorque1(tau_constant = 100);
Modelica.Mechanics.Rotational.Components.Inertia inertia1(J = 0.6, w(start = 83.7758, fixed = true), phi(start = 0.0, fixed = true));
Modelica.Mechanics.Rotational.Components.SpringDamper springdamper3(c = 7500, d = 1);
Modelica.Mechanics.Rotational.Components.SpringDamper springdamper1(c = 7500, d = 1);
Modelica.Mechanics.Rotational.Components.Inertia inertia2(J = 2, w(start = 0, fixed = true));
equation
connect(springdamper3.flange_b,inertia2.flange_a);
connect(springdamper1.flange_b,inertia2.flange_a);
connect(springdamper3.flange_a,inertia1.flange_b);
connect(inertia1.flange_b,springdamper1.flange_a);
connect(constanttorque1.flange,inertia1.flange_a);
end DamperBug2;
model DamperBug3
Modelica.Mechanics.Rotational.Sources.ConstantTorque constanttorque1(tau_constant = 100);
Modelica.Mechanics.Rotational.Components.Inertia inertia1(J = 0.6, w(start = 83.7758, fixed = true), phi(start = 0.0, fixed = true));
Modelica.Mechanics.Rotational.Components.SpringDamper springdamper3(c = 7500, d = 1);
Modelica.Mechanics.Rotational.Components.IdealRollingWheel idealrollingwheel1(radius = 0.3);
Modelica.Mechanics.Rotational.Components.IdealRollingWheel idealrollingwheel2(radius = 0.3);
Modelica.Mechanics.Translational.Components.Mass mass1(m = 1200, v(start = 0, fixed = true));
Modelica.Mechanics.Rotational.Components.Spring spring1(c = 7500);
equation
connect(spring1.flange_b,idealrollingwheel1.flangeR);
connect(spring1.flange_a,inertia1.flange_b);
connect(idealrollingwheel2.flangeT,mass1.flange_a);
connect(idealrollingwheel1.flangeT,mass1.flange_a);
connect(springdamper3.flange_b,idealrollingwheel2.flangeR);
connect(springdamper3.flange_a,inertia1.flange_b);
connect(constanttorque1.flange,inertia1.flange_a);
end DamperBug3;
- Index
- » Developer
- » OpenModelica development
- » model including two SpringDamper...