Specifying two locations in mesh with snappyHexMesh
I am trying to mesh two concentric spheres using snappyHexMesh, but I want the interior of both spheres to be meshed while removing the meshing that is outside the larger sphere.
Using locationInMesh, if I specify a point inside the inner sphere, I only end up up with its interior meshed, and if I specify a point inside the outer sphere but not the inner sphere, I end up with the interior of the large sphere with a cavity where the smaller sphere was. The reason I want this is because I want the inner sphere to be a patch that I can use to set a temperature boundary condition, but I do not want it to be a wall, so I need its interior to be meshed so I can solve there as well. Is there any way with snappyHexMesh to end up meshing the interior of both spheres? |
Greetings Cyberholmes,
What you'll need is chtMultiRegionFoam as a solver! Assuming of course you want two regions... There is a tutorial that exemplifies just this: heatTransfer/chtMultiRegionFoam/snappyMultiRegionHeater If you simply want to set a temperature field inside a single region, then you should look into setFields. Best regards, Bruno |
Thank you for the reply, but before I even get to the stage of using a solver, I need to figure out how to use snappyHexMesh to mesh two regions. As far as I currently know, you can only specify one locationInMesh, and it removes all cells outside of that region.
|
Hi Cyberholmes,
I (wrongly) assumed you would investigate more about that tutorial case... OK, this is what happens with OpenFOAM (afaik):
On the other hand, if you only want one single region, because those two spheres are going to transfer fluid between them through that surface that separates them, then the other possibility I talked about was about setFields. With setFields, you can set a zone in the mesh to have the desired value; for example, if you wanted to start that surface with an initial temperature of 300K, then you can do it with setFields. In case you do want to learn more about setFields, you can start here: http://www.openfoam.com/docs/user/damBreak.php Best regards, Bruno |
All times are GMT -4. The time now is 13:04. |