I am trying to use preCICE to numerically investigate the flow dynamics of a density current interacting with a bottom-mounted elastic thin plate. I am thinking of whether InterFoam (the VOF multiphase OpenFOAM solver) can be coupled with CalculiX with the capacity of dynamic meshing. Would it be a similar route to this link (https://github.com/precice/precice/wiki/Tutorial-for-FSI-with-OpenFOAM-and-CalculiX)? Thanks!
Hi @jianzhou722!
interFoam has already been used with the OpenFOAM adapter:
- FSI: OpenFOAM adapter with interFOAM
- fluid-fluid coupling in this fork
There should be no fundamental problem and the approach would indeed be very similar to the standard FSI tutorial you mentioned.
âDynamic meshingâ sounds a bit more critical. Currently, preCICE relies on static coupling meshes. Meaning that you define them only once during initialization. This is enough if you do FSI based on an ALE approach. If you want to refine your fluid mesh, however, in every timestep and with this also your coupling mesh, then you reach the borders of preCICE currently. We are working on this, however: https://github.com/precice/precice/issues/225
Thanks! Those resources are very helpful.
I have a couple of questions:
-
Are you referring to the interaction between the different phases in interFoam by saying âfluid-fluid couplingâ? Or, if I understood correctly, did you mean âfluid-structure couplingâ instead? I plan to use interFoam as the only fluid model without others, e.g., heat transfer.
-
Does the âstatic coupling meshesâ mean that the fluid mesh cannot change during the simulation in response to the obstacle deformation? What I would like to achieve is something like the figure below (a moving mesh) . I hope PreCICE is capable of this.
By âfluid-fluid couplingâ we mean coupling two different flow domains (e.g. two connected pipes). What was meant above is that we have used the OpenFOAM adapter (with some changes about to be merged) with interFoam, so it technically works. You still need FSI with interFoam, which should be possible already (but I would be interested to know if you get any problems, I expect at least a trivial issue with automatically deriving the solver type between compressible and incompressible).
You can definitely get what you see in the picture already. In this picture we are using the Arbitrary Lagrangian-Eulerian method (ALE), where the interface is fixed in the beginning of the simulation (location and number of nodes), but each node gets a displacement that is then used in the calculations. This is the most common approach in FSI right now.
Non-static meshes in this context would mean that the interface is redefined in every time step. This is in our current research plans but you donât need it in your case.
Hello,
I can confirm that the preCICE coupling interFoam or interIsoFoam with CalculiX works, but we had to use an adaption of the force estimation for OpenFOAM according maoxmâs fix in https://github.com/precice/openfoam-adapter/issues/127 for preCICE 2.0. Otherwise the forces have been by a factor of 1000 too large, most likely due to an unnecessary multiplication of the pressure with the fluid density which is not required for inter*FOAM even if it is an incompressible solver in OpenFOAM terminology.
Ulrich
I am trying to compile the edited adapter by maoxm, but I am getting the following error:
Adapter.C: In member function âvoid preciceAdapter::Adapter::execute()â:
Adapter.C:402:53: error: âdirectoryâ is not a member of âFoam::fileNameâ
if (runTime_.timePath().type() == fileName::directory)
I know that maoxmâs adapter is for OF6, and I am currently using OF7.
I also saw this comment by @Makis in pull request #91 and made the change from fileName::DIRECTORY
to fileName::directory
. But I am stuck.
Not sure what else I am missing.
Edit:
Currently using the OpenFoam7 branch of the OF adapter and preCICE v2.1
In Makisâ pull request it is changed to fileType::directory
(emphasis on fileType instead of fileName). In case you actually have changed it to fileName::directory
you could try to change it to fileType::directory
and compile again.
Thank you sooo much @ajaust.
After a day of errors, my brain was turned into mush. Couldnât spot such simple thing.
I was able to build the adapter and have the .so
file, and will try and run the interFoam
simulation and hopefully get back with results.
2 posts were split to a new topic: FSI with interFoam and CalculiX: Convergence
Hi, @uekerman
Iâd like to know whether overInterDyMFoam has been used with the OpenFOAM adapter. I want to carry out FSI with overInterDyMFoam and Calculix for complex elastic structure by using overset mesh to make the calculation stable. Thank you.
Hi @O_K,
I donât know if anyone has tried overInterDyMFoam, I do not remember of any such case. But interFoam seems to work (with some extensions to the adapter) for FSI, and I have also seen overset grids in coupled simulations in the past. So, this should worth a try.
Note that at some point (around OpenFOAM 5.0), the âDyMâ solvers were merged with the ânormalâ solvers.
Thanks, Makis. Iâll try it.