Proceedings of the 4th International Modelica Conference, Hamburg, March 7-8, 2005, Gerhard Schmitz (editor)

Similar documents
Proceedings of the 4th International Modelica Conference, Hamburg, March 7-8, 2005, Gerhard Schmitz (editor)

Proceedings of the 4th International Modelica Conference, Hamburg, March 7-8, 2005, Gerhard Schmitz (editor)

Coupled Simulations Using different Tools

Linköping University Post Print. A Meta-Modeling Environment for Mechanical System Co-Simulations

Proceedings of the 4th International Modelica Conference, Hamburg, March 7-8, 2005, Gerhard Schmitz (editor)

An Easy-to-use Generic Model Configurator for Models in Multiple Tool Formats

Proceedings of the 4th International Modelica Conference, Hamburg, March 7-8, 2005, Gerhard Schmitz (editor)

Proceedings of the 4th International Modelica Conference, Hamburg, March 7-8, 2005, Gerhard Schmitz (editor)

Proceedings of the 4th International Modelica Conference, Hamburg, March 7-8, 2005, Gerhard Schmitz (editor)

Advanced Modelica Tutorial Exercises

Rotational3D Efficient modelling of 3D effects in rotational mechanics

Modelica. Language, Libraries, Tools, Workshop and EU-Project RealSim

1st Annual OpenModelica Workshop Feb 2, 2009

Model-Based Dynamic Optimization with OpenModelica and CasADi

Proceedings of the 3 rd International Modelica Conference, Linköping, November 3-4, 2003, Peter Fritzson (editor)

Large scale physics simulations in industrial vehicle simulators

Michael Tiller Ford Motor Company: Parsing and Semantic Analysis of Modelica Code for Non- Simulation Applications pp

Design optimisation of industrial robots using the Modelica multi-physics modeling language

Modelica Environments and OpenModelica

Towards Run-time Debugging of Equation-based Object-oriented Languages

Extending the IPG CarMaker by FMI Compliant Units

Applications for MBS-FEM-coupling with MpCCI using automotive simulation as example.

A co simulation method for system level simulation of fluid structure couplings in hydraulic percussion units

Software-Entwicklungswerkzeuge

Software-Entwicklungswerkzeuge. Modelica Overview. Contents. 1. Modelica Introduction. 2. Modelica Users View. 3. Modelica Libraries

Simulation of Piping 3D Designs Powered by Modelica

Tomas Skoglund Tetra Pak Processing Systems, Sweden: Simulation of Liquid Food Process in Modelica pp

Rachel Weinstein, Joseph Teran and Ron Fedkiw

Towards Unified System Modeling with the ModelicaML UML Profile

Parametrization of Modelica Models on PC and Real time platforms

AN INTEGRATED MODELICA ENVIRONMENT FOR MODELING, DOCUMENTATION AND SIMULATION

AUTOMATIC PARALLELIZATION OF OBJECT ORIENTED MODELS ACROSS METHOD AND SYSTEM

MathWorks Technology Session at GE Physical System Modeling with Simulink / Simscape

Parallel Code Generation in MathModelica / An Object Oriented Component Based Simulation Environment

Variable Structure Modeling for Vehicle Refrigeration Applications

CLOSING THE DESIGN CYCLE LOOP WITH EXECUTABLE REQUIREMENTS AND OSLC

Automated Modelica Package Generation of Parameterized Multibody Systems in CATIA

Proceedings of the 4th International Modelica Conference

Using MSC.Nastran for Explicit FEM Simulations

System level co-simulation of a control valve and hydraulic cylinder circuit in a hydraulic percussion unit

Multi-Physics RecurDyn Style Interoperability

car=1700 FS gear=13.5 Wind: cw=0.33 AutoGear ThrottlePos JMotorPump=0.28 TS Jturbine=0.034 TS 1 Engine converter ECU ControlBox

Automatic Parallelization of Mathematical Models Solved with Inlined Runge-Kutta Solvers

LS-DYNA s Linear Solver Development Phase 2: Linear Solution Sequence

MBS Gear-tooth Stiffness Model

MODPROD'2014 8th International Workshop on Model-Based Product Development

Multi-Threaded Distributed System Simulations Using the Transmission Line Element Method

