This package contains different examples to show how mechanical systems with kinematic loops can be modeled.
Model | Description |
---|---|
Engine1a Engine1b Engine1b_analytic |
Model of one cylinder engine (Engine1a: simple, without combustion; Engine1b: with combustion;
Engine1b_analytic: same as Engine1b but analytic loop handling) |
EngineV6 EngineV6_analytic |
V6 engine with 6 cylinders, 6 planar loops and 1 degree-of-freedom.
Second version with analytic handling of kinematic loops and CAD data
animation. |
Fourbar1 | One kinematic loop with four bars (with only revolute joints;
5 non-linear equations) |
Fourbar2 | One kinematic loop with four bars (with UniversalSpherical
joint; 1 non-linear equation) |
Fourbar_analytic | One kinematic loop with four bars (with JointSSP joint;
analytic solution of non-linear algebraic loop) |
PlanarLoops_analytic | Mechanism with three planar kinematic loops and one
degree-of-freedom with analytic loop handling
(with JointRRR joints) |
Name | Description |
---|---|
Engine1a | Model of one cylinder engine |
Engine1b | Model of one cylinder engine with gas force and preparation for assembly joint JointRRP |
Engine1b_analytic | Model of one cylinder engine with gas force and analytic loop handling |
EngineV6 | V6 engine with 6 cylinders, 6 planar loops and 1 degree-of-freedom |
EngineV6_analytic | V6 engine with 6 cylinders, 6 planar loops, 1 degree-of-freedom and analytic handling of kinematic loops |
Fourbar1 | One kinematic loop with four bars (with only revolute joints; 5 non-linear equations) |
Fourbar2 | One kinematic loop with four bars (with UniversalSpherical joint; 1 non-linear equation) |
Fourbar_analytic | One kinematic loop with four bars (with JointSSP joint; analytic solution of non-linear algebraic loop) |
PlanarLoops_analytic | Mechanism with three planar kinematic loops and one degree-of-freedom with analytic loop handling (with JointRRR joints) |
Utilities | Utility models for Examples.Loops |
This is a model of the mechanical part of one cylinder of an engine. The combustion is not modelled. The "inertia" component at the lower left part is the output inertia of the engine driving the gearbox. The angular velocity of the output inertia has a start value of 10 rad/s in order to demonstrate the movement of the engine.
The engine is modeled solely by revolute and prismatic joints. Since this results in a planar loop there is the well known difficulty that the cut-forces perpendicular to the loop cannot be uniquely computed, as well as the cut-torques within the plane. This ambiguity is resolved by using the option planarCutJoint in the Advanced menu of one revolute joint in every planar loop (here: joint B1). This option sets the cut-force in direction of the axis of rotation, as well as the cut-torques perpendicular to the axis of rotation at this joint to zero and makes the problem mathematically well-formed.
An animation of this example is shown in the figure below.
Extends from Modelica.Icons.Example (Icon for runnable examples).This is a model of the mechanical part of one cylinder of an engine. It is similar to Loops.Engine1a. The difference is that a simple model for the gas force in the cylinder is added and that the model is restructured in such a way, that the central part of the planar kinematic loop can be easily replaced by the assembly joint "Modelica.Mechanics.MultiBody.Joints.Assemblies.JointRRP". This exchange of the kinematic loop is shown in Loops.Engine1b_analytic. The advantage of using JointRRP is, that the non-linear algebraic equation of this loop is solved analytically, and not numerically as in this model (Engine1b).
An animation of this example is shown in the figure below.
Extends from Modelica.Icons.Example (Icon for runnable examples), Utilities.Engine1bBase (Model of one cylinder engine with gas force).This is the same model as Loops.Engine1b. The only difference is that the central part of the planar kinematic loop has been replaced by the assembly joint "Modelica.Mechanics.MultiBody.Joints.Assemblies.JointRRP". The advantage of using JointRRP is, that the non-linear algebraic equation of this loop is solved analytically, and not numerically as in Loops.Engine1b.
An animation of this example is shown in the figure below.
Extends from Modelica.Icons.Example (Icon for runnable examples), Utilities.Engine1bBase (Model of one cylinder engine with gas force).This is a V6 engine with 6 cylinders. It is hierarchically built up by using instances of one cylinder. For more details on the modeling of one cylinder, see example Engine1b. An animation of the engine is shown in the figure below.
Simulate for 5 s, and plot the variables engineSpeed_rpm, engineTorque, and filteredEngineTorque. Note, the result file has a size of about 50 Mbyte (for 5000 output intervals).
Extends from Modelica.Icons.Example (Icon for runnable examples).
Name | Description |
---|---|
animation | = true, if animation shall be enabled |
This is a similar model as the example "EngineV6". However, the cylinders have been built up with component Modelica.Mechanics.MultiBody.Joints.Assemblies.JointRRR that solves the non-linear system of equations in an aggregation of 3 revolution joints analytically and only one body is used that holds the total mass of the crank shaft:
This model is about 20 times faster as the EngineV6 example and no linear or non-linear system of equations occur. In contrast, the "EngineV6" example leads to 6 systems of nonlinear equations (every system has dimension = 5, with Evaluate=false and dimension=1 with Evaluate=true) and a linear system of equations of about 40. This shows the power of the analytic loop handling.
Simulate for 5 s, and plot the variables engineSpeed_rpm, engineTorque, and filteredEngineTorque. Note, the result file has a size of about 50 Mbyte (for 5000 output intervals).
Extends from Modelica.Icons.Example (Icon for runnable examples).
Name | Description |
---|---|
animation | = true, if animation shall be enabled |
This is a simple kinematic loop consisting of 6 revolute joints, 1 prismatic joint and 4 bars that is often used as basic constructing unit in mechanisms. This example demonstrates that usually no particular knowledge of the user is needed to handle kinematic loops. Just connect the joints and bodies together according to the real system. In particular no cut-joints or a spanning tree has to be determined. In this case, the initial condition of the angular velocity of revolute joint j1 is set to 300 deg/s in order to drive this loop.
Extends from Modelica.Icons.Example (Icon for runnable examples).This is a second version of the "four-bar" mechanism, see figure:
In this case the three revolute joints on the left top-side and the two revolute joints on the right top side have been replaced by the joint UniversalSpherical that is a rod connecting a spherical and a universal joint. This joint is defined by 1 constraint stating that the distance between the two spherical joints is constant. Using this joint in a kinematic loop reduces the sizes of non-linear algebraic equations. For this loop, only one non-linear algebraic system of equations of order 1 remains.
At the UniversalSpherical joint an additional frame_ia fixed to the rod is present where components can be attached to the connecting rod. In this example just a coordinate system is attached to visualize frame_ia (coordinate system on the right in blue color).
Another feature is that the length of the connecting rod can be automatically calculated during initialization. In order to do this, another initialization condition has to be given. In this example, the initial value of the distance of the prismatic joint j2 has been fixed (via the "Initialization" menu) and the rod length of joint "UniversalSpherical" is computed during initialization since parameter computeLength = true is set in the joint parameter menu. The main advantage is that during initialization no non-linear system of equation is solved and therefore initialization always works. To be precise, the following trivial non-linear equation is actually solved for rodLength:
rodLength*rodLength = f(angle of revolute joint, distance of prismatic joint)Extends from Modelica.Icons.Example (Icon for runnable examples).
This is a third version of the "four-bar" mechanism, see figure:
In this case the three revolute joints on the left top-side and the two revolute joints on the right top side have been replaced by the assembly joint Joints.Assemblies.JointSSP which consists of two spherical joints and one prismatic joint. Since JointSSP solves the non-linear constraint equation internally analytically, no non-linear equation appears any more and a Modelica translator, such as Dymola, can transform the system into state space form without solving a system of equations. For more details, see MultiBody.UsersGuide.Tutorial.LoopStructures.AnalyticLoopHandling.
Extends from Modelica.Icons.Example (Icon for runnable examples).It is demonstrated how the Modelica.Mechanics.MultiBody.Joints.Assemblies.JointRRR joint can be used to solve the non-linear equations of coupled planar loops analytically. In the mechanism below no non-linear equation occurs any more from the tool view, since these equations are solved analytically in the JointRRR joints. For more details, see MultiBody.UsersGuide.Tutorial.LoopStructures.AnalyticLoopHandling.
In the following figure the parameter vectors of this example are visualized in the animation view.
Extends from Modelica.Icons.Example (Icon for runnable examples).
Name | Description |
---|---|
rh[3] | Position vector from 'lower left' revolute to 'lower right' revolute joint for all the 3 loops [m] |
rv[3] | Position vector from 'lower left' revolute to 'upper left' revolute joint in the first loop [m] |
r1b[3] | Position vector from 'lower right' revolute to 'upper right' revolute joint in the first loop [m] |
r2b[3] | Position vector from 'lower right' revolute to 'upper right' revolute joint in the second loop [m] |
r3b[3] | Position vector from 'lower right' revolute to 'upper right' revolute joint in the third loop [m] |