CFD Online Discussion Forums

CFD Online Discussion Forums (https://www.cfd-online.com/Forums/)
-   OpenFOAM Programming & Development (https://www.cfd-online.com/Forums/openfoam-programming-development/)
-   -   Help with dynamicFvMesh (https://www.cfd-online.com/Forums/openfoam-programming-development/238255-help-dynamicfvmesh.html)

bubbleb September 1, 2021 21:15

Help with dynamicFvMesh
 
Hello Foamers

I'm solving a problem with overInterDyMFoam.
Now I want to compile AMR into my program, and I know that their dynamicFvMesh are not compatible.
How can I do it ?

Best regard

mAlletto September 2, 2021 04:07

Hello,

the problem here is that dynamicRefineFvMesh inherits from dynamicFvMesh

and dynamicOversetFvMesh inherits from dynamicMotionSolverListFvMesh which inherits from dynamicFvMesh.

So merging the functionaltiy of the overset mesh and of AMR in on class is not so trivial. Be doing this you get the so called diamod of death: https://en.wikipedia.org/wiki/Multiple_inheritance

There are some workarounds in the web to solve this issue. Maybe you can try a few and report back if you were successfull.

Best

Michael

mAlletto September 2, 2021 07:20

As pointed out here: https://stackoverflow.com/questions/...le-inheritance

a compositon of AMR and overset would help making a new class oversetAMR.

I tried it once but then I reliesed that I constructed two different meshes since I called the constructurs of AMR and overset in the constructor of oversetAMR.

So maybe one can trie to construct overset first and give that a reference of overset to AMR and construct ARM from a reference of overset.

Then maybe functionality of AMR can be used on overset.

One can try this and look if it's working

bubbleb September 6, 2021 02:15

Sorry for the late reply and thank you very much.
I will try about that.

Best regards


All times are GMT -4. The time now is 20:30.