Industrial Evaluation of an Efficient Equation Model Debugger in OpenModelica

Recent developments in simulation, optimization and control of flexible multibody systems

Translation of Modelica Code into Hybrid Automata

Leveraging Integrated Concurrent Engineering for vehicle dynamics simulation. Manuel CHENE MSC.Software France

On the link between Architectural Description Models and Modelica Analyses Models

A MODELICA-BASED MODEL LIBRARY FOR BUILDING ENERGY AND CONTROL SYSTEMS

Using Modelica for Interactive Simulations of Technical Systems in a Virtual Reality Environment

Model Library Mechanics

About the Author. Acknowledgements

3 rd ANSA & μeta International Conference September 9-11, 2009 Olympic Convention Centre, Porto Carras Grand Resort Hotel, Halkidiki Greece

Recent Approaches of CAD / CAE Product Development. Tools, Innovations, Collaborative Engineering.

Flexible Body Suspension System Modeling and Simulation Using MD Nastran SOL700 in VPG Environment

Modeling Structural - Dynamics Systems in MODELICA/Dymola, MODELICA/Mosilab and AnyLogic

Appending Variable-Structure to Modelica Models (WIP)

A Strategy for Parallel Simulation of Declarative Object-Oriented Models of Generalized Physical Networks

Parallel Computing Using Modelica

Integrated Aircraft Design

ANALYSIS AND COMPARISON OF A HYDRAULIC AND PNEUMATIC SYSTEM USING THE DYMOLA SOFTWARE

ModelicaML: Getting Started Issue April 2012

Auto Injector Syringe. A Fluent Dynamic Mesh 1DOF Tutorial

Activation Inheritance in Modelica

Georgia Institute of Technology An attempt at the classification of energy-decaying schemes for structural and multibody dynamics

Load Balancing for Problems with Good Bisectors, and Applications in Finite Element Simulations

A Modelica Power System Library for Phasor Time-Domain Simulation

Towards Efficient Distributed Simulation in Modelica using Transmission Line Modeling

Functional Mockup Interface for Tool and Model Interoperability

Domain Library Preprocessing in MWorks - a platform for Modeling and Simulation of Multi-domain Physical Systems Based on Modelica

Simcenter Motion 3D. Mechatronics - Improve Design Dynamics Performance: Combine 3D Multi-Body Simulation with 1D Actuation & Controls Simulation

Generation of Functional Mock-up Units from Causal Block Diagrams

DSH plus a HWPA Program Gateway into Model-Based Design of Mechatronic Systems

DLR FF-DR-ER, Technical Report TR R101-93, March

Solving XCSP problems by using Gecode

Introduction to Simulink

Gaining Insight into Designs with MSC.EASY5 and MSC.ADAMS. Kent West Andrew Dyer MSC.Software Corporation

Mechanical Vibrations Chapter 8

The University of Nottingham, Ningbo, China, 199 Taikang East Road, Ningbo, , China

Engineering Analysis

FMI Kit for Simulink version by Dassault Systèmes

MODELITH: A FRAMEWORK ENABLING TOOL-INDEPENDENT MODELLING AND SIMULATION

Integrated Modeling, Control Synthesis and Code Generation with Modelica and Dymola

Modelica Change Proposal MCP-0021 Component Iterators Status: Under Evaluation , version v2, #1848

Aircraft A Modelica Library for Aircraft Dynamics Simulation

Improving Efficiency of Hybrid System Simulation in Modelica

Simulating Man-Machine Symbiosis

KU Leuven vibro-acoustics activities in an Industry 4.0 context

Minimal Equation Sets for Output Computation in Object-Oriented Models

Patterns Architectural Styles Archetypes

Tutorials Tutorial 5 - TypeDesigner

How to Improve FMI Compliance

Coupled analysis of material flow and die deflection in direct aluminum extrusion

MAJOR IMPROVEMENTS IN STORES SEPARATION ANALYSIS USING FLEXIBLE AIRCRAFT

ANSYS/LS-Dyna. Workbench Using. Steven Hale Senior Engineering Manager CAE Associates, Inc. June 13, CAE Associates

Mathematical Modelling Using SimScape (Mechanical Systems)

Transcription:

