CFD Online Discussion Forums

CFD Online Discussion Forums (https://www.cfd-online.com/Forums/)
-   OpenFOAM Meshing & Mesh Conversion (https://www.cfd-online.com/Forums/openfoam-meshing/)
-   -   [snappyHexMesh] Mesh embraces only one of four specified domain sub-volumes (https://www.cfd-online.com/Forums/openfoam-meshing/232119-mesh-embraces-only-one-four-specified-domain-sub-volumes.html)

JayDeeUU November 30, 2020 18:28

Mesh embraces only one of four specified domain sub-volumes
 
1 Attachment(s)
I'm new to OpenFoam, and attempting to simulate buoyancy-driven internal circulation within a vessel whose geometry is that of a round (but flat-bottomed) flask with a neck. I want to impose a steady but non-uniform temperature distribution on the flow boundary, and have inferred (rightly or wrongly) that to accomplish that I have to build the computational mesh in such a manner that distinct boundary patches or regions are recognised.

I've begun by dividing the vessel into four parts, with the divisions occurring by slicing perpendicular to the vertical axis. Each part is azimuthally-symmetric: a lower partial sphere, an upper partial sphere, a lower cylinder and an upper cylinder. I also created two discs, one configured for the bounding bottom plane, the other for the top.

I created these as .stl files in FreeCAD, converted them to ascii file format, and renamed the parts in the first line (e.g. "solid cyl1") and last line ("endsolid cyl1") of each .stl file. I then created the blockMesh, ran "surfaceFeatures" and finally "snappyHexMesh" (within which I set "scale 0.001;" to rescale FreeCAD's [mm] to OpenFoam's expected [m] dimensions).

The problem is that whatever specification I make for "locationInMesh" within snappyHexMeshDict, the outcome is that I see only one of the four parts (a different part according to where I place that "locationInMesh"). I've been following Calum Douglas's www.youtube.com/watch?v=ObsFQUiVi1U to some extent, so have experimented with both a single .stl containing all parts, or, listing the parts individually. I get the same outcome either way. The attached image (from MeshLab) shows some of the "parts" as represented by the .stl files (other parts suppressed for display).

I'm running OpenFoam Version 8 under Ubuntu 20.04. As an aside, I have made low resolution simulations of this flow with my own Fortran code (collocated grid, SIMPLE method) - which however is grossly compromised by its use of a uniform mesh (of cubes) resulting in a stepwise representation of the flask's wall, and inadequate resolution of the near-wall zone.

JayDeeUU December 9, 2020 15:46

The cause of this problem was that each of the individual .stl files was a closed shell. This whatever value was used for "locationInMesh" (set in snappyHexMeshDict), only one of my (wanted) four sub-volumes was meshed.

JayDeeUU December 9, 2020 15:50

The cause of this problem was that each of my four .stl files described a closed shell. Therefore the mesh covered only the subvolume for which the "locationInMesh" setting was an interior point.


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