Convergence study
Purpose
In finite element analysis (FEM), a convergence study over various mesh discretizations is essential to assess the numerical accuracy and reliability of the solution. It allows us to determine the optimal mesh size and refine the mesh appropriately, ensuring that the results converge towards a stable solution with decreasing mesh size. The richardson_extrapolation function presented herein plays a crucial role in this process by extrapolating properties of interest to finer meshes, aiding in the identification of convergence trends and guiding mesh refinement decisions when no analytical solution is available.
Features
Convergence Study Functions:
- convergence(target_topology, meshes, reference_mesh, properties): Performs a convergence study over a series of simulation results by comparing errors of selected properties across different mesh refinements.
- richardson_extrapolation(mesh1, mesh2, properties): Implements Richardson extrapolation to estimate property values on finer meshes.
Plotting Functions:
- plot_property(property, convergence_data, ax): Generates a plot showing the convergence behavior of a specific property with respect to mean element length.
- plot_convergence(target_topology, meshes, reference_mesh, properties, axs): Plots the convergence behavior of multiple properties.
Utility Functions:
- sampled_meshes(target_topology, meshes): Samples meshes for convergence analysis without altering the original data.
- element_length_mean(mesh): Computes the mean element length of a mesh.
- error(mesh, mesh_reference, property): Calculates the error between property values on two meshes.
Categories
-
preprocessing -
postprocessing -
visualization -
HPC -
application specific scripts -
add your own category...
Example
If sensible, please add a screenshot something similar to illustrate the merge request.
Edited by Florian Zill