|
[Sponsors] |
[blockMesh] How to "attach" a new type of edge to blockMesh |
|
LinkBack | Thread Tools | Search this Thread | Display Modes |
August 29, 2009, 15:21 |
How to "attach" a new type of edge to blockMesh
|
#1 |
New Member
Gerrie
Join Date: Aug 2009
Posts: 7
Rep Power: 17 |
Hi
I want to use elliptic edges instead of circular arcs in blockMesh. So I adapted "arcEdge" appropriately to the new type "ellipticEdge" and compiled it into a library. But I do not know how to make blockMesh "see" the new edge type. Can anybody help, please? :-] Gerrie Thiart |
|
August 30, 2009, 17:43 |
|
#2 |
Senior Member
Steve Hansel
Join Date: Jun 2009
Location: Colorado, USA
Posts: 112
Rep Power: 17 |
Before you do too much work with blockMesh you might want to check out gmsh. It handles circular arcs, ellipses, and splines. I started out with blockmesh, but I like the meshes from gmsh better because they aren't so regular, and it slowly blends cells sizes from one location to another.
Gmsh output can be imported to openfoam using gmshToFoam. |
|
August 31, 2009, 04:55 |
|
#3 |
Senior Member
Hrvoje Jasak
Join Date: Mar 2009
Location: London, England
Posts: 1,907
Rep Power: 33 |
Go into blockMesh and in the curvedEdges directory you will find all edge types, with run-time selection based on curvedEdge class.
Derive your edge from curvedEdge and follow the pattern: that will make your new edge available in blockMesh. Enjoy, Hrv
__________________
Hrvoje Jasak Providing commercial FOAM/OpenFOAM and CFD Consulting: http://wikki.co.uk |
|
August 31, 2009, 06:16 |
|
#4 |
New Member
Gerrie
Join Date: Aug 2009
Posts: 7
Rep Power: 17 |
Thank you Hjasak, but can you be more specific about "following the pattern"?
For instance, I also made an adaptation to the the kEpsilon turbulence model, called it kEpsilonSwirl, compiled into a library and then when I want to use it I include in the relevant RASproperties dictionary the entry RASModel kEpsilonSwirl; and also in the relevant controlDict the entry libs ("libkEpsilonSwirl.so"); What would the corresponding procedure be for using my new library "ellipticEdge.so" with blockMesh? :-] Gerrie |
|
August 31, 2009, 06:38 |
|
#5 |
New Member
Gerrie
Join Date: Aug 2009
Posts: 7
Rep Power: 17 |
Thanks for drawing my attention to gmsh, hansel; I had a look and it surely looks promising (for future efforts). Right now I am very close to making a nice mesh for my application with blockMesh, it is just the final step that is required to get my elliptic edge "attached"!
:-] Gerrie Thiart |
|
August 31, 2009, 06:46 |
|
#6 |
Senior Member
Hrvoje Jasak
Join Date: Mar 2009
Location: London, England
Posts: 1,907
Rep Power: 33 |
Yes, very:
- make sure that your elliptic edge is derived from curvedEdge - add the run-time identification into the header, eg: //- Runtime type information TypeName("ellipse"); - add the run-time selection table hook-up into the .C file, eg: defineTypeNameAndDebug(ellipseEdge, 0); // Add the curvedEdge constructor functions to the hash tables curvedEdge::addIstreamConstructorToTable<ellipseEd ge> addEllipseEdgeIstreamConstructorToTable_; - compile the code, either - linking directly to blockMesh - into a separate library (eg. libmyEdges.so). In this case, make sure that the library is linked to blockMesh, either directly (blockMesh/Make/options) or by using a libs trick in system/controlDict as you described: libs ("libmyEdges.so"); Clear? BTW, the name is Hrvoje Jasak. Enjoy, Hrv
__________________
Hrvoje Jasak Providing commercial FOAM/OpenFOAM and CFD Consulting: http://wikki.co.uk |
|
August 31, 2009, 07:17 |
|
#7 |
New Member
Gerrie
Join Date: Aug 2009
Posts: 7
Rep Power: 17 |
Thanks Hrvoje, please accept my apology for mangling your name.
Yes, I understand better now; my main problem was that I did not realize that blockMesh also reads the system controlDict, I was under the impression that it only reads the blockMeshDict. :-] Gerrie Thiart |
|
April 21, 2014, 17:29 |
|
#8 |
Member
Join Date: Jun 2011
Posts: 80
Rep Power: 15 |
Hi Steve and all! Do you know if is it possible to do a conformal mesh for an ellipse with gmsh?? Otherwise, how do you think I could manage it?
Thanks! Best! |
|
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
how to set periodic boundary conditions | Ganesh | FLUENT | 15 | November 18, 2020 07:09 |
High nut values in random place and time | krzychu111 | OpenFOAM Running, Solving & CFD | 0 | January 9, 2019 09:42 |
Floating point exception error | lpz_michele | OpenFOAM Running, Solving & CFD | 53 | October 19, 2015 03:50 |
rhoReactingFoam error | shenzhou1987 | OpenFOAM Running, Solving & CFD | 3 | January 20, 2015 23:19 |
Pressure instability with rhoSimpleFoam | daniel_mills | OpenFOAM Running, Solving & CFD | 44 | February 17, 2011 18:08 |