Package Modelica.​Mechanics.​MultiBody.​Examples.​Loops.​Utilities
Utility models for Examples.Loops

Information

This package contains utility functions used by some of the Loops example models.

Extends from Modelica.​Icons.​UtilitiesPackage (Icon for utility packages).

Package Contents

NameDescription
CylinderCylinder with rod and crank of a combustion engine
Cylinder_analytic_CADOne cylinder with analytic handling of kinematic loop and CAD visualization
CylinderBaseOne cylinder with analytic handling of kinematic loop
Engine1bBaseModel of one cylinder engine with gas force
EngineV6_analyticV6 engine with analytic loop handling
GasForceSimple gas force computation for combustion engine
GasForce2Rough approximation of gas force in a combustion engine's cylinder

Model Modelica.​Mechanics.​MultiBody.​Examples.​Loops.​Utilities.​Cylinder
Cylinder with rod and crank of a combustion engine

Information

Cylinder with rod and crank of a combustion engine. Used as submodel in Loops.EngineV6.

Parameters

TypeNameDefaultDescription
Booleananimationtrue= true, if animation shall be enabled
LengthcylinderTopPosition0.42Length from crank shaft to end of cylinder.
LengthpistonLength0.1Length of cylinder
LengthrodLength0.2Length of rod
LengthcrankLength0.2Length of crank shaft in x direction
LengthcrankPinOffset0.1Offset of crank pin from center axis
LengthcrankPinLength0.1Offset of crank pin from center axis
AnglecylinderInclination0Inclination of cylinder
AnglecrankAngleOffset0Offset for crank angle
LengthcylinderLengthcylinderTopPosition - (pistonLength + rodLength - crankPinOffset)Maximum length of cylinder volume

Connectors

TypeNameDescription
Frame_acylinder_a 
Frame_acylinder_b 
Frame_acrank_a 
Frame_acrank_b 

Model Modelica.​Mechanics.​MultiBody.​Examples.​Loops.​Utilities.​GasForce
Simple gas force computation for combustion engine

Information

Very simple analytic model of the force generated by the combustion in an engine cylinder.

Extends from Modelica.​Icons.​ObsoleteModel (Icon for classes that are obsolete and will be removed in later versions) and Modelica.​Mechanics.​Translational.​Interfaces.​PartialCompliant (Compliant connection of two translational 1D flanges).

Parameters

TypeNameDefaultDescription
LengthL Length of cylinder
Diameterd Diameter of cylinder
Volumek00.01Volume V = k0 + k1*(1-x), with x = 1 + s_rel/L
Volumek11Volume V = k0 + k1*(1-x), with x = 1 + s_rel/L
HeatCapacityk1Gas constant (p*V = k*T)

Connectors

TypeNameDescription
Flange_aflange_aLeft flange of compliant 1-dim. translational component
Flange_bflange_bRight flange of compliant 1-dim. translational component

Model Modelica.​Mechanics.​MultiBody.​Examples.​Loops.​Utilities.​GasForce2
Rough approximation of gas force in a combustion engine's cylinder

Information

The gas force in a cylinder of a combustion engine is computed as function of the relative distance of the two flanges. It is required that s_rel = flange_b.s - flange_a.s is in the range

0 ≤ s_rel ≤ L,

where the parameter L is the length of the cylinder. If this assumption is not fulfilled, an error occurs. The resulting approximation of the gas pressure is shown in the following figure and depends on both s_rel and the relative velocity v_rel = der(s_rel).

model Modelica.Mechanics.MultiBody.Examples.Loops.Utilities.GasForce

Extends from Modelica.​Mechanics.​Translational.​Interfaces.​PartialCompliant (Compliant connection of two translational 1D flanges).

Parameters

TypeNameDefaultDescription
LengthL Length of cylinder
Lengthd Diameter of cylinder
Volumek00.01Volume V = k0 + k1*(1-x), with x = 1 - s_rel/L
Volumek11Volume V = k0 + k1*(1-x), with x = 1 - s_rel/L
HeatCapacityk1Gas constant (p*V = k*T)

Connectors

TypeNameDescription
Flange_aflange_aLeft flange of compliant 1-dim. translational component
Flange_bflange_bRight flange of compliant 1-dim. translational component

Model Modelica.​Mechanics.​MultiBody.​Examples.​Loops.​Utilities.​CylinderBase
One cylinder with analytic handling of kinematic loop

Information

Slider-crank mechanism with analytic handling of kinematic loop to model one cylinder in an engine.

Parameters

