Mesh adaptation to a solution of a the heat equation

Hi,

I’m new with mmg and to mesh adaptation solution method.
I’m using freefem to solve a basic heat equation, the mesh is generated with gmsh.
How can i compute the scalar metric field related to the temperature solution ?

Best regards.

Hi and welcome,

I am not a freefem++ expert so my help will consist in redirections over the freefem++ documentation (:wink: ):

  • freefem++ interfaces the mshmet software that allows to compute a size map from a solution field (the temperature for example);
  • you have an example of metric computation and mesh adaptation using freefem++ here (l48–53);
  • the documentation of the mshmet call within freefem++ is available here; In your case, if you want to compute a scalar field (isotropic), take care to change the aniso=1 argument by the aniso=0 one.

Note that you will need to build freefem++ with the hpddm librarie if you want to execute the linked example.

I hope that it will help you.

Best Regards,
Algiane

Hi,

Thanks for your help !
In fact freefem has is own adaptation mesh method (adaptmesh). I’m wondering what are the differences between these three approaches : mmg,mshmet and adaptmesh ?

Hello,
in FreeFem++ adaptmesh work only in 2D but if you want to make mesh adaptation in 3D you must pass through mmg and thus you need the metric in order to pass it to mmg, and one technic to compute the metric in 3D in FreeFem++ is to use mshmet …
Sincerely
GS

I recommend you (because I am a developer), to use Kratos https://github.com/KratosMultiphysics/Kratos. The problem is that the GUI is not free, and the integration between the Convection-Diffusion and MMG is not currently done (but it can be manually done)