This shows you the differences between two versions of the page.
Next revision | Previous revision | ||
mesh:meshadaptation [2017/07/18 09:36] fgillet created |
mesh:meshadaptation [2018/03/06 16:08] (current) fgillet [Mesh Adaptation (2D)] |
||
---|---|---|---|
Line 1: | Line 1: | ||
- | ====== Mesh Adaptation ====== | + | ====== Mesh Adaptation |
- | This page describes how to use the tools dedicated to mesh adaptation using the Mmg remeshing library (http:// | + | This page describes how to use the tools dedicated to mesh adaptation using the Mmg remeshing library (http:// |
- | Using the remeshing solver require to install Mmg and provide the direction to the header files and library using the CMake arguments | + | **< |
+ | ** | ||
+ | |||
+ | **Since elmerice rev. f6873f2(6/ | ||
+ | |||
+ | Using the remeshing solver require to install Mmg and provide the direction to the header files and library using the CMake arguments | ||
+ | |||
+ | < | ||
+ | cmake | ||
+ | -DMMG_INCLUDE_DIR=/ | ||
+ | -DMMG_LIBRARY=/ | ||
+ | |||
+ | </ | ||
+ | Make sure that Mmg has been compiled using the '' | ||
+ | < | ||
+ | SET(CMAKE_C_FLAGS | ||
+ | SET(CMAKE_CXX_FLAGS " | ||
+ | SET(CMAKE_Fortran_FLAGS " | ||
+ | </ | ||
Examples can be found under the test directories " | Examples can be found under the test directories " | ||
- | These tests can be executed using Ctest -L mmg | + | These tests have the label // |
+ | < | ||
+ | ctest -L mmg | ||
+ | </ | ||
+ | |||
+ | ==== Anisotropic metric definition ==== | ||
+ | |||
+ | The metric //**M**// , used to define the element size, derives from a geometric error estimate based on an upper bound for the interpolation error of a continuous field to piecewise linear elements (Frey and Alauzet, 2005). | ||
+ | |||
+ | For a variable //v//, //**M**// depends on the eigenvalues < | ||
+ | |||
+ | <m> | ||
+ | M=R.Lambda.R^{-1} | ||
+ | </m> | ||
+ | with | ||
+ | <m> | ||
+ | Lambda=(matrix{2}{2}{lambda_1 0 0 lambda_2}) | ||
+ | </ | ||
+ | and | ||
+ | <m> | ||
+ | \lambda_i=min ( max ( {{c|\lambda_i|}/ | ||
+ | </ | ||
+ | |||
+ | where | ||
+ | * < | ||
+ | * < | ||
+ | * < | ||
+ | |||
+ | Computing second derivatives in linear elements in not straightforward. Following Buscaglia and Dari (1997), this is done in two steps: | ||
+ | * First, we compute the nodal gradient < | ||
+ | * Second, we compute the hessian matrix //**H**// by solving the diffusive equation < | ||
+ | |||
+ | ==== Metric intersection ==== | ||
+ | |||
+ | Sometimes it can be desirable to use several variables to compute the metric, if we want, for example, to capture with the same mesh different physical phenomena represented by different variables. | ||
+ | |||
+ | The intersection < | ||
+ | |||
+ | < | ||
+ | |||
+ | with < | ||
+ | |||
+ | Nodal values of < | ||
+ | |||
+ | ==== Mesh adaptation ==== | ||
+ | |||
+ | The mesh adaptation step is performed using the Mmg 2D library. | ||
+ | |||
+ | The [[solvers: | ||
+ | |||
+ | |||
+ | ==== Transient mesh adaptation ==== | ||
+ | |||
+ | During a transient simulation the progression of a physical phenomena, //e.g.// the location of the grounding line, in the computational domain is usually not known in advance. \\ | ||
+ | If the mesh has been adapted using informations available at time //t//, the mesh may not be optimal anymore at time //t+n.dt//. Keeping a mesh sufficiently refined in areas where the physical phenomena progress requires to adapt the mesh frequently, introducing additionnal interpolation errors when solutions are transfered to the adapted meshes. \\ | ||
+ | The metric intersection formula given above allows to compute a metric map that contain informations at different time-steps. Iteratively solving the transient problem allows to adapt and refine the mesh in all regions where the phenomena progress. | ||
+ | |||
+ | The algorithm described in Alauzet //et al.// (J. Comp. Phys., 2007) has been implemented using a bash script that allows to iterate .sif files for the physical transient simulation and the mesh adaptation. Details are given {{ : | ||
+ | ==== Examples ==== | ||
+ | * An example for isotropic mesh adaptation can be found under | ||
+ | * [ELMER_TRUNK]/ | ||
+ | * Examples for anisotropic mesh adaptation where the mesh size is adapted using 1 or 2 variables (i.e. combining metric informations) can be found under : | ||
+ | * [ELMER_TRUNK]/ | ||
+ | * [ELMER_TRUNK]/ | ||
+ | * An example for transient mesh adaptation can be found under | ||
+ | * [ELMER_TRUNK]/ | ||