Proceedings of the 4th International Modelica Conference, Hamburg, March 7-8, 2005, Gerhard Schmitz (editor) A Siemers, I Nakhimovski, D Fritzson Linköping University, Sweden Meta-modelling of Mechanical Systems with Transmission Line Joints in Modelica pp 177-182 Paper presented at the 4th International Modelica Conference, March 7-8, 2005, Hamburg University of Technology, Hamburg-Harburg, Germany, organized by The Modelica Association and the Department of Thermodynamics, Hamburg University of Technology All papers of this conference can be downloaded from http://wwwmodelicaorg/events/conference2005/ Program Committee Prof Gerhard Schmitz, Hamburg University of Technology, Germany (Program chair) Prof Bernhard Bachmann, University of Applied Sciences Bielefeld, Germany Dr Francesco Casella, Politecnico di Milano, Italy Dr Hilding Elmqvist, Dynasim AB, Sweden Prof Peter Fritzson, University of Linkping, Sweden Prof Martin Otter, DLR, Germany Dr Michael Tiller, Ford Motor Company, USA Dr Hubertus Tummescheit, Scynamics HB, Sweden Local Organization: Gerhard Schmitz, Katrin Prölß, Wilson Casas, Henning Knigge, Jens Vasel, Stefan Wischhusen, TuTech Innovation GmbH

Meta-modelling of Mechanical Systems with Transmission Line Joints in Modelica Meta-modelling of Mechanical Systems with Transmission Line Joints in Modelica Alexander Siemers Iakov Nakhimovski Dag Fritzson Linköping University, Linköping, Sweden SKF, Göteborg, Sweden Abstract A framework for meta-modelling with Transmission Line (TLM) joints is presented The framework is intended to support transient simulations of mechanical systems using co-simulation of different tools The expressive power of the Modelica language is used to describe the meta-model in an easy to understand, object oriented way A ModelicaXML based translator is used to convert Modelica code to an XML document which is accepted as input by the co-simulation engine The framework prototype for SKF s BEAST and MSCADAMS is presented here It is designed to be general, so that support for other simulation tools can be easily added The main focus is on modelling of co-simulation Meta-Models taking advantage of Modelicas graphical and object-oriented modelling capabilities Keywords: simulation; co-simulation; metamodelling; multibody; TLM; XML 1 Motivation In the area of modelling and simulation of mechanical systems one can identify many different classes of models and corresponding tools The specialization leads to different focus for different tools One might say that every tool is optimized for a certain kind of problems In terms of meta-modelling every tool can be seen as a black-box handling a particular component A component is a model defined in some specific language together with some modelling and simulation tool that can perform a transient simulation of it The examples of such components are equationbased multi-physics Modelica models, general multibody models in MSCADAMS, models with detailed contact definitions in SKF s BEAST, flexible components as modelled in FE tools, etc In reality the different components are dependent on each other Two components that are in physical interaction form boundary conditions for each other and some interface can often be defined Unfortunately it is often the case that the different classes of tools are used independently Every class of tools is using approximations of the components it has interface with, that is, simplified models of the boundary conditions Several time consuming iterations are often necessary to make the components converge to similar values on on the common interface The limitations on the modelling accuracy are thus fundamental The need to bring different components into a complete more tightly coupled simulation is therefore justified This allows higher accuracy and preserve the investments in the components Different co-simulation systems have appeared on the market during the last years Most of them are focused on co-simulation of control systems and corresponding mechanical component The coupled simulations this paper is focusing on are different All components in our framework are mechanical and they have forces and motion in the interfaces What is more important from numerical point of view, the sub-models are likely to use different differential equation solvers with variable time step Numerical stability, which is not an issue for discrete time simulations, becomes an important consideration One method that was earlier used to enable closer interaction between such sub-models in a coupled simulation is transmission lines modelling (TLM) The TLM uses physically motivated time delays to separate the components in time and enable efficient cosimulation The technique has proven to be stable and was implemented for coupling of hydraulical and mechanical sub-systems [1], [2] However, no attempt to design a general coupled simulations framework was done In this paper a general approach to meta-modelling of mechanical systems using TLM is presented Modelica language is used to make such models easy to manage and the frame- The Modelica Association 177 Modelica 2005, March 7-8, 2005

