# Tag Archive for: Code

## Searching Code To Find Where a Variable is Defined

The Modelica language and Dymola are typically used to simulate complex systems. These system models are constructed from many smaller component and subsystem models, in a hierarchical structure with multiple levels. So searching code to find where variables or parameters are defined in a complex model can appear difficult,...

## A few more Dymola translation modifiers

Translation in Dymola is fundamental in the process of creating a simulation model. All components comprising of Modelica code are assembled and interpreted by Dymola, resulting in C code which is then compiled into some form of binary. It is this binary which is the end product of Dymola...

## Dymola Basics: 9. Modelica Language – Calculations

This blog post is a continuation from a previous post on the Modelica Language. This blog post focuses on the syntax used in equations and algorithms and the difference between the two. Calculations Equation Sections Models and blocks primarily use an equation section to define the calculations of the...

## Dymola Basics: 9. Modelica Language – Variables

This blog post is a continuation from a previous post on the Modelica Language. This blog post goes into a little more detail regarding variable definition and syntax in equations and algorithms. The Class Restriction of a class can restrict the ability to use certain elements and methods, also described...

## Case study: Using Dymola to automate testing and post processing by writing a function

Background – Why does steering feel matter? Creating a realistic feel to the steering of a vehicle model is very important for DiL simulations, due to the role torque feedback through the steering wheel plays in how the driver interprets the dynamic response of the vehicle. A vehicle with...

## Dymola Basics: 9. Modelica Language – Classes

Once you’ve got comfortable with creating models using components in the Diagram layer you will probably need to create your own models. This requires understanding and implementation of the Modelica language. This, like any other coding language, must be written in the correct order, with the correct punctuation. This...

## The Dirty Code Layer (and other Dymola Faux Pas)

Have you ever picked up someone else’s Dymola models (or even ones you’ve built in the past) and thought to yourself – WHAT A MESS!? – or WHAT IN THE WORLD WAS I DOING HERE?! Organization is the first step to eliminating this sort of response. When creating models...