Table of Contents
Checking the Convergence of a Solution
One important aspect of numerical simulations is to check the validity of the solution. Generally, there is not an analytical solution generally available, so the simulation must be checked against itself at a higher resolution. The process of checking a solution at increasing resolution is known as convergence checking, as the solution is expected to converge on a particular value. The convergence checking process begins by picking a stress, strain, or deflection at a point to study.
Generally, the deflection at a point will converge on a consistent solution faster than the stress. This is because the deflections are the fundamental result of finite element analysis, and stresses are then derived from displacements. For this reason, we will be studying the convergence of stress.
Automated convergence checking script
The convergence checking process can be automated in SnSScript. The attached script will allow you to run a basic convergence check. Download the script here: Convergence Checking Script
- Open your model and run SnS on the solid. Choose the material and set the restraints and loads. Now, exit SnS by clicking Done.
- Run convergence.rvb by following these steps. It will ask you to select the solid you would like to check, and it will use the material, restraints, and loads as applied in SnS.
- Next, the script will ask for a point on or in the solid to check. The script will check the von Mises stress at this location at three resolutions to determine whether or not the solution is converging.
- Finally, the script will run (this may take some time) and report whether the solution is converging. If it determines it is, the script will report the percent difference between the second and third resolutions as its tolerance.
All of the settings (such as chosen resolutions and the value to check) can be changed in convergence.rvb by editing a script.
If you are interested in the process of convergence checking and why this script was created in this way, check out this reference on practical convergence checking.
Create a convergence plot with SnSScript
It is also possible to generate a plot of convergence data using SnSScript. Download the script here: Convergence Plotting Script
- Open your model and run SnS on the solid. Choose the material and set the restraints and loads. Now, exit SnS by clicking Done.
- Run PlotConvergence.rvb by following these steps. The script will ask for a file location to save the data at. It will also ask you to select the solid you would like to check, and it will use the material, restraints, and loads as applied in SnS.
- Next, the script will ask for a point on or in the solid to generate the convergence plot. The script will query the von Mises stress and total displacement at this location.
- The script will run through the various resolutions and write the queried values to the file specified. The results file is a CSV (comma separated value) file, and can be opened in Microsoft Excel, OpenOffice and other programs.
The data produced by the script is best plotted with the values of resolution on a logarithmic scale.