Basic Dymola Terminology

Like anything technical, there’s plenty of jargon surrounding Dymola and its functionality. While much of it is relatively self-explanatory, some may not be clear at first glance. In this blog post I will try to shed some light on basic Dymola terminology, and provide a few details on their application in the world of Dymola.

  • State: A state is one of a collection of variables whose values are required to know the ‘state’ of a dynamic system. It is common in a second-order mechanical system to have state variables representing the position and velocity of each joint / degree of freedom. In a causal mathematical sense, states are sometimes described as the output of an integrator. States present in a Dymola model have a specific role in the translation process (defined later in this post), directly influencing the resulting structure of the model. If not explicitly set, Dymola will choose which model variables to use as states. This is called dynamic state selection. More about the state selection process can be found here.

  • Events: The term event is used to indicate an instance of non-continuous behavior in a model. Usually, this means there is an instantaneous change in a discrete variable somewhere in the system of equations. As this could have a major effect on the system dynamics, Dymola will automatically iterate the solver around the event to accurately determine when the discontinuous change occurred. Simulation speed generally suffers due to the additional computation time around an event, so event generation should be avoided where not explicitly required for accurate system dynamics. Step (step change in value), time (logical branch change at specific time), and state (model state change) events are some examples of events. More information on events can be found here.

  • Translation: One of the most important pieces of the basic Dymola terminology is translation. The translation process converts and rearranges the Modelica code into a form that can be solved procedurally. A run down of the statistical properties of the translation process can be found in a previous blog post. During the translation process, the model is converted into C code which can then be compiled into some form of binary. By default, the C code is compiled into an executable file called dymosim.exe.

  • Simulation: During translation, a dymosim.exe file (by default) is generated. ‘Simulation’ is what happens when the dymosim.exe is actually executed. During the simulation step, the model is initialized, integrated through time, and a results file is generated.

  • Initialization: Solution of the time=0 problem which determines the initial state of the model in preparation for the post time=0 integration. Users can get creative with the initialization of a model, or the initialization model may be more or less identical to the integration model. Solution of the initialization problem is attempted with a Newton Raphson (NR) type solver; if that solution fails, other alternative approaches are used.

  • Integration: In Dymola, Integration means the use of numerical methods to calculate the states in a model. The result is the time varying output of each of the model states, which fully describes the behavior of the system of equations.

  • Integration algorithm:  A numerical method used to calculate the solution of a system of equations through time. There are many integration algorithms available within Dymola. Some are more efficient and some are more robust. The ‘best’ integration algorithm is dependent on the model being integrated as well as the use case of the simulation model.

  • ODE: Ordinary Differential Equation. A differential equation with one or more functions of a single independent variable, usually time. The term ODE is sometimes also used to describe what is more accurately a system of ODEs which share a single independent variable.

  • DAE: Differential Algebraic (system of) Equations. Most Dymola models contain ODEs. Often times, models of physical systems also contain some equations which are purely algebraic in nature (which may couple the behavior of one or more states). DAEs are systems of equations which have both. Numerical methods for solving DAEs are often unique, and generally not the same as those used to solve ODEs. Additional explanation of how Dymola handles DAEs can be found here.

  • Solver: The term solver is often used as a generalized term referring to the various numerical methods used to calculate the solution of a system of equations. (Including Initialization, Integration, and Event iteration)

  • Profiling: A method of understanding where CPU time is being spent during the various parts of the simulation process. The results can be extremely useful, especially when simulation performance is paramount, such as with real-time simulations. More information can be found here.

  • Partial derivative: Partial derivatives are the derivatives of functions with respect to a single variable in a system. A partial derivative can have many uses, such as in calculating the position of something relative to a single input, or in filters, as this example discusses.

  • Jacobian: A Jacobian matrix can be considered a gradient of a system of equations. Each entry in the Jacobian is a partial derivative. Dymola will use Jacobian matrices to do various things in the solution process. One is to determine what is a logical ‘step’ in the solution of a non-linear system. In this case the Jacobian is used to efficiently drive the residuals to zero (or accurately to a tolerable value). More can be found about Jacobians and Dymola here.

Final thoughts

While some terms associated with Dymola can be unclear at first glance, the majority follow their more mainstream definitions. As always, don’t let the technical jargon put you off! Hopefully this will help clarify some basic Dymola terminology which might have previously been a little murky.

Nate Horn – Vice President

Please get in touch if you have any questions or have got a topic in mind that you would like us to write about. You can submit your questions / topics via: Tech Blog Questions / Topic Suggestion.

CONTACT US

Got a question? Just fill in this form and send it to us and we'll get back to you shortly.

Sending

© Copyright 2010-2022 Claytex Services Ltd All Rights Reserved

Log in with your credentials

Forgot your details?