Modelica is an object-oriented, declarative, multi-domain language for component-oriented modeling of complex systems, e.g., systems containing mechanical, electrical, electronic, hydraulic, thermal, control, electric power or process-oriented subcomponents. Modelica language is a textual description to define all parts of a model and to structure model components in libraries, called packages. Basically, all Modelica language elements are mapped to differential, algebraic and discrete equations. Using Modelica in design process for complex systems is very efficient and provide several benefits results. In Modelica we can model and simulate all types of components such as electrical, mechanical, hydraulic etc. Furthermore, Modelica Association provide standard library which contains a lot of different components.
Table of Contents
1 Introduction To Modelica
1.1 History
1.2 Features Of Modelica
1.3 What Can Modlica Be Used For
1.4 Modelica Standard Library (MSL)
1.5 Modelica Simulation Environments
1.6 Introduction To DYMOLA
1.6.1 Installing The Dymola Software
1.6.2 Installing Dymola License
1.6.3 Installing a C compiler
1.6.4 Dymola Overview
1.7 Getting Started With Dymola (Pendulum Motion Example)
2 Syntax of Modelica
2.1 Comment
2.2 Identifiers and Keywords
2.2.1 Identifiers
2.2.2 Keywords
2.3 Data Types
2.3.1 Real Data Type
2.3.2 Integer Data Type
2.3.3 Boolean Data Type
2.3.4 String Data Type
2.3.5 User Define Types
2.4 Modelica Operator and Evaluation Order
2.5 IF Statement and Relation Operator
2.6 Build in Variable Called Time
2.7 Built-in Intrinsic Operators And Functions
2.8 Critical Points
3 Simulation of Electrical Networks
3.1 Electrical Connectors
3.2 Electrical components
3.2.1 Resistor
3.2.2 Inductor
3.2.3 Capacitor
3.2.4 Ideal Transformer
3.2.5 DC voltage source
3.2.6 AC sinusoidal voltage source
3.3 Electrical Circuit Examples
3.3.1 RC circuit
3.3.2 Series RLC Resonance Circuit
3.3.3 Ideal transformer circuit
4 Simulation of hydraulic networks
4.1 Hydraulic connector
4.2 Hydraulic components
4.2.1 Pipe
4.2.2 Water tank
4.2.3 Boundary Source/sink
4.2.4 Recovery Pump
4.2.5 Booster Pump
4.2.6 Valve
4.3 simple hydraulic networks
4.3.1 Two hydraulic tanks filled with water
4.3.2 Water recovery well
4.3.3 Water recovery well with logical control
4.4 Modeling,simulation and control of a water recovery and Irrigation system
4.5 Modeling and Simulation of a Wastewater Pumping Plant
4.5.1 Screen Station and Pump Station
4.5.2 Screening process
4.5.3 Pumping Process
4.5.4 Wastewater Pumping Plant model
4.5.5 Simulation Results
5 Introduction to Animation Using Dymola
5.1 Animation in Dymola
5.2 Multibody Library
5.3 Animation Example
5.3.1 Simple Ideal Pendulum Animation
5.3.2 Spring Animation
5.3.3 Double Pendulum Animation
Research Objectives and Core Topics
This thesis focuses on the utilization of the Modelica language and the Dymola environment for modeling and simulating complex engineering systems, specifically in the domains of electrical and hydraulic networks. The primary objective is to demonstrate the component-oriented modeling process, enabling efficient design and analysis of systems that would otherwise be difficult to evaluate.
- Modeling of electrical circuits using Modelica components.
- Simulation of hydraulic networks and control systems for water recovery.
- Automation of wastewater pumping station processes.
- Implementation of 3D animations for mechanical systems using the Multibody library.
Excerpt from the Book
3.2.1 Resistor
Resistor is a passive two terminals electrical component that represent the dissipated electrical energy in a system. At modelica language it can be defined as a model with main equation relates between the time-varying voltage v(t) across the resistor with value R and the time-varying current i(t) passing through it. It is described by the equation v(t)= R i(t).
The following modelica code represents the resistor model.
model Resistor parameter Real R=1000; Real v ”Voltage drop between the two pins”; Real i ”Current flowing from pin p to pin n”; pin p ; pin n ; equation v = p.v - n.v; 0 = p.i + n.i; i = p.i; R*i=v; end Resistor;
The Modelica code in the previous example has three variables listed below:
• R which represents a real parameter holding the resistance value.
• v is real variable defines the voltage a cross resistor.
• i is real variable defines the current passing through resistor.
Resistor has two terminals then two connectors p and n must be declared. The two connectors must be added by dragging and dropping them in the diagram tab when drawing the resistor symbol.
The modelica code of resistor has four equations listed below with illustration:
• v = p.v - n.v, is the voltage drop a cross the resistor where p.v and n.v is the p connector and n connector voltages respectively.
• 0 = p.i + n.i, the sum of currents at connectors equals zero.
• i = p.i, the current passing through a resistor is the current flowing into its positive pin.
• R*i=v, Ohm’s law relating the voltage and current through resistor.
Resistor symbol can be drawn by Dymola as shown in Fig. 3.2
Summary of Chapters
1 Introduction To Modelica: Provides an overview of the Modelica language, its history, features, and the Dymola simulation environment.
2 Syntax of Modelica: Details the building blocks of the language, including data types, operators, and essential syntax rules for modeling.
3 Simulation of Electrical Networks: Explains the construction of electrical component models and illustrates their application in various circuits.
4 Simulation of hydraulic networks: Discusses the modeling of hydraulic components and the simulation of large-scale water and wastewater management systems.
5 Introduction to Animation Using Dymola: Covers the use of the Multibody library to animate 3D mechanical systems such as pendulums and springs.
Keywords
Modelica, Dymola, Simulation, Electrical Networks, Hydraulic Networks, Wastewater Pumping, Modeling, Object-Oriented, Multibody Library, Control Systems, Differential Equations, Engineering Design, Resistor, Capacitor, Automation
Frequently Asked Questions
What is the core focus of this thesis?
This work focuses on using the Modelica language and Dymola software to create component-oriented models for simulating complex physical systems.
Which domains are covered in the simulation chapters?
The work primarily covers electrical network simulation and hydraulic network simulation, including water recovery and wastewater pumping systems.
What is the main objective of the models developed?
The objective is to provide an efficient tool for design, analysis, and evaluation of control schemes for complex technical systems.
What programming approach does Modelica use?
Modelica is an object-oriented, declarative, and equation-based language designed for multi-domain modeling.
What does the main part of the work cover?
The main part covers the syntax of the language, the definition of electrical and hydraulic components, and the development of complete system models like wastewater stations.
Which software is central to the simulations presented?
Dymola (Dynamic Modeling Laboratory) is the primary software used for modeling, simulating, and animating the systems described.
How are pumps managed in the wastewater pumping plant?
Pumps are managed via a PID-based controller with hysteresis logic to ensure efficiency and protect the system from surges, allowing only one pump to be assigned a partial load.
How is the screening process in the wastewater plant handled?
The screening process is modeled using buffer chambers and a bar screen, where level differences trigger a discharge mechanism to remove coarse material.
- Quote paper
- ِAhmed Jaber (Author), Mohammed Tubail (Author), Mohammed Abu Hasna (Author), 2013, Modelica. Modeling and Simulation Based on Dymola Program, Munich, GRIN Verlag, https://www.hausarbeiten.de/document/286484