A Siemers, I Nakhimovski, D Fritzson c 2 v 1 v 2 F 1 F 2 c 1 Figure 1: Delay line with the passing wave variables c 1 and c 2 and velocity variables v 1 and v 2 work is designed to enable simple extension with new simulation tools 2 Transmission Line Modelling TLM method, also called Bilateral Delay Line Method, exploits the fact that all physical interactions in nature have finite propagation speed The properties of the delay lines were studied in [7] The method is briefly described below A basic one-dimensional transmission line is shown in Figure 1 For the mechanical case the line is basically a long spring with force waves c 1 and c 2 going between it ends The input disturbances are velocities v 1 and v 2 and the reaction forces from the transmission line F 1 and F 2 Note that the spring in our implementation is assumed to be iso-elastic That is no cross-term waves are generated when working in 2D and 3D See [2] for further discussions If the line delay is set to T and its impedance to Zc then the govering equations are: c 1 (t) = F 2 (t T) + Zc v 2 (t T) c 2 (t) = F 1 (t T) + Zc v 1 (t T) F 1 (t) = Zc v 1 (t) + c 1 (t) F 2 (t) = Zc v 2 (t) + c 2 (t) (1) The equations show that the two simulation systems are decoupled with the delay time T Simulation framework can utilize this decoupling to enable efficient communications during co-simulation The transmission line introduces a parasitic mass m tlm = Zc T and stiffness k tlm = Zc/T Since it is often necessary to have a relatively large delay time (to enable larger communication intervals) while keeping the stiffness value, the user needs to be aware of the large parasitic mass 3 Simulation Framework The design goals for the simulation part of the framework were portability, simplicity to incorporate new simulation tools, computational efficiency The design goals were realized by defining following concepts and interfaces: TLM interface A named point on a mechanical object where position and velocity can be evaluated and reaction force applied TLM manager The central simulation engine It is a stand alone program that reads in a XML definition of the coupled simulation It then starts Simulation components and provides the communication bridge between the running simulations That is the components only communicate with the TLM manager which acts as a broker marshalling information between the components as required by TLM theory TLM manager sees every simulation component as a black box having one or several TLM interfaces The information is then forwarded between TLM interfaces belonging different components TLM plug-in A small C + + library having a single abstract class representing TLM interface for a specific simulation tool The TLM plug-in can be seen by a simulation component as an external force that depends on position, velocity and time The implementation of the plug-in handles the necessary communications with TLM manager Simulation component Any simulation program that has incorporated TLM plug-in as a part of its model A small script that takes the general parameters as input and starts the specific component is an additional requirement This intermediate step is necessary since TLM manager needs a common way to start all the components and each tool might have some specific start procedures 4 Modelica as Meta-Model Language Simulations of complete systems where components are modeled and simulated in different simulation packages are called co-simulations The model of a co-simulation including all system components and its inter connections we call a meta-model The extended markup language (XML) has its strength in textual data representation and conversion It is often the language of choice for communicating information between different tools Those were the reasons behind the decision to use it as the input to the simulation engine The Modelica Association 178 Modelica 2005, March 7-8, 2005

Meta-modelling of Mechanical Systems with Transmission Line Joints in Modelica Readability and edit-ability, on the other hand, are not the strengths of XML Design of co-simulation metamodels requires thus a more powerful modelling language or graphical modelling environment The following requirements were defined for meta-model definitions: Meta-Models should be based on a standard language A graphical model editor should be available for ease of use Modelica with its object oriented modelling capabilities and its standardized graphical notations is thus perfectly suited The fact that the Modelica standard defines graphical notations results in the availability of graphical model editors, ie, MathModelica [5] and Dymola [4] These editors typically allow easy connection modelling and user interface driven class design It should be mentioned that only Modelicas modelling capabilities are of interest here Meaning that there is no need for Modelica based simulations The use of Modelica as meta-modelling language might as well simplify the integration of Modelica simulations into meta-model based co-simulations This, however, is not within the scope of this work 41 Meta-Model Class Library A meta-model Modelica package for component and TLM connection modelling, using Modelicas object oriented features, has been designed Three packages plus a base model class were defined: The Components package contains classes for the different simulation components These are currently BEAST and MSCAdams components The Connections package contains the TLM connection or joint Different TLM specific parameters can be specified for each connection The Interfaces package contains the corresponding TLM interface Each TLM component contains at least one TLM interface The BaseMetaModel class is the base class for each Meta-Model It contains Meta-Model specific parameters Different TLM components are defined in the components package which are inherited from the simulation tool specific components, see also Figure 2 Figure 2: The basic TLM Meta-Model class library They add a certain number of TLM interfaces to each component TLM connections define data exchange and synchronization between these components during co-simulation Connections are created between two TLM interfaces of two TLM components TLM interfaces are therefore defined as connectors Several base classes define common model parameters needed by the TLM manager or for correct XML translation Specialized child classes modify these parameters to their needs BEAST Components for example modify the start-method as follows: model BaseComponent parameter String Description; parameter String SimulationFiles; parameter String StartMethod; end BaseComponent; model BeastComponent extends BaseComponent (StartMethod="beast --serial"); end BeastComponent; Both component and interface classes contain a type specifier which is TLM for TLM components and TLM The Modelica Association 179 Modelica 2005, March 7-8, 2005

