CFD Online Logo CFD Online URL
www.cfd-online.com
[Sponsors]
Home > Forums > OpenFOAM Native Meshers: blockMesh

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

Register Blogs Members List Search Today's Posts Mark Forums Read

Reply
 
LinkBack Thread Tools Display Modes
Old   August 29, 2009, 14:21
Default How to "attach" a new type of edge to blockMesh
  #1
New Member
 
Gerrie
Join Date: Aug 2009
Posts: 7
Rep Power: 7
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, 16:43
Default
  #2
Senior Member
 
Steve Hansel
Join Date: Jun 2009
Location: Colorado, USA
Posts: 112
Rep Power: 8
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, 03:55
Default
  #3
Senior Member
 
Hrvoje Jasak
Join Date: Mar 2009
Location: London, England
Posts: 1,758
Rep Power: 21
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, 05:16
Default
  #4
New Member
 
Gerrie
Join Date: Aug 2009
Posts: 7
Rep Power: 7
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, 05:38
Default
  #5
New Member
 
Gerrie
Join Date: Aug 2009
Posts: 7
Rep Power: 7
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, 05:46
Default
  #6
Senior Member
 
Hrvoje Jasak
Join Date: Mar 2009
Location: London, England
Posts: 1,758
Rep Power: 21
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, 06:17
Default
  #7
New Member
 
Gerrie
Join Date: Aug 2009
Posts: 7
Rep Power: 7
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, 16:29
Default
  #8
Member
 
Join Date: Jun 2011
Posts: 64
Rep Power: 6
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

Thread Tools
Display Modes

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 On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Pressure instability with rhoSimpleFoam daniel_mills OpenFOAM Running, Solving & CFD 44 February 17, 2011 18:08
LiftDrag tool nuovodna OpenFOAM Running, Solving & CFD 45 September 2, 2009 17:56
Problem with compile the setParabolicInlet ivanyao OpenFOAM Running, Solving & CFD 6 September 5, 2008 20:50
fluent add additional zones for the mesh file SSL FLUENT 2 January 26, 2008 12:55
Trimmed cell and embedded refinement mesh conversion issues michele OpenFOAM Other Meshers: ICEM, Star, Ansys, Pointwise, GridPro, Ansa, ... 2 July 15, 2005 04:15


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