CFD Online Discussion Forums

CFD Online Discussion Forums (https://www.cfd-online.com/Forums/)
-   OpenFOAM (https://www.cfd-online.com/Forums/openfoam/)
-   -   Passing air/solid boundary data with EOF-Lib (https://www.cfd-online.com/Forums/openfoam/238049-passing-air-solid-boundary-data-eof-lib.html)

celestial August 19, 2021 22:23

Passing air/solid boundary data with EOF-Lib
 
Good evening to all

My openfoam code (compressible Navier Stokes, energy and ion continuity equations) operates on an air mesh only which mesh is a subset of the
air-solid mesh that is operated on by my elmer code (it calculates the Poisson equation). The elmer code needs the surface charge on the air/solid boundary calculated by the openfoam code while the latter needs the electric field from the elmer code.

Can EOF-Lib handle the above message passing ?

Regards

Marc

celestial August 30, 2021 23:40

I will give some hints

I use Gmsh to create 2D meshes air.msh and solid.msh

Transform air.msh to the openfoam format.

Transform air.msh and solid.msh to the ElmerSolver format using

ElmerGrid 14 2 air.msh

ElmerGrid 14 2 solid.msh

and then combine the two together with

ElmerGrid 2 2 air -in solid -unite -out both

In directory both, it will be observed that all solid node numbers are shifted by the number of nodes in air.msh but the air node numbers are left unchanged.


This is great because it means that air field variables can be passed between Elmer and openfoam with the help of the coupling provided by EOF-Lib. There can be no confusion since openfoam and elmer use the same node numbering for the air domain !

The coupling involves interpolation between openfoam's cell values and elmer's node values. Hopefully this is not done on a boundary (here it is node to node)

Another problem is air.msh and solid.msh are not necessarily conformal on their common boundary.

Any comments ?


All times are GMT -4. The time now is 14:42.