|
[Sponsors] |
[Other] Structured quadrangular 3D mesh rounded cube |
|
LinkBack | Thread Tools | Search this Thread | Display Modes |
July 5, 2018, 09:24 |
Structured quadrangular 3D mesh rounded cube
|
#1 |
Member
Cristina Hernandez
Join Date: May 2018
Posts: 35
Rep Power: 7 |
Hi,
I want to use OpenFOAM to simulate the flow around a cube with rounded edges and calculate de drag coefficient. An example of the geometry is attached as a .stl file. I am trying to create a quadrangular structured mesh for the whole domain, with a finer mesh around the cube to accurately model the pressure (ideally, the size of the cells around the cube should be 1/20 the characteristic length and get bigger as we move away from it). Do you have any suggestions on which meshing utility could be easily used for this? Any help would be welcome. Cristina |
|
July 5, 2018, 09:38 |
|
#2 | |
Member
Cristina Hernandez
Join Date: May 2018
Posts: 35
Rep Power: 7 |
Quote:
|
||
July 5, 2018, 10:38 |
|
#3 |
Member
Cristina Hernandez
Join Date: May 2018
Posts: 35
Rep Power: 7 |
So far, I have explored the following:
First I tried gmsh, but I could only obtain a triangular unstructured mesh (Transfinite Volume didn't work). Then, I changed to cfmesh OpenFOAM utility. I imported my geometry generated from gmesh, extracted the surface as a .stl file and generated the mesh with cfmesh command "cartesianMesh". To obtain the mesh I want, I have tried different strategies (I am posting my meshDict): 1) anisotropicSources: defining a box that contains my cube maxCellSize 1; x_cube 1.5; y_cube 1.5; z_cube 1.5; anisotropicSources { box { type box; centre (20.75 17.5 7.5); //centre of cube lengthX 5*$x_cube; //5 times characteristic length lengthY 5*$y_cube; //5 times characteristic length lengthZ 5*$z_cube; //5 times characteristic length //scaling factors in each direction scaleX 0.05*$x_cube; scaleY 0.05*$y_cube; scaleZ 0.05*$z_cube; } } But I do not know how to change the size of the cells within the box, so that there is a gradient and cells become bigger as I move away from the cube. 2. boundaryLayer: treat the cube wall as a boundary layer and use local refinement to set the number of cells in the first layer maxCellSize 1; x_cube 1.5; y_cube 1.5; z_cube 1.5; localRefinement { cube { cellSize 0.05*$x_cube; //characteristic length/20 } boundaryLayers { //global number of boundaryLayers, set to 0 so that the rest of the boundaries (walls of the domain) are not meshed nLayers 0; //local settings for individual patches (cube) patchBoundaryLayers { boundaryCellSize 0.1; "cube" { nLayers 5; thicknessRatio 1; maxFirstLayerThickness 1; //characteristic length of cube/20 allowDiscontinuity 0; } } } What I would like to obtain is a refined mesh around a region at a distance equal to 5 times the characteristic length from the cube. Could anyone help me obtain this adjusting my setting in meshDict for cfmesh? I am also open to other alternatives. I can provide you any file you need. Thanks in advance, Cristina |
|
July 17, 2018, 14:12 |
|
#4 |
Member
Luis Eduardo
Join Date: Jan 2011
Posts: 85
Rep Power: 15 |
Hi Cristina,
Have you tried blockMesh and/or snappyHexMesh? The round edges will be a little difficult to treat, but it is possible to do it (I didn't open your geometry file to check it). |
|
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
[snappyHexMesh] Error defining boundary layer around cube snappyHexMesh | crizpi21 | OpenFOAM Meshing & Mesh Conversion | 5 | October 16, 2021 10:56 |
[ANSYS Meshing] Structured Mesh inside an egg-like geometry | BrunoCFD | ANSYS Meshing & Geometry | 1 | October 31, 2018 14:48 |
Gambit problems | Althea | FLUENT | 22 | January 4, 2017 03:19 |
[Gmsh] 2D Mesh Generation Tutorial for GMSH | aeroslacker | OpenFOAM Meshing & Mesh Conversion | 12 | January 19, 2012 03:52 |
unstructured vs. structured grids | Frank Muldoon | Main CFD Forum | 1 | January 5, 1999 10:09 |