Skip to content

Latest commit

 

History

History
66 lines (39 loc) · 4.71 KB

File metadata and controls

66 lines (39 loc) · 4.71 KB

Body-fitted cylinder 3D with MPI hessian refinement

Author: Marc Núñez Corbacho

Kratos version: 8.1

MMG version: 5.5.2

ParMMG version: 1.3.0

Source files: MPI Body-fitted cylinder 3D

Application dependencies: FluidDynamicsApplication, LinearSolversApplications, MappingApplication, MeshingApplication, MetisApplication, StatisticsApplication, TrilinosApplication

To run this example execute:

export OMP_NUM_THREADS=1
mpirun -n nprocs python3 MainKratos.py

Where nprocs is the number of processors to use in the MPI run.

Initial mesh: initial

Final mesh after 4 iterations:

final

How to use

This test case solves and remeshes and MPI parallel fluid dynamic problem iteratively using ParMMG. It uses a Hessian approach, based on:

Frédéric Alauzet. Metric-Based Anisotropic Mesh Adaptation. Course material, CEA-EDF-INRIA Schools. Numerical Analysis Summer School. https://www.rocq.inria.fr/gamma/Frederic.Alauzet/cours/cirm.pdf

Pascal Tremblay 2-D, 3-D and 4-D Anisotropic Mesh Adaptation for the Time-Continuous Space-Time Finite Element Method with Applications to the Incompressible Navier-Stokes Equations. PhD thesis Ottawa-Carleton Institute for Mechanical and Aerospace Engineering, Department of Mechanical Engineering, University of Ottawa. 2007. http://aix1.uottawa.ca/~ybourg/thesis/PhDThesis_Pascal_Tremblay_Final.pdf

Which allows to use the fields of previous simulations to adaptively refine the mesh by using its Hessian.

Some of the main settings to control and customize are:

In ProjectParameters.json:

In RemeshingParameters.json:

  • "number_of_iterations" to change the total number of consecutive resolution+remeshing of the simulation.

  • "perform_mapping_between_steps" if it is set to True, it will map the solution on step n to the mesh n+1. Set it to False to start the simulation from rest at every new step.

    If "perform_mapping_between_steps" is True

    • "search_radius" to specify the radius that the mapper will use to perform the mapping. WARNING: setting high values of the search_radius might slow down the mapping.
  • "variables_to_remesh" to specify the variables of the old mesh to be used to remesh the new mesh.

  • "start_time_control_value" to set the starting time to start computing the metrics if VELOCITY or PRESSURE are chosen as variables to remesh the variables of the old mesh to be used to remesh the new mesh.

  • "interpolation_error" to set the error that the remesher will prescribe on the output mesh. Lowering the interpolation error will result in more nodal presence and smaller sized elemnts.

  • "minimal_size" to set the minimal size of the mesh. WARNING: This only works as a truncation value. It is recomended to control the size of the mesh using the "interpolation_error" only.

  • "maximal_size" to set the maximal size of the mesh. WARNING: This only works as a truncation value. It is recomended to control the size of the mesh using the "interpolation_error" only.