chaos-polymtl / lethe

Repository for the open-source lethe CFD/DEM/CFD-DEM project
https://chaos-polymtl.github.io/lethe/index.html
GNU Lesser General Public License v2.1
269 stars 59 forks source link

Average velocity as initial condition #1215

Closed mivaia closed 1 month ago

mivaia commented 1 month ago

The average velocity profile of an old simulation can now be used as an initial condition to a new simulation. The base mesh needs to stay the same, but auxiliary physics can now be added a posteriori without setting them as true in the initial simulation. The time stepping scheme can also be modified.

Description

The refactored restart mechanism had some problems:

To solve these problems, the already implemented checkpoint mechanism is used. The simulation solving for the average velocity profile therefore needs to have checkpointing activated as well as the set calculate average velocities set to true (as before). Parameters in the initial condition section have been added as well as some conditions in the read_checkpoint() function.

Conditions like:

Testing

A test using the average velocity profile was modified.

Documentation

Documentation will be added in a subsequent PR if all the modifications are accepted.

Miscellaneous (will be removed when merged)

An initial condition using the VTU files was attempted, but it is way easier to use the already existing checkpoint mechanism. No known function to retrieve the triangulation information from the vtu have been found in deal.II. The read_vtu() function is only oriented towards reading vtu meshes generated with deal.II.

Checklist (will be removed when merged)

See this page for more information about the pull request process.

Code related list:

Pull request related list:

oguevremont commented 1 month ago

So now if I understand correctly, we can run simulation that solve FD only while checkpointing, then run subsequent simulations where auxiliary physics are activated by using the proper type of initial condition?