Time
Solve a time-dependent problem using implicit or explicit time stepping.
Syntax
model.sol(sname).create(fname,"Time")
model.sol(sname).feature(fname).set(pname,value)
Description
Operation feature.
The time interval and possible intermediate time values are given in the property Tlist. The output times are controlled by the property Tout.
 The feature Time accepts the following properties and values:
Value of the period Δt, when algebraicsolvemethod is set to dt for Adams–Bashforth methods.
Value of the period Δt, when algebraicsolvemethod is set to dt for Runge–Kutta methods.
Value of N, when algebraicsolvemethod is set to n for Adams–Bashforth methods.
Value of N, when algebraicsolvemethod is set to n for Runge–Kutta methods.
n | dt
Strategy used to solve the algebraic equations: every Nth step or periodically for Adams–Bashforth methods.
n | dt
Strategy used to solve the algebraic equations: every Nth step or periodically for Runge–Kutta methods.
Global absolute tolerance, if atolglobalvaluemethod is manual.
scaled | unscaled
factor | manual
Fraction of initial step, when consistent is set to bweuler.
true | false
Check validity of coupled system, if odesolvertype is set to explicit.
on | off
off | on | bweuler
Name of the controlling study step or user if the feature is controlled manually.
smooth | quick | disabled
Interpolate the last time specified in the list of output times, if true. If set to false, the last output time is solved and not interpolated. In particular, the solver does not take steps past the last time.
include | exclude
on | off
on | off
on | off
on | off
on | off
on | off
on | off
on | off
on | off
on | off
yes | maybe
Maximum time step for BDF, when maxstepconstraintbdf is set to const.
auto | const | expr
Maximum time step for BDF: automatic (auto), constant (const), or an expression (expr).
auto | const | expr
Maximum time step for Dormand–Prince 5: automatic (auto), constant (const), or an expression (expr).
auto | const | expr
Maximum time step for generalized alpha: automatic (auto), constant (const), or an expression (expr).
Maximum time step for Dormand–Prince 5, when maxstepconstraintdopri5 is const.
Maximum time step for generalized alpha, when maxstepconstraintgenalpha is const.
1 | 2
direct | lumped
automatic | manual
Number of time steps between updates, when updtlvl is set to manual when timemethodexp is not set to ab3loc.
Number of time steps between updates, when updtlvl is set to manual when timemethodexp is set to ab3loc.
implicit | explicit
on | off
tsteps | tout
tsteps | tout
Probed to use if probesel=manual.
all | none | manual
linear | constant
on | off
on | off
rk34 | ck5 | dopri5
on | off
on | off
on | off
The global time derivative factor, if tderglobalmethod is set to manual.
auto | manual
The time derivative factor, if tdermethod is set to manual.
auto | manual
bdf | genalpha | init
rk | erk | ab3 | ab3loc
tlist | tsteps | tstepsclosest
Times to store: output times by interpolation; every Nth step taken by solver; or steps taken by solver closest to output times.
manual | elemexprs
free | intermediate | strict | manual
Time-stepping mode when timemethod is set to bdf.
free | intermediate | strict | manual
Time-stepping mode when rkmethod is set to ck5.
free | intermediate | strict | manual
Time-stepping mode when rkmethod is set to dopri5.
free | intermediate | strict | manual
Time-stepping mode when timemethod is set to genalpha.
free | intermediate | strict | manual
Time-stepping mode when rkmethod is set to rk34.
Value of N for every Nth step from the solver to store when tout is set to tsteps.
false | manual | factor
Update time step: off (false), manual, or factor when timemethodexp is set to ab3loc.
false | manual
Update time step: off (false) or manual, when tstepping is set to explicit for the timemethodexp methods erk and ab3.
By default, you can control the process of solving the linear or nonlinear system of equations in each time step manually. For a coupled problem, this is done through the properties Damp, Dtech, Hnlin, Initstep, Jtech, Maxiter, Minstep, and Rstep listed under femnlin. For a segregated problem, the properties listed under femstatic that are related to the segregated solver are available. When Timemethod is set to bdf it is possible to use the internal nonlinear solver of the time integrator. This can be achieved by setting Nlsolver to automatic.
The properties atol, atolmethod, atolglobal, atolglobalfactor, atolglobalmethod, atolglobalvaluemethod, atoludot, and atoludotactive require some additional explanation. The default value of the absolute tolerance for all fields is given by the property atolglobalfactor or atolglobal, depending on the setting for atolglobalvaluemethod. The modifier atolglobalmethod specifies whether the given value of atolglobal should be applied to scaled or unscaled variables. For variables where the automatic scaling does a good job, or where a manual scaling has been used, specifying the absolute tolerance in scaled variables is much easier. If either a different absolute value or scaling method than dictated by atolglobal and atolglobalmethod is wanted for one or several variables you can use the properties atol and atolmethod. Enter atol as a space-separated string with alternating field names and tolerances (for example, “u 1e-3 v 1e-6”). Enter atolmethod as a space-separated string with alternating field names and one of the strings global, scaled, or unscaled (for example, “u unscaled v scaled”). By default atolmethod is equal to global for all fields. The lists atol and atolmethod do not have to contain all fields. The ones not present get absolute tolerances as specified by atolglobal and atolglobalmethod. When solving wave-type equations, the time derivatives of all fields are also treated as unknowns, and therefore absolute tolerances have to be specified also for these components. By default these tolerances are chosen automatically. In some situations it might be necessary to specify them manually with the properties atoludot and atoludotactive. To turn on manual specification for, say, the two fields u and v, set the property atoludotactive to the string "u on v on". If atoludot is not specified, these two time-derivatives get the default absolute tolerance 1e-3. To specify other absolute tolerances, set atoludot to, for instance, the string "u 1e-4 v 1e-7". The absolute tolerance method for all time derivatives is the same as the method specified for the field itself.
The maximum allowed relative error in each time step (the local error) is specified using rtol. However, for small components of the solution vector U, the algorithm tries only to reduce the absolute local error in U below the given absolute tolerance.
There is no guarantee that the error tolerances are met strictly; that is, for hard problems they can be exceeded.
For the tolerance parameter in the convergence criterion for linear systems, the maximum of the numbers rtol and itol is used.
Use complex=on if complex numbers occur in the solution process.
The property Consistent controls the consistent initialization of a differential algebraic equation (DAE) system. The value Consistent=off means that the initial values are consistent (this is seldom the case because the initial value of the time derivative is 0). Otherwise, the solver tries to modify the initial values so that they become consistent. The value consistent=on can be used (when timemethod=bdf and nlsolver=automatic) for index-1 DAEs. Then the solver fixes the values of the differential DOFs and solves for the initial values of the algebraic DOFs and the time derivative of the differential DOFs. The value Consistent=bweuler can be used for both index-1 and index-2 DAEs. Then the solver perturbs the initial values of all DOFs by taking a backward Euler step.
For a DAE system, if Estrat=exclude, then the algebraic DOFs are excluded from the error norm of the time discretization error.
You can suggest a size of the initial time step using the property initialstepbdf when timemethod is set to bdf the property initialstepdopri5 when timemethod is set to dopri5, and the property initialstepgenalpha when timemethod is set to genalpha. You also have to set one of the properties initialstepbdfactive, initialstepdopri5active, or initialstepgenalphaactive to on for the specified initial step to be active.
By default, the solver determines whether the system is differential-algebraic by looking after zero rows or columns in the mass matrix. If you have a DAE where the mass matrix has no zero rows or columns, put masssingular=yes.
The property maxorder gives the maximum degree of the interpolating polynomial in the BDF method (when timemethod=bdf).
If timemethod=bdf and maxstepconstraintbdf=const, then the property maxstepbdf put an upper limit on the time step size (this property is not allowed when tstepsbdf=manual). If instead maxstepconstraintbdf=expr, then the property maxstepexpressionbdf controls the maximum step size via an expression that is evaluated while solving. The same holds true for the associated maxstep properties if timemethod=genalpha or timemethod=rk and rkmethod=dopri5.
The odesolver property is used to select which time-stepping method to use for the ODEs:
With implicit (the default), an implicit time-stepping method such as BDF is used.
With explicit, an explicit time-stepping method, such as the Runge–Kutta family of explicit methods is used.
The timemethod property is used to select which implicit time-stepping method to use:
With timemethod=bdf, the IDA solver (which uses a variable order backward differentiation formula) is used.
With timemethod=genalpha, the generalized-α method is used. With generalized-α, the numerical damping can be controlled by giving a value, 0 ≤ ρ ≤ 1, by which the amplitude of the highest possible frequency is multiplied each time step (hence, a small value corresponds to large damping while a value close to 1 corresponds to little damping). This is done through the property rhoinf. Also, the initial guess for the solution at the next time step (needed by the nonlinear solver) can be controlled through the property predictor when generalized-α is used. With predictor=linear, linear extrapolation using the current solution and time-derivative is used. With predictor=constant, the current solution is used as initial guess.
When timemethod is set to init the solver computes consistent initial values (for the start time, as defined by the property tlist) for the system and then stop. Time derivatives of algebraic variables and indicator functions might still be uninitialized after this operation. Such uninitialized quantities are represented by NaN (not a number) in the solution object.
The timemethodexp property is used to select which explicit time-stepping method to use:
With timemethodexp=rk, an explicit Runge–Kutta method is used: RK34, Cash–Karp 5, or Dormand–Prince 5 (specified using the rkmethod property).
With timemethodexp=erk, a classical Runge–Kutta method of order 1–4 is used.
With timemethodexp=ab3, an explicit Adams–Bashforth 3 method is used.
With timemethodexp=ab3loc, a local time-stepping version of Adams–Bashforth 3 is used (for the Wave Form PDE interface).
The property reacf controls the computation and storage of the constraint reaction force. The value reacf=on (default) means that the solver stores the FEM residual vector L in the solution object. Because L = NFΛ for a converged solution, the residual is the same as the constraint force. Only the components of L that correspond to nonzero rows of NF are stored. For each time for which the solution is requested an extra residual vector assembly is performed. The value reacf=off gives no computation or storage of the reaction force and can therefore save some computational time.
The property tlist must be a strictly monotone vector of real numbers. Commonly, the vector consists of a start time and a stop time. If more than two numbers are given, the intermediate times can be used as output times, or to control the size of the time steps (see below). If just a single number is given, it represents the stop time, and the start time is 0.
The property tout determines the times that occur in the output. If tout=tsteps, then the output contains every Nth time steps (where N is specified using the tstepsstore property; default: 1) taken by the solver. If tout=tlist, then the output contains interpolated solutions for the times in the tlist property. If tout=tstepsclosest. The default is tout=tlist.
The properties tstepsbdf (applicable when timemethod=bdf), tstepsdopri5 (applicable when timemethod=dopri5), and tstepsgenalpha (applicable when timemethod=genalpha) control the selection of time steps. If either of these properties is set to free, the solver selects the time steps according to its own logic, disregarding the intermediate times in the tlist vector. If either of the properties is set to strict, then time steps taken by the solver contain the times in tlist. If either of the properties is set to intermediate, then there is at least one time step in each interval of the tlist vector. If tstepsgenalpha has been set to manual, the solver follows the time step specified in the property timestepgenalpha. If timestepgenalpha is a scalar value, this time step is taken in the entire simulation. When timestepgenalpha is a (strictly monotone) numeric vector, the solver computes the solution at the times in the vector. The start time and stop time is still obtained from tlist; the vector given in timestepgenalpha is truncated or expanded using the first and last time step in the vector so that the start time and stop time agree with the values in tlist. Finally, an expression using variables with global scope and which results in a scalar can be used as timestepgenalpha.
For problems of wave type, the logic by which the solver selects the time step can sometimes result in a time step that oscillates in an inefficient manner. When timemethod=genalpha (the solver typically used for wave-type problems), you can avoid such oscillations in the time step using the properties incrdelay and incrdelayactive. When incrdelayactive=on, a counter keeps track of the number of consecutive time steps for which a time step increase has been warranted. When this counter exceeds the number given in the property incrdelay, the time step is increased and the counter is set to zero.
The order of the Runge–Kutta method can be set by the erkorder property. The size of the time step is controlled through the property rktimestep and can be given as a single scalar value, a (strictly monotone) numeric vector, or an expression using variables with global scope, which results in a scalar. For Adams–Bashforth 3, only a scalar constant value of the time step is allowed. Time stepping from expressions tstepping=elemexprs is useful for the Wave Form PDE interface. A local time-stepping version of Adams–Bashforth 3 is available for the Wave Form PDE interface by timemethodexp = ab3loc.
Compatibility
The TimeExplicit time-explicit solver has been removed from the Model Builder in version 6.1 but can still be used in the API. Instead, use the Time solver with an explicit time stepping. The TimeExplicit solver is still available in the Model Builder if you open models created in versions before 6.1 that include a TimeExplicit solver.