# Tag Archive for: Function

## Useful commands and functions for scripting

Beyond the usual assortment of settings and flags, there are a number of useful commands and functions which tell Dymola to do various things. These can be triggered by entering them directly into the Commands window or executed via a script. At times, running models from a script can...

## How to solve your own nonlinear equation

Whilst Dymola is good at solving nonlinear equations in models automatically, this post has a look at how to create a function that solves a nonlinear equation. A useful tool when required, as well as a way to get further insight into how nonlinear equations are solved. Why solve...

## 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...

## 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...

## Displaying results in the simulation log from a function in Dymola

Functions in Dymola provide a useful way to run multiple models iteratively, in parametric sweeps or in other configurations and studies. A previous blog post, (How to simulate a model multiple times with different parameter values), explores various methods to automate simulation execution, which can be called via a...

## Modelica-based Tic and Toc Functions in Dymola

Abstract: This article is aimed to present Modelica-based simple tic and toc functions and their implementation in Dymola. These functions are created to estimate the total elapsed computer processing unit (CPU) time of repeated model experimentations in Dymola. For this purpose, the getTime() function from Modelica Standard Library (MSL)...