A Siemers, I Nakhimovski, D Fritzson interfaces This allows for additional type checking during model translation and guarantees that TLM interfaces are connected with TLM connections But is also useful for future extensions with new connection types 42 Component Modelling Component modelling is divided into two steps: Component modelling in the specialized environment Each component of the multi-scale simulation is modeled in its specific environment Users define the TLM interfaces to the model Component modelling in the multi-scale environment The component needs to be integrated into the multi-scale environment Startup methods, interfaces, and communication parameters must be specified Co-simulation components are modelled in the modelling environment of the specific simulation tool To participate in a TLM co-simulation each simulation program needs to integrate an TLM plug-in and a way to model TLM interfaces In MSCADAMS for example external forces are connected to a TLM interface, and BEAST defines so called TLM-ties The TLM interfaces are thus part of the simulation model expressed in the modelling language of the specific program Simulation components are integrated into the metamodel by selecting a matching component from the Modelica Meta-model library Component type and number of TLM interfaces have to match Figure 3: A MSCADAMS car simulation component in the Modelica environment with four TLM interfaces at the front tire Alternatively can the base components, ie, Beast- Component and AdamsComponent, be extended (inherited) and a certain number of TLM interfaces be added This allows for other extensions as well, eg, selecting appropriate component icons for more intuitive modelling, see Figure 3 New components should be added to the UserComponents package in the Meta- Model library This is needed for the XML translator to work properly 43 Meta Modelling Meta-Models are created using a graphical Modelica editor, see Figure 4, where components are dragged into the model Every Meta-Model must extend the BaseMetaModel class that contains Meta-Model and co-simulation specific parameters TLM components and connections are added to the model and connections are drawn between the TLM interfaces Figure 4: Model A simple BEAST-MSCADAMS Meta- Several parameters need to be specified for the different parts of the model They are needed by the TLM manager for correct simulation execution BEAST and MSCADAMS components, for example, need a simulation file to be specified, see Figure 5, and TLM connections require correct TLM parameters The meta-model description is kept general and works with any simulation tool that supports TLM connections New components can be created by extending the BaseComponent class or any of the predefined component classes Only the start-method for the simulation tool needs to be specified for new components Predefined components can be extended if more TLM interfaces are required The number of required TLM interfaces is application and simulation-model dependent The Modelica Association 180 Modelica 2005, March 7-8, 2005

