Lecture08 - Modelica Libraries
Lecture08 - Modelica Libraries
1
Modelica Standard Library cont’
The Modelica Standard Library contains components from
various application areas, including the following sublibraries:
• Blocks Library for basic input/output control blocks
• Constants Mathematical constants and constants of nature
• Electrical Library for electrical models
• Icons Icon definitions
• Fluid 1-dim Flow in networks of vessels, pipes, fluid machines, valves, etc.
• Math Mathematical functions
• Magnetic Magnetic.Fluxtubes – for magnetic applications
• Mechanics Library for mechanical systems
• Media Media models for liquids and gases
• SIunits Type definitions based on SI units according to ISO 31-1992
• Stategraph Hierarchical state machines (analogous to Statecharts)
• Thermal Components for thermal systems
• Utilities Utility functions especially for scripting
Modelica.Blocks
Library
Continuous
Examples:
2
Modelica.Constants
Examples:
constant Real pi=2*Modelica.Math.asin(1.0);
constant Real small=1.e-60 "Smallest number such that small and –small
are representable on the machine";
Modelica.Electrical
Examples:
V2
R2 R4
Gnd9
C2 Gnd3 Gnd6 C4
R1 Transistor1 Transistor2 R3
V1 C1 I1 C5 C3 Gnd4
3
Modelica.Icons
Examples:
Library
Modelica.Math
4
Modelica.Mechanics
Modelica.SIunits
5
Modelica.Stategraph
Modelica.Thermal
Sub
S b package
k HeatTransfer f with ith components
t to
t model
d l11-
dimensional heat transfer with lumped elements
Example:
6
ModelicaAdditions Library (OLD)
ModelicaAdditions.Multibody (OLD)
7
MultiBody (MBS) - Example Kinematic Loop
8
ModelicaAdditions.PetriNets
Transition
Place
9
Power System Stability - SPOT
10
Vehicle Dynamics Library – VehicleDynamics
There is a Greatly Extended Commercial Version
• Powertrain
• SmartElectricDrives
• VehicleDynamics
• AirConditioning
• HyLib
• PneuLib
• CombiPlant
• HydroPlant
• …
11
Hydraulics Library HyLib
• Licensed Modelica package developed
originally by Peter Beater
• More than 90 models for Pumps
• Pumps
HyLib - Example
12
Pneumatics Library PneuLib
•Licensed Modelica package
developed by Peter Beater
Directional valves
•More than 80 models for
• Cylinders
• Motors
• Valves and nozzles
Flow control valves
• Lumped volumes
• Lines and sensors
• Models can be connected in an arbitrary
way, e.g. in series or in parallel.
•PneuLibLight is a free subset of Cylinders
HyLib.
• More info: www.pneulib.com
PneuLib - Example
13
Powertrain Library - Powertrain
14
Example Fighter Aircraft Library
• Simple PID
• Controls alpha and height
15
Example Aircraft Animation
Power output
Air Exhaust
C
Compressor T bi
Turbine
16
Example Gas Turbine
Load rejection
17
Example Gas Turbine – Load Rejection
18