|
[Sponsors] |
September 27, 2014, 07:05 |
How to mesh inside a sphere?
|
#1 |
Senior Member
anonymous
Join Date: Aug 2014
Posts: 205
Rep Power: 12 |
Hi,
Anyone knows how to create a spherical mesh of the inside of a sphere? Thank you |
|
October 20, 2014, 08:36 |
|
#2 |
Senior Member
Join Date: Mar 2010
Location: Germany
Posts: 154
Rep Power: 16 |
Hi,
have a look at snappyHexMesh (www.openfoam.org/docs/user/snappyHexMesh.php). There are also some nice explanations at https://sites.google.com/site/snappywiki/. Both the 'cube case' and the 'cylinder case' can be adapted for a sphere. Cutter |
|
October 20, 2014, 08:54 |
|
#3 |
Senior Member
Join Date: Mar 2010
Location: Germany
Posts: 154
Rep Power: 16 |
I just played with cfMesh (one of its tools called 'cartesianMesh'). It also did a really good job (see attached image!). Depending on your requirements on the final mesh, there's also a tool called 'tetMesh' for the creation of tetrahedral meshes.
See http://www.c-fields.com/solutions/products/meshing for more infos! Have fun! Cutter |
|
October 20, 2014, 13:47 |
|
#4 | |
Senior Member
|
Hi,
Quote:
Here's an example of GEO file to generate fully hexagonal mesh of the sphere: Code:
l = 1; r1 = 2; r2 = 0.5; n = 20; Point(1) = {0,0,0,l}; Point(102) = {r2,r2,-r2,l}; Point(103) = {-r2,r2,-r2,l}; Point(104) = {-r2,-r2,-r2,l}; Point(105) = {r2,-r2,-r2,l}; Circle(29) = {103,1,102}; Circle(30) = {102,1,105}; Circle(31) = {105,1,104}; Circle(32) = {104,1,103}; Line Loop(33) = {29,30,31,32}; Ruled Surface(34) = {33}; Rotate { {1,0,0},{0,0,0}, Pi/2 } { Duplicata{ Surface{34}; } } Rotate { {1,0,0},{0,0,0}, Pi } { Duplicata{ Surface{34}; } } Rotate { {1,0,0},{0,0,0}, 3*Pi/2 } { Duplicata{ Surface{34}; } } Rotate { {0,1,0},{0,0,0}, Pi/2 } { Duplicata { Surface{34}; } } Rotate { {0,1,0},{0,0,0}, -Pi/2 } { Duplicata { Surface{34}; } } Surface Loop(101) = {35, 40, 45, 34, 51, 50}; Volume(102) = {101}; Transfinite Line {42, 44, 30, 32, 36, 41, 29, 31, 39, 49, 37, 47} = n; Transfinite Surface "*"; Recombine Surface "*"; Transfinite Volume "*"; Recombine Volume "*"; Physical Surface(100) = {34,35,40,45,50,51}; Physical Volume(103) = {102}; |
||
October 20, 2014, 15:53 |
|
#5 |
Senior Member
Join Date: Mar 2010
Location: Germany
Posts: 154
Rep Power: 16 |
Hi Alexey,
thanks for you additions. I haven't used Gmsh for a couple of years now. The last time I used it, the UI was quite unconventionally and somewhat intimidating. After quick and steep learning curve regarding the UI and experimenting with its scripting language I got pretty good meshes though. I liked it, but it didn't work within our toolchain (well, all the other OF tools need custom scripts and proprietary UIs too...). I will definitely have a look at it again! Creating the sphere geometry (STL) with Salome and meshing the whole thing with cfMesh based on an existing tutorial case took me just a few minutes (less than ten!). Creating the mesh using the Gmsh script from Alexey shouldn't take any longer. @SSSS: After all you have to find a workflow that works for your special use case (depending on mesh requirements, input files etc.). Now you've got already three of them, there are probably a dozen more ;-) Cutter |
|
October 27, 2014, 09:36 |
|
#6 |
Senior Member
anonymous
Join Date: Aug 2014
Posts: 205
Rep Power: 12 |
Thank you all of you guys for your help, I finally managed to mesh a sphere, and an sphere section using snappyHexMesh and blockMesh to cut the geometry. The idea was borrowed from iglooTutorial in buoyanBoussinesqSimpleFoam folder
I will have a look at other posibilities mentioned here, thank you all you're awesome. |
|
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
[snappyHexMesh] Multi Region Mesh of a car filter | Zephiro88 | OpenFOAM Meshing & Mesh Conversion | 3 | September 11, 2019 19:34 |
[snappyHexMesh] problems generating clean mesh | Christian_tt | OpenFOAM Meshing & Mesh Conversion | 2 | June 20, 2019 05:39 |
[Gmsh] 2D Mesh Generation Tutorial for GMSH | aeroslacker | OpenFOAM Meshing & Mesh Conversion | 12 | January 19, 2012 03:52 |
Convergence moving mesh | lr103476 | OpenFOAM Running, Solving & CFD | 30 | November 19, 2007 14:09 |
Icemcfd 11: Loss of mesh from surface mesh option? | Joe | CFX | 2 | March 26, 2007 18:10 |