|
[Sponsors] |
[snappyHexMesh] Refinement regions with complex geometry |
|
LinkBack | Thread Tools | Search this Thread | Display Modes |
July 7, 2016, 04:16 |
Refinement regions with complex geometry
|
#1 |
Member
Federica Biano
Join Date: Feb 2016
Location: Genova, Italy
Posts: 39
Rep Power: 10 |
Hi everyone!
I'm trying to create a mesh with snappyHexMesh in OF 3.0.1 and I need to insert a refinement searchable box rotated around z-axis. So I used searchableSurfaceCollection in this way Code:
/*--------------------------------*- C++ -*----------------------------------*\ | ========= | | | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox | | \\ / O peration | Version: 2.3.0 | | \\ / A nd | Web: www.OpenFOAM.org | | \\/ M anipulation | | \*---------------------------------------------------------------------------*/ FoamFile { version 2.0; format ascii; class dictionary; object snappyHexMeshDict; } // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // // Which of the steps to run castellatedMesh true; snap false; addLayers false; // Geometry. Definition of all surfaces. All surfaces are of class // searchableSurface. // Surfaces are used // - to specify refinement for any mesh cell intersecting it // - to specify refinement for any mesh cell inside/outside/near // - to 'snap' the mesh boundary to the surface geometry { scafo.stl { type triSurfaceMesh; name scafo; patchInfo { type wall; } } refinementBox1 { type searchableBox; min (-0.4 0 -2.4); max (27.2 3.8 4.8); } refinementBoxI1 { type searchableBox; min (0 0 -0.4); max (60 5 0.4); } refinementBoxS { type searchableBox; min (-10 0 -1.5); max (1 5 0.5); } refinementBoxM { type searchableSurfaceCollection; mergeSubRegions true; refinementBoxM { surface box; scale (80 24 2); transform { type cartesian; origin (0 0 0); e1 (0.9847835588179368 -0.17378533390904768 0); e3 (0 0 1); } } } }; Code:
--> FOAM FATAL IO ERROR: keyword coordinateSystem is undefined in dictionary "/home/jolly/OpenFOAM/Stage_Federica/AZ95rph/AZ95rph_snappyHexMesh/AZ95rph_snappyHexMesh_Fisso_26kn_1/system/snappyHexMeshDict.geometry.refinementBoxM.refinementBoxM.transform" file: /home/jolly/OpenFOAM/Stage_Federica/AZ95rph/AZ95rph_snappyHexMesh/AZ95rph_snappyHexMesh_Fisso_26kn_1/system/snappyHexMeshDict.geometry.refinementBoxM.refinementBoxM.transform from line 75 to line 77. From function dictionary::subDict(const word& keyword) const in file db/dictionary/dictionary.C at line 648. FOAM exiting Can you help me please? Best regards Federica |
|
July 7, 2016, 05:03 |
|
#2 |
Member
Join Date: Sep 2014
Location: Germany
Posts: 88
Rep Power: 12 |
Hi,
a good way to start are the tutorials. Use something like this: find $FOAM_TUTORIALS -name snappyHexMeshDict | xargs grep coordinateSystem to search for keywords. There you will find an example: tutorials/heatTransfer/buoyantBoussinesqSimpleFoam/iglooWithFridges/system/snappyHexMeshDict |
|
July 7, 2016, 05:07 |
|
#3 |
Member
Federica Biano
Join Date: Feb 2016
Location: Genova, Italy
Posts: 39
Rep Power: 10 |
Hi TobM!
Thank you very much for your quickly reply, I've just found that tutorial and it is exactly what I need. Thanks for your help! Best regards Federica |
|
July 7, 2016, 05:37 |
|
#4 |
Member
Federica Biano
Join Date: Feb 2016
Location: Genova, Italy
Posts: 39
Rep Power: 10 |
I have another question about it. I use the subdictionary found into the tutorial that you have mentioned before and it worked, the box is generated, but when snappy starts the region-wise refinement, it returns me the following error
Code:
--> FOAM FATAL ERROR: Shell refinementBoxM does not support testing for inside Probably it is not closed. From function shellSurfaces::shellSurfaces(const searchableSurfaces&, const PtrList<dictionary>&) in file autoHexMesh/shellSurfaces/shellSurfaces.C at line 134. FOAM exiting Do you have any suggestion? |
|
July 7, 2016, 05:49 |
|
#5 |
Member
Join Date: Sep 2014
Location: Germany
Posts: 88
Rep Power: 12 |
Just an idea:
Are your boxes inside your geometry, or are they overlapping? Does sHM run without this refinement zone? I haven't worked with this functionality, so I can't help you any futher. |
|
July 7, 2016, 06:00 |
|
#6 |
Member
Federica Biano
Join Date: Feb 2016
Location: Genova, Italy
Posts: 39
Rep Power: 10 |
Actually the box has one vertex outside the mesh, maybe that is the problem, I didn't notice it because of the rotation. Also it overlaps with the other refinement boxes.
Without that box sHM runs without errors. I'll try to find a solution. Maybe an stl file that recreate the same geometry of the rotated box could be a way. what do you think? Thanks a lot for your help. |
|
July 7, 2016, 06:03 |
|
#7 |
Member
Join Date: Sep 2014
Location: Germany
Posts: 88
Rep Power: 12 |
The overlapping with other refinement boxes shouldn't be a problem.
In a first try, make the box smaller and see if it works. |
|
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
[snappyHexMesh] FOAM Warnings leading to no geometry, yet OpenFOAM says meshing finished w/o error | edomalley1 | OpenFOAM Meshing & Mesh Conversion | 2 | October 28, 2024 03:21 |
[snappyHexMesh] No satisfying result with feature edge refinement | Krapf | OpenFOAM Meshing & Mesh Conversion | 5 | December 13, 2019 07:59 |
[snappyHexMesh] snappyHexMesh does not create any mesh except one for the reference cell | Arman_N | OpenFOAM Meshing & Mesh Conversion | 1 | May 20, 2019 18:16 |
[snappyHexMesh] addLayers in limited regions of geometry | Chia | OpenFOAM Meshing & Mesh Conversion | 2 | January 10, 2013 05:33 |
[snappyHexMesh] snappyHexMesh aborting | Tobi | OpenFOAM Meshing & Mesh Conversion | 0 | November 10, 2010 04:23 |