CFD Online Logo CFD Online URL
www.cfd-online.com
[Sponsors]
Home > Forums > Software User Forums > OpenFOAM > OpenFOAM Meshing & Mesh Conversion

[blockMesh] How to "attach" a new type of edge to blockMesh

Register Blogs Community New Posts Updated Threads Search

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   August 29, 2009, 15:21
Default How to "attach" a new type of edge to blockMesh
  #1
New Member
 
Gerrie
Join Date: Aug 2009
Posts: 7
Rep Power: 17
thiart is on a distinguished road
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
thiart is offline   Reply With Quote

Old   August 30, 2009, 17:43
Default
  #2
Senior Member
 
Steve Hansel
Join Date: Jun 2009
Location: Colorado, USA
Posts: 112
Rep Power: 17
hansel is on a distinguished road
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.
hansel is offline   Reply With Quote

Old   August 31, 2009, 04:55
Default
  #3
Senior Member
 
Hrvoje Jasak
Join Date: Mar 2009
Location: London, England
Posts: 1,907
Rep Power: 33
hjasak will become famous soon enough
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
hjasak is offline   Reply With Quote

Old   August 31, 2009, 06:16
Default
  #4
New Member
 
Gerrie
Join Date: Aug 2009
Posts: 7
Rep Power: 17
thiart is on a distinguished road
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


thiart is offline   Reply With Quote

Old   August 31, 2009, 06:38
Default
  #5
New Member
 
Gerrie
Join Date: Aug 2009
Posts: 7
Rep Power: 17
thiart is on a distinguished road
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
thiart is offline   Reply With Quote

Old   August 31, 2009, 06:46
Default
  #6
Senior Member
 
Hrvoje Jasak
Join Date: Mar 2009
Location: London, England
Posts: 1,907
Rep Power: 33
hjasak will become famous soon enough
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
hjasak is offline   Reply With Quote

Old   August 31, 2009, 07:17
Default
  #7
New Member
 
Gerrie
Join Date: Aug 2009
Posts: 7
Rep Power: 17
thiart is on a distinguished road
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
thiart is offline   Reply With Quote

Old   April 21, 2014, 17:29
Default
  #8
Member
 
Join Date: Jun 2011
Posts: 80
Rep Power: 15
maalan is on a distinguished road
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!
maalan is offline   Reply With Quote

Reply


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are On


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


All times are GMT -4. The time now is 03:20.