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 Content

Name Description
Modelica.Mechanics.MultiBody.Examples.Loops.Utilities.Cylinder Cylinder Cylinder with rod and crank of a combustion engine
Modelica.Mechanics.MultiBody.Examples.Loops.Utilities.GasForce GasForce Simple gas force computation for combustion engine
Modelica.Mechanics.MultiBody.Examples.Loops.Utilities.GasForce2 GasForce2 Rough approximation of gas force in a cylinder
Modelica.Mechanics.MultiBody.Examples.Loops.Utilities.CylinderBase CylinderBase One cylinder with analytic handling of kinematic loop
Modelica.Mechanics.MultiBody.Examples.Loops.Utilities.Cylinder_analytic_CAD Cylinder_analytic_CAD One cylinder with analytic handling of kinematic loop and CAD visualization
Modelica.Mechanics.MultiBody.Examples.Loops.Utilities.EngineV6_analytic EngineV6_analytic V6 engine with analytic loop handling
Engine1bBase Model of one cylinder engine with gas force

Modelica.Mechanics.MultiBody.Examples.Loops.Utilities.Cylinder 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

NameDescription
animation= true, if animation shall be enabled
cylinderTopPositionLength from crank shaft to end of cylinder. [m]
pistonLengthLength of cylinder [m]
rodLengthLength of rod [m]
crankLengthLength of crank shaft in x direction [m]
crankPinOffsetOffset of crank pin from center axis [m]
crankPinLengthOffset of crank pin from center axis [m]
cylinderInclinationInclination of cylinder [rad]
crankAngleOffsetOffset for crank angle [rad]
cylinderLengthMaximum length of cylinder volume [m]

Connectors

NameDescription
cylinder_a 
cylinder_b 
crank_a 
crank_b 

Modelica.Mechanics.MultiBody.Examples.Loops.Utilities.GasForce 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.Mechanics.Translational.Interfaces.PartialCompliant (Compliant connection of two translational 1D flanges).

Parameters

NameDescription
LLength of cylinder [m]
dDiameter of cylinder [m]
k0Volume V = k0 + k1*(1-x), with x = 1 + s_rel/L [m3]
k1Volume V = k0 + k1*(1-x), with x = 1 + s_rel/L [m3]
kGas constant (p*V = k*T) [J/K]
Initialization
s_relRelative distance (= flange_b.s - flange_a.s) [m]

Connectors

NameDescription
flange_aLeft flange of compliant 1-dim. translational component
flange_bRight flange of compliant 1-dim. translational component

Modelica.Mechanics.MultiBody.Examples.Loops.Utilities.GasForce2 Modelica.Mechanics.MultiBody.Examples.Loops.Utilities.GasForce2

Rough approximation of gas force in a cylinder

Information

The gas force in a cylinder 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.

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

Parameters

NameDescription
LLength of cylinder [m]
dDiameter of cylinder [m]
k0Volume V = k0 + k1*(1-x), with x = 1 - s_rel/L [m3]
k1Volume V = k0 + k1*(1-x), with x = 1 - s_rel/L [m3]
kGas constant (p*V = k*T) [J/K]
Initialization
s_relRelative distance (= flange_b.s - flange_a.s) [m]

Connectors

NameDescription
flange_aLeft flange of compliant 1-dim. translational component
flange_bRight flange of compliant 1-dim. translational component

Modelica.Mechanics.MultiBody.Examples.Loops.Utilities.CylinderBase 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

NameDescription
animation= true, if animation shall be enabled
cylinderTopPositionLength from crank shaft to end of cylinder. [m]
crankLengthLength of crank shaft in x direction [m]
crankPinOffsetOffset of crank pin from center axis [m]
crankPinLengthOffset of crank pin from center axis [m]
cylinderInclinationInclination of cylinder [deg]
crankAngleOffsetOffset for crank angle [deg]
Piston
pistonLengthLength of cylinder [m]
pistonCenterOfMassDistance from frame_a to center of mass of piston [m]
pistonMassMass of piston [kg]
pistonInertia_11Inertia 11 of piston with respect to center of mass frame, parallel to frame_a [kg.m2]
pistonInertia_22Inertia 22 of piston with respect to center of mass frame, parallel to frame_a [kg.m2]
pistonInertia_33Inertia 33 of piston with respect to center of mass frame, parallel to frame_a [kg.m2]
Rod
rodLengthLength of rod [m]
rodCenterOfMassDistance from frame_a to center of mass of piston [m]
rodMassMass of rod [kg]
rodInertia_11Inertia 11 of rod with respect to center of mass frame, parallel to frame_a [kg.m2]
rodInertia_22Inertia 22 of rod with respect to center of mass frame, parallel to frame_a [kg.m2]
rodInertia_33Inertia 33 of rod with respect to center of mass frame, parallel to frame_a [kg.m2]

Connectors

NameDescription
cylinder_a 
cylinder_b 
crank_a 
crank_b 

Modelica.Mechanics.MultiBody.Examples.Loops.Utilities.Cylinder_analytic_CAD 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 CylinderBase (One cylinder with analytic handling of kinematic loop).

Parameters

NameDescription
animation= true, if animation shall be enabled
cylinderTopPositionLength from crank shaft to end of cylinder. [m]
crankLengthLength of crank shaft in x direction [m]
crankPinOffsetOffset of crank pin from center axis [m]
crankPinLengthOffset of crank pin from center axis [m]
cylinderInclinationInclination of cylinder [deg]
crankAngleOffsetOffset for crank angle [deg]
Piston
pistonLengthLength of cylinder [m]
pistonCenterOfMassDistance from frame_a to center of mass of piston [m]
pistonMassMass of piston [kg]
pistonInertia_11Inertia 11 of piston with respect to center of mass frame, parallel to frame_a [kg.m2]
pistonInertia_22Inertia 22 of piston with respect to center of mass frame, parallel to frame_a [kg.m2]
pistonInertia_33Inertia 33 of piston with respect to center of mass frame, parallel to frame_a [kg.m2]
Rod
rodLengthLength of rod [m]
rodCenterOfMassDistance from frame_a to center of mass of piston [m]
rodMassMass of rod [kg]
rodInertia_11Inertia 11 of rod with respect to center of mass frame, parallel to frame_a [kg.m2]
rodInertia_22Inertia 22 of rod with respect to center of mass frame, parallel to frame_a [kg.m2]
rodInertia_33Inertia 33 of rod with respect to center of mass frame, parallel to frame_a [kg.m2]

Connectors

NameDescription
cylinder_a 
cylinder_b 
crank_a 
crank_b 

Modelica.Mechanics.MultiBody.Examples.Loops.Utilities.EngineV6_analytic 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

NameDescription
animation= true, if animation shall be enabled
replaceable model CylinderCylinder type

Connectors

NameDescription
replaceable model CylinderCylinder type
flange_b 
frame_a 

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
Automatically generated Tue Apr 05 09:36:39 2016.