Meta-modelling of Mechanical Systems with Transmission Line Joints in Modelica Figure 5: The BEAST component parameter dialog 44 Meta-Model Translation The meta-model is translated into XML code to run in the co-simulation framework A Modelica to XML translator has been designed for this purpose The translator makes use of ModelicaXML [3] plus some co-simulation specific translations The translation is done in two steps: 1 Translation from Modelica to ModelicaXML 2 Translation from ModelicaXML to the Meta- Model XML representation To simplify parsing of the Modelica Meta-Model it is first translated into a Modelica-XML representation using the ModelicaXML [3] translator This representation can be parsed and translated with a standard XML-parser The libxml2 [6] standard library has been used to convert the ModelicaXML Meta-Model into the XML representation required by the TLM manager 45 Meta-Model Example An typical example of a BEAST-MSCADAMS Meta- Model is shown in Figure 6 A front wheel bearing hub-unit is connected to the race-car with four flanges each of which is modelled as a TLM connection The components have to be prepared in BEAST and MSCADAMS to contain the TLM interfaces Afterwards they are integrated into the meta-model environment by creating component classes with appropriate icons and TLM interfaces in the Modelica package Each Meta-Model needs to extend the BaseMetaModel Modelica class to inherit the global co-simulation parameters TLM connections are added between the TLM interfaces according to the hub-unit flanges The complete Modelica model looks like this: Figure 6: Modelica Meta-Model detailed BEAST hub unit integrated into a MSCADAMS racing-car model model BeastHubInAdamsCar extends MetaModelBaseMetaModel; MetaModelUserComponentsBeastCarCorner BeastHubUnit( Description= "A complete Beast hub-unit", SimulationFiles="CarCornerin", StartMethod="start-beast"); MetaModelUserComponentsAdamsCarModel AdamsCar( Description="A MSCADAMS car model", SimulationFiles="racing_carcmd"); MetaModelConnectionsTLMConnection TLM1; MetaModelConnectionsTLMConnection TLM2; MetaModelConnectionsTLMConnection TLM3; MetaModelConnectionsTLMConnection TLM4; equation connect(adamscarp1, TLMConnection1p1); connect(adamscarp2, TLMConnection2p1); connect(adamscarp3, TLMConnection3p1); connect(tlmconnection1p2, BeastHubUnitp1); connect(tlmconnection2p2, BeastHubUnitp2); connect(tlmconnection3p2, BeastHubUnitp3); connect(tlmconnection4p2, BeastHubUnitp4); connect(adamscarp4, TLMConnection4p1); end BeastHubInAdamsCar; The Modelica Association 181 Modelica 2005, March 7-8, 2005

A Siemers, I Nakhimovski, D Fritzson Finally the model is converted into the XML representation required by the TLM manager by first converting it into ModelicaXML and then into the XML Meta-Model representation The XML model looks like this: <?xml version="10"?> <Model name="beasthubinadamscar" StartTime="0" EndTime="1" TLMDelay="0001"> <SubModels> <SubModel Name="BeastHubUnit" Description= "A complete Beast hub-unit" SimulationFiles="CarCornerin" StartMethod="start-beast"> <InterfacePoint Name="p1" <InterfacePoint Name="p2" <InterfacePoint Name="p3" <InterfacePoint Name="p4" </SubModel> <SubModel Name="AdamsCar" Description= "A MSCADAMS car model" SimulationFiles="racing_carcmd" StartMethod="start-adams"> <InterfacePoint Name="p1" <InterfacePoint Name="p2" <InterfacePoint Name="p3" <InterfacePoint Name="p4" </SubModel> </SubModels> <Connections> <Connection From="AdamsCarp1" To="BeastHubUnitp1" <Connection From="AdamsCarp2" To="BeastHubUnitp2" <Connection From="AdamsCarp3" To="BeastHubUnitp3" <Connection From="BeastHubUnitp4" To="AdamsCarp4" </Connections> </Model> 5 Conclusion A framework for meta-modelling and simulation of mechanical systems using transmission lines for coupling components was presented The main features of the framework are: General object-oriented meta-modelling utilizing the strengths of Modelica Stability by applying minimalist approach to the program design resulting in small portable code Extensibility of the framework thanks to the portable and easy to incorporate software plugin The framework currently targets SKF s BEAST simulation tool and MSCADAMS References [1] Krus P, Jansson A Distributed Simulation of Hydromechanical Systems Third Bath International Fluid Power Workshop, Bath, UK 1990 [2] Krus P Modelling of Mechanical Systems Using Rigid Bodies and Transmission Line Joints Transactions of ASME, Journal of Dynamic Systems Measurement and Control Dec 1999 [3] Pop A, Fritzson P ModelicaXML:A Modelica XML Representation with Applications, Modelica 2003 Conference [4] Dymola, http://wwwdymolacom, Dynasim AB [5] MathModelica, http://wwwmathcorecom/products/mathmodelica Mathcore AB [6] The XML C parser and toolkit of Gnome, http://wwwxmlsoftorg/ [7] Larsson, J Interoperability in Modelling and Simulation, PhD thesis, Link öping University, Link öping, Sweden, 2003 The Modelica Association 182 Modelica 2005, March 7-8, 2005