|
[Sponsors] |
[Other] wedgePlease - simple 2D to axi (wedge) mesh conversion |
|
LinkBack | Thread Tools | Search this Thread | Display Modes |
November 22, 2017, 08:56 |
wedgePlease - simple 2D to axi (wedge) mesh conversion
|
#1 |
Member
Kristjan
Join Date: Apr 2017
Location: Slovenia
Posts: 36
Rep Power: 9 |
Hello!
I'm sharing an alternative to the makeAxialMesh utility. It should be easier to use and understand and should work on OF-3, OF-4 and OF-5. https://github.com/krebeljk/wedgePlease The Y axis is assumed as the axis of rotation for the initial 2D mesh in the XY-plane. There is no dictionary needed. Just run Code:
wedgePlease -angle 5 Two examples are provided:
The handling of the collapsed faces is done in the provided Allmesh scripts (same as with the makeAxialMesh). There is also a simple call to the createPatch utility in the provided examples to remove the patch named axis which is left with no faces after the conversion. Because this is a simlpe makeAxialMesh, expect the same problems and solutions as with makeAxialMesh. Press like if it helps! Let me know if you find any mistakes or if you have improvement suggestions! |
|
April 20, 2020, 07:04 |
|
#2 |
Member
K
Join Date: Jul 2017
Posts: 97
Rep Power: 8 |
I have the following error when I run the command ./Allmesh in caseBM:
Code:
Create time Create mesh for time = 0 // using new solver syntax: p { solver PCG; preconditioner DIC; tolerance 1e-06; relTol 0; } // using new solver syntax: U { solver PBiCG; preconditioner DILU; tolerance 1e-05; relTol 0; } Read dictionary changeDictionaryDict.toWedge with replacements for dictionaries 1(dictionaryReplacement) Reading polyMesh/boundary file to extract patch names Loaded dictionary boundary with entries 4 ( axis wedge_pos wedge_neg walls ) Replacing entries in dictionary dictionaryReplacement Loading dictionary dictionaryReplacement --> FOAM FATAL IO ERROR: cannot find file file: /home/Axisym/wedgePlease-master/caseBM/constant/polyMesh/dictionaryReplacement at line 0. From function regIOobject::readStream() in file db/regIOobject/regIOobjectRead.C at line 72. FOAM exiting Could you help with that ? I ran the wedgePlease successfully. |
|
April 20, 2020, 09:08 |
|
#3 |
Member
Kristjan
Join Date: Apr 2017
Location: Slovenia
Posts: 36
Rep Power: 9 |
I updated the repository. Clone it and see if it works.
Seems the changeDictionaryDict utility was removed at least in OF6 if not earlier. I replaced it with the foamDictionary utility. Also did some cleanup. |
|
April 20, 2020, 10:22 |
|
#4 |
Member
K
Join Date: Jul 2017
Posts: 97
Rep Power: 8 |
I download it but still I have an error (another one). I attach the log file below. Thanks for your help.
Last edited by mkhm; April 20, 2020 at 11:37. |
|
April 20, 2020, 11:17 |
|
#5 |
Member
Kristjan
Join Date: Apr 2017
Location: Slovenia
Posts: 36
Rep Power: 9 |
I think you forgot the attachment.
|
|
April 20, 2020, 12:03 |
|
#6 |
Member
K
Join Date: Jul 2017
Posts: 97
Rep Power: 8 |
||
April 20, 2020, 13:24 |
|
#7 |
Member
Kristjan
Join Date: Apr 2017
Location: Slovenia
Posts: 36
Rep Power: 9 |
Two patches named 'wedge_pos' and 'wedge_neg' need to have the type wedge. The problem is that the switch to type wedge is failing in OF4 for some reason. I'd say the OF4 foamDictionary isnt finding the entry0. I can't get my hands on an OF4 installation right now so I can't solve this for you.
I think you could solve this one by switching to OF7. If you can't do that you can do the step that is failing by manually editing the constant/polyMesh/boundary file. You could also find a way to script this in OF4. I'll get back at you if test this in OF4. |
|
April 20, 2020, 14:10 |
|
#8 |
Member
Kristjan
Join Date: Apr 2017
Location: Slovenia
Posts: 36
Rep Power: 9 |
Ok, you can clone again and git-checkout the of4 branch.
OF4 doesn't use the dictionaryReplacement keyword in dict for the changeDictionary utility. I removed that and it ran fine. |
|
April 21, 2020, 04:33 |
|
#9 | |
Member
K
Join Date: Jul 2017
Posts: 97
Rep Power: 8 |
Quote:
Are you sure that you upedated github with the new version ? I still have the same errors: Code:
--> FOAM Warning : From function entry::getKeyword(keyType&, Istream&) in file db/dictionary/entry/entryIO.C at line 80 Reading constant/polyMesh/boundary found on line 18 the label 4 expected either } or EOF --> FOAM FATAL IO ERROR: keyword entry0 is undefined in dictionary "" or is not a dictionary Valid keywords are 1(FoamFile) file: from line 10 to line 14. From function void setScoped(Foam::dictionary&, const Foam::word&, bool, Foam::entry*) in file foamDictionary.C at line 224. FOAM exiting --> FOAM Warning : From function entry::getKeyword(keyType&, Istream&) in file db/dictionary/entry/entryIO.C at line 80 Reading constant/polyMesh/boundary found on line 18 the label 4 expected either } or EOF --> FOAM FATAL IO ERROR: keyword entry0 is undefined in dictionary "" or is not a dictionary Valid keywords are 1(FoamFile) file: from line 10 to line 14. From function void setScoped(Foam::dictionary&, const Foam::word&, bool, Foam::entry*) in file foamDictionary.C at line 224. FOAM exiting |
||
April 21, 2020, 07:43 |
|
#10 |
Member
Kristjan
Join Date: Apr 2017
Location: Slovenia
Posts: 36
Rep Power: 9 |
You need to go to the of4 branch.
https://github.com/krebeljk/wedgePlease/tree/of4 I only changed the blockMesh case. In case you want to run the fluent mesh case you just make the same change to the system/changeDictionaryDict.toWedge. Remove that dictionaryReplacement dictionary. |
|
April 22, 2020, 05:16 |
|
#11 | |
Member
K
Join Date: Jul 2017
Posts: 97
Rep Power: 8 |
Quote:
Thanks. Now, it works properly. |
||
April 22, 2020, 11:57 |
|
#12 |
Member
K
Join Date: Jul 2017
Posts: 97
Rep Power: 8 |
Dear Kristjan,
The mesh was created successfully. However, I've a question for the case where the axis of symmetry is not the y axis but the x axis. Does that require to change the source code or is there any trick to do it with you your original code ? Thanks for your reply |
|
April 22, 2020, 12:24 |
|
#13 |
Member
K
Join Date: Jul 2017
Posts: 97
Rep Power: 8 |
I modified the source code as follows:
Code:
forAll(points, pointI) { if (points[pointI].component(vector::Z) < midPoint.component(vector::Z)) { points[pointI].replace(vector::Z, -sinus*points[pointI].component(vector::Y));//first use old x as radius points[pointI].replace(vector::Y, cosinus*points[pointI].component(vector::Y));//then change x } else { points[pointI].replace(vector::Z, sinus*points[pointI].component(vector::Y)); points[pointI].replace(vector::Y, cosinus*points[pointI].component(vector::Y)); } } |
|
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
[Other] Wedge patch '*' is not planar | LilumDaru | OpenFOAM Meshing & Mesh Conversion | 6 | January 12, 2021 05:55 |
how to set periodic boundary conditions | Ganesh | FLUENT | 15 | November 18, 2020 06:09 |
Mesh motion with Translation & Rotation | Doginal | CFX | 2 | January 12, 2014 06:21 |
[snappyHexMesh] Layers:problem with curvature | giulio.topazio | OpenFOAM Meshing & Mesh Conversion | 10 | August 22, 2012 09:03 |
[Commercial meshers] Several problems with the mesh conversion utility when converting the meshes from Gridgen | su_junwei | OpenFOAM Meshing & Mesh Conversion | 2 | July 26, 2008 23:58 |