Using must-point curves
Prepared for FEBio Studio 2.6
Difficulty: intermediate
Motivation
The auto-time stepper in FEBio is a useful feature that allows the time step size to be automatically adjusted depending on how well the solution is progressing. For example, if the model is converging poorly, the auto-time stepper may decrease the time step size for the remainder of the analysis, which will typically improve convergence. (Of course, the cost is that more time steps need to be solved.) However, when using the auto-time stepper it becomes difficult to have precise control over the specific time points that the analysis will pass through. For instance, say that a load or boundary condition must start at a particular point in time. When using the auto-time stepper, there is a-priori no guarantee that the solution will pass through this time point and that may have consequences for the remainder of the analysis. The solution to this problem is the use of a must-point curve. The must-point curve is a set of points that the solution is forced to pass through.
In addition to forcing the time-stepper to pass through certain points, a must-point curve also allows you to:
a) Control the maximum time step size: Different parts of the analysis may require different time step sizes. For instance, in a biphasic analysis, the initial time step size may need to be relatively small in order to accurately capture the response to rapid loading. Later in the analysis, when the model’s response begins to equilibrate, the time step size can be increased in order to speed up the solution progress.
b) Control the frequency of output to the plot file and other output files: Another side effect of using the auto-time stepper is that the time step size may decrease significantly during certain parts of the analysis where FEBio has trouble converging. Using the default output settings, this may result in much larger output files than using a fixed time step size. Another drawback is that the actual number of time steps that are solved may change depending on loading parameters. This may be inconvenient for post-processing and comparing different analyses. Using a must-point curve, you can ensure that the same number of output states are produced.
In this tutorial we’ll go through the detailed steps of adding a must-point curve to an analysis that accomplishes the three effects described above: 1) force the analysis to pass through specific points in time, 2) change the maximum time step size, and 3) output only at specific timepoints. The completed model is available from the model repository. The model represents a confined compression experiment, demonstrating stress relaxation under a prescribed displacement. The displacement is applied as a linear ramp from time 0 to time 1. Then, from time 1 to time 20, the displacement is held fixed, and the sample is allowed to relax.
Step 1. Activating the auto time stepper
Using must-point curves requires that the auto-time stepper is enabled. To check this, select the analysis step in the model tree and look for the Auto time stepper property. Make sure that it is set to default. (This will usually be the case since this is the default setting for new models, but it’s always best to double-check.)
Step 2. Defining the must-point curve
Must-point curves are defined by assigning a load curve to the max stepsize (dtmax) parameter of the auto-time stepper. To assign a load curve to this parameter, open the Curve Editor (menu Tools/Curve Editor or the corresponding toolbar button on the main toolbar).
In the Curve Editor window, navigate to the max stepsize (dtmax) parameter of the auto-time stepper in the left panel of the window and select it. On the right panel, click the New… button, and select loadcurve from the dialog box that appears. This will create a default (empty) loadcurve and assign it to the selected parameter (i.e. the dtmax parameter).
In this example, we aim to keep the time step size small (dtmax =0.1) between time 0 and 1 (the loading part), and then increase it (dtmax =1.0) between time 1 and 20 (the relaxation part). We also wish to set must-points at all integer time points (0, 1, …, 20). To do this, we’ll first manually add two points to the curve, namely points (0,0.1) and (1,0.1). This will ensure that the max time step size will be set to 0.1 between time 0 and 1. (See here for more details on how to use the Curve Editor.) Then, use the equation editor (click the button with a Greek capital Sigma on the toolbar above the graph of the loadcurve) to insert additional points between time 2 and 20.
This will insert 19 points at the integer time points between time 2 and 20, resulting in a total of 21 points.
Finally, set the Type of the load curve to Step. The Type property sets the interpolation method for interpolating the curve between the data points. The step option keeps the value constant between data points. In this case we only wish to change the max time step size between the two phases, so the step option gives us the desired result. In principle, other interpolation types can be used and may give even more fine-grained control over the max time step size.
The final load curve should look like the image below.
Step 3. Adjusting the Output level
Lastly, we’ll change the output setting for the plotfile so that only the states that correspond with the must-point curve are stored.
Return to the properties panel of the analysis step under the model tree and locate the plot_level parameter (under the Output settings). You can change the default value by clicking on the current value and selecting the PLOT_MUST_POINTS option from the dropdown menu. By choosing this option, FEBio will only write the state to the plot file if it corresponds to a point on the must-point curve.
Step 4. Running the model
The model can now be run in FEBio and should run without issues. The results can then be loaded into FEBio Studio. You should see that there are 21 time points, one for each integer time value between 0 and 20.
Note that although only 21 states are stored, the analysis required more steps to solve the problem. The logfile will indicate that there were 49 timesteps solved. However, thanks to the must-point curve not only can we be sure that the solution passed through the must-points, but also that only the time steps that correspond to must-points are stored to the plotfile.