What are savestate() and reloadstate() in implicit coupling?

Dear community members,

I have coupled my immersed boundary method program with calculix. After testing, my Perpendicular flap example has the same results as the official openFoam provided. However, I used a loose coupling strategy, which is an explicit strategy. Because the density ratio of this problem is relatively large, even the explicit strategy can obtain good results.

However, I encountered difficulties when reproducing the Turek Hron FSI3 example. Because the density ratio is 1, implicit coupling must be used. However, it has been impossible to reach convergence.

I compared the forces on the solid when calculated by the separate fluid solver(no fsi), and the results were correct.

I suspect that there is an error in the saving and reloading states function. I am showing the code of my program. Can anyone tell me which variables need to be saved? I have saved all variables as much as possible. Is this correct? If the reloading is to the original state, why does the force and displacement change? How is implicit coupling implemented?

Please help me, thank you!


Hi,

When in doubt, checkpoint everything :wink:
Your solver must be able to jump back in time.

We have an extensive documentation on how implicit coupling works:

You probably already read the documentation page and answered your questions, but for the future reader:

Implicit coupling is iterative: you try reading some data on the interface, the coupling does not converge, so the acceleration gives you new data to try, and the process repeats. Every time you “try” data, you update all the internal state of the solver. So, before applying the new values, you need to restore the internal state to how it was supposed to be. You do this by writing and reading checkpoints.

What typically goes into a checkpoint:

  • Time and time stepping information
  • The mesh itself, in case it changes. You are using an IBM, so you probably need to checkpoint the location of the boundary.
  • The solution fields (displacement, force, …)
  • Any derived fields (stress tensors etc) that are not automatically recomputed

More or less everything you would also write into a restart file.