|
[Sponsors] |
September 25, 2017, 19:44 |
Writing snappyHexMeshDict
|
#1 |
New Member
Jack Hanson
Join Date: Sep 2017
Posts: 5
Rep Power: 9 |
The propeller example in pimpleDyMFoam says I can write the following:
" type triSurfaceMesh; file "innerCylinder.obj"; regions { ascii { name innerCylinder; } } " I write a similar code that reads " type triSurfaceMesh; file "Torpedo_with_Wings.obj"; regions { ascii { name Torpedo_with_Wings; } } " I get the following error "--> FOAM FATAL ERROR: Unknown region name ascii for surface Torpedo_with_Wings Valid region names are 1(patch0) From function Foam::searchableSurfaces::searchableSurfaces(const Foam::IOobject&, const Foam::dictionary&, bool) in file searchableSurfaces/searchableSurfaces/searchableSurfaces.C at line 258. " I'm assuming that snappyHexMesh doesn't really know what ascii means (or any other name I put there) but I've defined it the same way the example has and it' unclear why this error is occurring. Following the directions here https://cfd.direct/openfoam/user-guide/snappyhexmesh/ and https://openfoamwiki.net/index.php/SnappyHexMesh don't give good direction about what I can put after the "{". Would anyone be able to give me direction as to what I'm doing wrong? Last edited by jhanson2; September 25, 2017 at 19:48. Reason: Easier to read this way |
|
September 26, 2017, 04:07 |
|
#2 |
New Member
Join Date: Aug 2017
Location: Milan Area, Italy
Posts: 10
Rep Power: 9 |
Hi,
looks like SHM could not find a region named "ascii" in your .obj file. It also states that there is a single region named "patch0". You could first try substituting the "ascii" entry with "patch0" in your snappyHexMeshDict or edit/regenerate your .obj file with the desired region name. |
|
September 26, 2017, 18:06 |
|
#3 |
New Member
Jack Hanson
Join Date: Sep 2017
Posts: 5
Rep Power: 9 |
@Teosim,
Thank you. That did improve the code. Do you know why switching from "ascii" to "patch0" worked? Unfortunately now I get the error: " --> FOAM FATAL IO ERROR: Could not open "/home/jackhansonjr/OpenFOAM/openfoam5/tutorials/incompressible/pimpleDyMFoam/Torpedo/constant/triSurface/Torpedo_with_Wings.eMesh" file: /home/jackhansonjr/OpenFOAM/openfoam5/tutorials/incompressible/pimpleDyMFoam/Torpedo/system/snappyHexMeshDict.castellatedMeshControls.features from line 94 to line 95. From function void Foam::refinementFeatures::read(const Foam:bjectRegistry&, const Foam::PtrList<Foam::dictionary>&) in file refinementFeatures/refinementFeatures.C at line 98. FOAM exiting " I'm assuming this is because "Torpedo_with_Wings.eMesh" doesn't exist and I'm going to go through the exercise of figuring out how to make that. |
|
September 27, 2017, 06:09 |
|
#4 |
New Member
Join Date: Aug 2017
Location: Milan Area, Italy
Posts: 10
Rep Power: 9 |
Hi,
the entry changed is the name of the region in the .obj file. During prior execution SHM was looking for a region named "ascii" in your .obj file and could not find it. You could check this by opening .obj file with a text editor and looking at the headers. About next error, I guess you are right. For example you can automatically create the .eMesh files by running surfaceFeatureExtract command which reads a surfaceFeatureExtractDict in your case system directory. If I remember correctly you could also create .obj files with edges needed for refinement, place them in constant/triSurface and change the file name and format accordingly in snappyHexMeshDictionary. |
|
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
[Other] refineWallLayer Error | Yuby | OpenFOAM Meshing & Mesh Conversion | 2 | November 11, 2021 12:04 |
decomposePar problem: Cell 0contains face labels out of range | vaina74 | OpenFOAM Pre-Processing | 37 | July 20, 2020 06:38 |
How to Mix AIR and WATER | Elvis1991 | FLUENT | 12 | December 1, 2016 13:28 |
[mesh manipulation] Importing Multiple Meshes | thomasnwalshiii | OpenFOAM Meshing & Mesh Conversion | 18 | December 19, 2015 19:57 |
[snappyHexMesh] crash sHM | H25E | OpenFOAM Meshing & Mesh Conversion | 11 | November 10, 2014 12:27 |