chaos-polymtl / lethe

Repository for the open-source lethe CFD/DEM/CFD-DEM project
https://chaos-polymtl.github.io/lethe/index.html
Apache License 2.0
271 stars 60 forks source link

Fix NS-VOF stong residual formulation #1180

Closed hepap closed 3 months ago

hepap commented 3 months ago

Description

Solution

Testing

Documentation

No modification in the documentation.

Miscellaneous (will be removed when merged)

I guess the tests will fail because of the CI issue. I have still opened the PR since the formulation won't change and I will update the restart of the new test when I have updated my P4est version :)

Checklist (will be removed when merged)

Code related list:

Pull request related list:

blaisb commented 3 months ago

The debug test still seems to crash?

AmishgaAlphonius commented 3 months ago

The debug test still seems to crash?

It's a bit weird, the load from a checkpoint function for the triangulation has an assertion that checks if all cells are at the same level of refinement. In Release there is no issue, but in Debug, it crashes because of this. I tried it locally also and I had the same issue. Is it that assertions are only checked on Debug?

blaisb commented 3 months ago

The debug test still seems to crash?

It's a bit weird, the load from a checkpoint function for the triangulation has an assertion that checks if all cells are at the same level of refinement. In Release there is no issue, but in Debug, it crashes because of this. I tried it locally also and I had the same issue. Is it that assertions are only checked on Debug?

You need to make sure the restart files does NOT refine the triangulation. Generally this is the case for all the solvers (we do not do mesh refinement when we are reading a restart file), however we don't have any restart tests for VOF I guess,so maybe this issue was there all along. You can check a restart with any VOF cse in the debug to see if that's the issue. But otherwise, the triangulation/ mesh must have the same properties as the one used in the restart (aka the coarse grid has to be the same)

Assertions are not run in DEBUG mode, so that it works in release does not mean anything.

hepap commented 3 months ago

I will fix the restart with the box refinement feature on another branch, and I will come back to this PR so that it stays a coherent PR.

hepap commented 3 months ago

So I removed the box refinement for the new test in this PR, and I fixed the restart problem with box ref in PR #1184.

This PR (#1180) can be merge before PR #1184 (I added a test in PR #1184 to verify restart with box ref).

blaisb commented 3 months ago

@hepap can you rebase? Then this will be ready to go :)