Moving domain problem

Hello everyone,
I’m working on a simulation where a material surface is undergoing ablation (material is being “burned” or removed) over time, which causes the surface to shrink. In FreeFem++,
I need to do the following:
Update the mesh: As the material shrinks, I need to update the mesh at each time step to reflect this shrinkage and also remesh the surface.
Update the finite element space (Fespace): After the mesh is updated, I also need to update the finite element space to reflect the new geometry.
Transfer old solution fields: After the mesh is updated, I need to transfer my old solution fields (like temperature, density, etc.) to the new mesh.

My questions are:

How do I properly update the mesh and remesh during the simulation?
How do I reinitialize the finite element space after remeshing?
How do I transfer the old solution fields (temperature, density, etc.) to the new mesh? Should I interpolate them, or can I initialize them based on the new geometry?
It would be helpful if you can provide any guidance on how to implement this in FreeFEM++, or if there are specific commands or examples you could point me to.
Thank you!!!

Hello,

Here’s how i would proceed :
1)Mesh creation
2)fespace / fields creation
3)movemesh → see documentation
4.a)If you keep the same number of element / dof without new remeshing, update your fields in the same way as the movemesh example of the doc

    real[int] tmp(u[].n);
    tmp = u[]; //save the value
    u = 0;//to change the FEspace and mesh associated with u
    u[] = tmp;//set the value of u without any mesh update

4.b) If you want to refine your mesh you can use adaptmesh (see freefem example) but to update your fields you will only need to interpolate.

u = u; //  change the FEspace and mesh associated with u and update the mesh by interpolation

I hope you find it useful.

1 Like

Thanks so much for your helpful response!

In my case, the domain’s length, initially L, will change after each time step as the material undergoes ablation. This means not only the mesh will move (i.e., shrink in length), but the entire domain itself will change in size. After each time step, the new length will be smaller, so both the mesh should update to match this new domain size, and the finite element spaces should also be redefined to reflect the new geometry and domain size.

Is this type of update, where both the mesh and the domain itself change size dynamically with every time step, feasible in FreeFem++? If so, are there specific steps or considerations I need to follow to handle the resizing of the domain as well as the associated mesh and Fespace updates at each iteration?

Thanks again for your insights! I really appreciate your help.

With movemesh the size/shape of the domain will change, but not the number of elements.

With adaptmesh the size/shape of the domain shape will remain the same but not the number of elements.

I recommend trying a simple example with

Mesh creation
fields creation
for loop
    {
     set value to your field (deformation/displacement)
     apply movemesh or adaptmesh or both
     update fields (dont forget to erase the previous fields to be sure that your fespace and mesh change)
     }

and see if it does what you want it to do