|
[Sponsors] |
Possible to select Cells next to a SPHERE surface? |
![]() |
|
LinkBack | Thread Tools | Search this Thread | Display Modes |
![]() |
![]() |
#1 |
Senior Member
David Long
Join Date: May 2012
Location: Germany
Posts: 104
Rep Power: 14 ![]() |
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. ![]() I know I can use snappyHexMesh to refine cells inside a sphere with a STL mesh file: Code:
limitRegions { sphere3D.stl // O (x, y, z), rad = R { mode inside; levels ((1e10 4)); } } Code:
... for (AllCells) { // D: distance between cell center to O (x, y, z) // H: thickness of refinement (e.g R/10) if ( | D - R | <= H) do Add Cell-ID to CellSet } best regards, David Last edited by keepfit; November 26, 2016 at 14:09. |
|
![]() |
![]() |
![]() |
![]() |
#2 |
Senior Member
Jan
Join Date: Jul 2009
Location: Hamburg
Posts: 145
Rep Power: 20 ![]() |
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 |
|
![]() |
![]() |
![]() |
![]() |
#3 | |
Senior Member
David Long
Join Date: May 2012
Location: Germany
Posts: 104
Rep Power: 14 ![]() |
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 |
||
![]() |
![]() |
![]() |
Tags |
refine mesh, sphere geometry |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Thread Starter | Forum | Replies | Last Post |
[snappyHexMesh] SnappyHexMesh running killed! | Mark JIN | OpenFOAM Meshing & Mesh Conversion | 7 | June 14, 2022 01:37 |
[snappyHexMesh] snappyHexMesh can't create refimenet region | clktp | OpenFOAM Meshing & Mesh Conversion | 3 | February 27, 2022 09:26 |
[snappyHexMesh] sHM layer process keeps getting killed | MBttR | OpenFOAM Meshing & Mesh Conversion | 4 | August 15, 2016 03:21 |
In CFX workbench, which surface, i have to select | senCFX | CFX | 19 | December 19, 2011 01:31 |
CFX4.3 -build analysis form | Chie Min | CFX | 5 | July 12, 2001 23:19 |