Possible to select Cells next to a SPHERE surface?
Hi Foamers,
Is it possible to use script over OpenFOAM to select specific cells to generate a new CellSet for use of mesh refinment? Since the topoSet tool does not have this type of source. As shown below, I want to refine the mesh around a sphere surface given the center O (x, y, z) and radius R. Note that inside this "sphere", cells do exist, i.e. the entire fluid domain is filled with uniform mesh via blockMesh. The reason why I want to do this, is because I want to test the Fictitous Domain Method (or Immersed boundary method) to calculate the drag over a solid 3D sphere. Inside this "sphere", U is treated as the velocity of solid sphere (Zero in this case) over time via rigid constrain. https://65.media.tumblr.com/00615987...ssaho1_540.png I know I can use snappyHexMesh to refine cells inside a sphere with a STL mesh file: Code:
limitRegions Code:
... best regards, David |
Hi David,
you should have a look at topoSet. E.g. you can create to cellSets with cell centres within a sphere with different radii. Then subtract one from the other. There are also other possibilities with topoSet, e.g. selection based on cell centres nearest to a list of coordinates or selection based on stl-surface. See a full list of possibilites in Code:
$FOAM_UTILITIES/mesh/manipulation/topoSet/topoSetDict Jan |
Quote:
By the way, I thougght about to refine this specific region with a tedious but straight-forward method: i.e. create two closed mesh, which cover the cells between sphere-1 and sphere-2.Howvere, it seems that the "limitRegions" in sHM still does not work for both 3.0.x and 4.x. Maybe this feature is still not included? cheers, David |
All times are GMT -4. The time now is 02:07. |