precice / openfoam-adapter

OpenFOAM-preCICE adapter
https://precice.org/adapter-openfoam-overview.html
GNU General Public License v3.0
135 stars 80 forks source link

OpenFOAM 10: Fixes adapter not reading coupling data #335

Open simrnjandu opened 3 months ago

simrnjandu commented 3 months ago

Added missing call to readCouplingData(), which ensures that data is read from the precice buffer.

This fixes the issue of perpendicular-flap tutorial showing no displacement of the interface on openfoam's side.

MakisH commented 2 months ago

Thank you for contributing! Important context (it took me a bit to realize): this is targeting the OpenFOAM10 branch and is not an issue on develop/master:

https://github.com/precice/openfoam-adapter/blob/develop/Adapter.C#L698

This is the result of an incomplete rebasing of the related .org branches, which I still need to fix at some point. But this is interesting now: if you apply this fix, does everything else work? What have you tried?

For context, see #328. Please comment there regarding your needs.

simrnjandu commented 2 months ago

Important context (it took me a bit to realize): this is targeting the OpenFOAM10 branch and is not an issue on develop/master

I forgot to add a link to the forum topic I created regarding this: https://precice.discourse.group/t/openfoam-org-adapter-doesnt-read-celldisplacement/1971

But this is interesting now: if you apply this fix, does everything else work? What have you tried?

After this fix, these tutorials work as expected: perpendicular-flap (fluid-openfoam and solid-dealii) and flow-over-heated-plate (fluid-openfoam and solid-openfoam) (after necessary modification of the openfoam case files: https://github.com/precice/tutorials/commit/d5911c9c4745a1df027c30b99e25d39b3aeb339e ).

I have not tried the other tutorials, but I believe they would work as well.

For context, see #328. Please comment there regarding your needs.

I am not using any custom solver, so the latest openfoam org version that is supported by precice does the job for me. I need the org version because the ESI one does not have the required rheology models: https://doc.cfd.direct/openfoam/user-guide-v10/transport-rheology For now, OpenFOAM10 is working perfectly fine for me!

precice-bot commented 2 months ago

This pull request has been mentioned on preCICE Forum on Discourse. There might be relevant details there:

https://precice.discourse.group/t/openfoam-org-adapter-doesnt-read-celldisplacement/1971/4