calculix-adapter icon indicating copy to clipboard operation
calculix-adapter copied to clipboard

Fixed subcycling in implicit coupling (for regular simulations)

Open boris-martin opened this issue 2 years ago • 4 comments

(Depends on #105 )

Fixes https://github.com/precice/calculix-adapter/issues/9. Essentially, checkpointing stores more data than previously (not only positions, but velocities and a few more things), because those additional fields must be stored when going back from more than an increment (time step). So previous implementation worked only when there was one step per window.

Still WIP:

  • [x] Refactoring & cleaning
  • [ ] Outputting once per time step instead of once per window (using the buffer from #105)
  • [ ] Allow user-defined output frequency (once every N steps)
  • [ ] Testing on more cases, including thermal cases (only perpendicular flap so far)
  • [x] Check for redundancy (I may have copied more data than necessary?)

boris-martin avatar Sep 25 '22 12:09 boris-martin

Turns out adapting the buffer code is trickier than anticipated. I'm undrafting and I suggest staying on the current partial fix: correct results, but with one output every N time window instead of every N steps, with N defaulting to 1. This will limit the introduction of new bugs for now.

boris-martin avatar Sep 26 '22 13:09 boris-martin

My suggestion would be to continue with the v2.20 release and continue to work on subcycling. Rather have the adapter working correctly when all time steps are equal.

KyleDavisSA avatar Nov 16 '22 13:11 KyleDavisSA

I tried running the perpendicular flap, but it looks like we need to consider updates based for v2.20:

* With v2.19 and this PR, the tutorial was running normally

* With v2.20, it is running normally

* With v2.20 and this PR, the flap does not move

Please also check if it actually fixes the original issue (example on how to reproduce it).

How did you build "This + 2.20 ?" Since this PR involves quite some modifications of the main file I planned to do it by hand

boris-martin avatar Nov 16 '22 14:11 boris-martin

I tried running the perpendicular flap, but it looks like we need to consider updates based for v2.20:

* With v2.19 and this PR, the tutorial was running normally

* With v2.20, it is running normally

* With v2.20 and this PR, the flap does not move

Please also check if it actually fixes the original issue (example on how to reproduce it).

How did you build "This + 2.20 ?" Since this PR involves quite some modifications of the main file I planned to do it by hand

I checked out the v2.20 branch and I merged this branch, which did not lead to any conflicts. I guess we do need to update things, but let's make that a bugfix release, then. There is no regression.

MakisH avatar Nov 16 '22 16:11 MakisH