CFD Online Discussion Forums

CFD Online Discussion Forums (https://www.cfd-online.com/Forums/)
-   OpenFOAM (https://www.cfd-online.com/Forums/openfoam/)
-   -   How to couple two solvers for simulation of two regions? (https://www.cfd-online.com/Forums/openfoam/222838-how-couple-two-solvers-simulation-two-regions.html)

jianglong December 11, 2019 00:32

How to couple two solvers for simulation of two regions?
 
Dear all,
I am a new foamer here, using the OpenFOAM v6. Now, I am struggling to develop a coupled solver for simulating two regions simultaneously, where vector or scalar fields may exchange after each step on the boundary between two regions. (one solver could be interFoam and the other one for potential equations)
Here are two plans after several days learning of OpenFOAM:
1. Rewrite solver with reference to chtMultiRegionFoam. This solver is a multi-region solver although it is for heat transfer. I want it to be work for incompressible fluid as well, so I need to integrate two solvers mentioned into it. The problem is that it may not be so easy to implement after the day's effort. I have to deal with so many conflicts for source files there like createFields.H and so on. Another problem is about flexibility. I need to rewrite it again when I change the solver integrated.
2. Develop a method for communication of fields between two regions and run solvers for each region separately. I found a boundary condition called externalCoupled which may help. However, I am worried about computation efficient since it uses a plain text files to realize the fields exchange.

Can anyone have some good ideas for this situation?

Shah Akib Sarwar October 23, 2021 15:21

Did you find any solution? I am also trying to couple two OpenFOAM solvers for my research.

night-hawk October 24, 2021 00:30

Have you tried preCICE? here is link of there site https://precice.org .

LongGe October 24, 2021 21:46

Hello All

The OpenCFD-ESI version has such a feature. This tutorial will help you.

See: OpenFOAM-v2106/tutorials/multiphase/compressibleInterFoam/laminar/waterCooler

Shah Akib Sarwar November 4, 2021 12:06

Hello all,

Thank you very much for your replies and I apologize for not responding earlier. I will look into both your suggestions and let you know when I have questions!


All times are GMT -4. The time now is 12:37.