-
Notifications
You must be signed in to change notification settings - Fork 19
Timestepping context
The <timestepping> context is used to control the time stepping for time-dependent and/or non-linear simulators.
Attributes:
- start - Specify the start time of the simulation (default 0.0).
- end - Specify the stop time of the simulation (default 1.0).
- dt - Specify the time step size (default 1.0).
- dtMin - Specify the minimum time step size (default 1.0).
- dtMax - Specify the maximum time step size (default 1.0).
- maxCFL - Specify the maximum CFL number (for automatic time stepping in CFD simulations).
- maxStep - Specify the maximum number of time steps (in case of automatic time stepping).
- f1 - Increase the time step by this factor in the next step, if the two last time steps used 4 or less non-linear iterations (default 1.5).
- f2 - Reduce the time step by this factor in the next step if the previous time step used 10 or more non-linear iterations (default 0.25).
Values: Zero or more <step> sub-contexts (see below).
The <step> context is used to specify a sub-range for the overall simulation time range, and how to divide that sub-range into time steps.
Attributes:
- start - The start time of the range.
- end - The end time of the range.
Value: If an integer greater than 1, this is the number of time steps. If not, this is read as a list of time step sizes. The last value read will be used until the end time is reached. However, the last step is adjusted such that the final step matches the specified end time.
The start and end attributes of the <timestepping> context are only used of no <step> tags are specified. The start attribute of the <step> tag is ignored for all but the first tag. For the subsequent <step> tag it defaults to the end attribute of the previous <step> tag.
If dtMin is specified less than dtMax, the time step size is modified automatically based on the number of non-linear iterations spent, using the scaling factors f1 and f2.
If the non-linear iterations diverge at a certain time step, that step is restarted automatically with a smaller step size (cut-back), using the scaling factor f2 (or 0.5 if f2 is specified equal to 1.0). This is repeated until convergence is achieved or the specified minimum step size dtMin is reached. In the latter case the simulation is terminated.
Example 1:
<timestepping start="0.0" end="1.0" dt="0.1"/>
Simple time stepping between 0.0 and 1.0 with a constant time step.
Example 2:
<timestepping>
<step start="0.0" end="1.0" graded="true">0.1 0.01</step>
<step>0.005 0.005</step>
</timestepping>
Time stepping between 0.0 and 1.0 with a geometric distribution between 0.1 and 0.01 for the time steps, then two steps of size 0.005, giving a final time of 1.01.
Example 3:
<timestepping>
<step start="0.0" end="0.5">10</step> <!-- timestep of 0.05 !-->
<step start="0.5">0.1 0.2 0.15</step> <!-- we end up at time=0.95 !-->
</timestepping>
Time stepping between 0.0 and 0.5 with 10 equal time steps, then three steps of size 0.1, 0.2 and 0.15, respectively, giving a final time of 0.95.
Example 4:
<timestepping dtMin="0.001" dtMax="0.1"> <!-- automatic time stepping !-->
<step end="100.0">0.1</step>
</timestepping>
Automatic time stepping between 0.0 and 100.0 with initial time step size 0.1.