TypeNameDefaultDescription
Booleananimationtrue= true, if animation shall be enabled
LengthcylinderTopPosition0.42Length from crank shaft to end of cylinder.
LengthcrankLength0.14Length of crank shaft in x direction
LengthcrankPinOffset0.05Offset of crank pin from center axis
LengthcrankPinLength0.1Offset of crank pin from center axis
Angle_degcylinderInclination0Inclination of cylinder
Angle_degcrankAngleOffset0Offset for crank angle
LengthpistonLength0.1Length of cylinder
LengthpistonCenterOfMass0.5 * pistonLengthDistance from frame_a to center of mass of piston
MasspistonMass6Mass of piston
InertiapistonInertia_110.0088Inertia 11 of piston with respect to center of mass frame, parallel to frame_a
InertiapistonInertia_220.0076Inertia 22 of piston with respect to center of mass frame, parallel to frame_a
InertiapistonInertia_330.0088Inertia 33 of piston with respect to center of mass frame, parallel to frame_a
LengthrodLength0.175Length of rod
LengthrodCenterOfMass0.5 * rodLengthDistance from frame_a to center of mass of piston
MassrodMass1Mass of rod
InertiarodInertia_110.006Inertia 11 of rod with respect to center of mass frame, parallel to frame_a
InertiarodInertia_225e-4Inertia 22 of rod with respect to center of mass frame, parallel to frame_a
InertiarodInertia_330.006Inertia 33 of rod with respect to center of mass frame, parallel to frame_a
final LengthcylinderLengthcylinderTopPosition - (pistonLength + rodLength - crankPinOffset)Maximum length of cylinder volume

Connectors

TypeNameDescription
Frame_acylinder_a 
Frame_acylinder_b 
Frame_acrank_a 
Frame_acrank_b 

Model Modelica.​Mechanics.​MultiBody.​Examples.​Loops.​Utilities.​Cylinder_analytic_CAD
One cylinder with analytic handling of kinematic loop and CAD visualization

Information

Slider-crank mechanism with analytic handling of kinematic loop to model one cylinder in an engine.

Extends from Modelica.​Mechanics.​MultiBody.​Examples.​Loops.​Utilities.​CylinderBase (One cylinder with analytic handling of kinematic loop).

Parameters

TypeNameDefaultDescription
Booleananimationtrue= true, if animation shall be enabled
LengthcylinderTopPosition0.42Length from crank shaft to end of cylinder.
LengthcrankLength0.14Length of crank shaft in x direction
LengthcrankPinOffset0.05Offset of crank pin from center axis
LengthcrankPinLength0.1Offset of crank pin from center axis
Angle_degcylinderInclination0Inclination of cylinder
Angle_degcrankAngleOffset0Offset for crank angle
LengthpistonLength0.1Length of cylinder
LengthpistonCenterOfMass0.5 * pistonLengthDistance from frame_a to center of mass of piston
MasspistonMass6Mass of piston
InertiapistonInertia_110.0088Inertia 11 of piston with respect to center of mass frame, parallel to frame_a
InertiapistonInertia_220.0076Inertia 22 of piston with respect to center of mass frame, parallel to frame_a
InertiapistonInertia_330.0088Inertia 33 of piston with respect to center of mass frame, parallel to frame_a
LengthrodLength0.175Length of rod
LengthrodCenterOfMass0.5 * rodLengthDistance from frame_a to center of mass of piston
MassrodMass1Mass of rod
InertiarodInertia_110.006Inertia 11 of rod with respect to center of mass frame, parallel to frame_a
InertiarodInertia_225e-4Inertia 22 of rod with respect to center of mass frame, parallel to frame_a
InertiarodInertia_330.006Inertia 33 of rod with respect to center of mass frame, parallel to frame_a
final LengthcylinderLengthcylinderTopPosition - (pistonLength + rodLength - crankPinOffset)Maximum length of cylinder volume

Connectors

TypeNameDescription
Frame_acylinder_a 
Frame_acylinder_b 
Frame_acrank_a 
Frame_acrank_b 

Model Modelica.​Mechanics.​MultiBody.​Examples.​Loops.​Utilities.​EngineV6_analytic
V6 engine with analytic loop handling

Information

Model of an engine with 6 cylinders where the algebraic loops of the slider crank mechanisms are solved analytically.

Parameters

TypeNameDefaultDescription
Booleananimationtrue= true, if animation shall be enabled

Connectors

TypeNameDescription
Flange_bflange_b 
Frame_aframe_a 

Partial Model Modelica.​Mechanics.​MultiBody.​Examples.​Loops.​Utilities.​Engine1bBase
Model of one cylinder engine with gas force

Information

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.

model Examples.Loops.Engine

Generated 2018-12-12 12:12:23 EST by MapleSim.