CFD Online Discussion Forums

CFD Online Discussion Forums (https://www.cfd-online.com/Forums/)
-   OpenFOAM Running, Solving & CFD (https://www.cfd-online.com/Forums/openfoam-solving/)
-   -   Subdomain (https://www.cfd-online.com/Forums/openfoam-solving/59476-subdomain.html)

vitke August 28, 2007 11:23

Hi all! Is it possible to d
 
Hi all!

Is it possible to define a field on a subdomain of the whole domain (mesh), and to solve an equation on such a subdomain? I need to solve some flow in a porous medium where there is no gas–solid thermal equilibrium, so I must solve a separate energy equation for the solid. The porous medium does not cover the whole domain, and I cannot define a temperature of the solid where there is no solid, so a state function could not work. I could use cell zones or blocks as defined in blockMeshDict, if I could limit the domain of the solid energy equation to a cell zone. Or do I have to have two meshes and ignore the fact that one is a subset of the other?

hjasak August 28, 2007 11:36

Not quite like that: having zo
 
Not quite like that: having zones would mess up a lot of efficiency.

What you can do is to create an fvMeshSubset by selecting the cells you want to work on. This will give you boundaries and all other goodies you need to properly define your system + give you sufficient mapping data to move the fields you need forward and back between the original mesh and the subset.

Enjoy,

Hrv

vitke August 28, 2007 12:01

Thanks Hrvoje, this seems to b
 
Thanks Hrvoje, this seems to be just what I was looking for. I'll give it a try.

Dragan

romant April 13, 2010 05:37

does this work on runtime as well?
 
this fvMeshSubset, does it work on runtime as well, meaning selecting cells on runtime, applying boundary conditions and then solving fields on this mesh, instead of the whole mesh?

r2d2 March 25, 2020 15:07

same here...
 
Hi, I know this is an vey old thread, but I am faced withthe same issue:solving an equation of a volScalarField (convection+diffusion type) only on a subMesh asociated with a cellSet(Zone) within the "mother" mesh. Any code example available?


All times are GMT -4. The time now is 15:49.