functiontimeGeometric

Geometric expansion of time steps

Extends from Modelica.Icons.Function (Icon for functions).

Information

This function attemps to build a vector of length nTim with a geometric expansion of the time variable between dt and t_max.

If t_max > nTim*dt, then a geometrically expanding vector is built as

t = [dt, dt*(1-r2)/(1-r), ... , dt*(1-rn)/(1-r), ... , tmax],

where r is the geometric expansion factor.

If t_max < nTim*dt, then a linearly expanding vector is built as

t = [dt, 2*dt, ... , n*dt, ... , nTim*dt]

Inputs

TypeNameDefaultDescription
Modelica.Units.SI.DurationdtMinimum time step
Modelica.Units.SI.Timet_maxMaximum value of time
IntegernTimNumber of time values

Outputs

TypeNameDefaultDescription
Real[nTim]tTime vector

Revisions

  • June 28, 2018 by Massimo Cimmino:
    First implementation.