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

BlockMesh grading calculator

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

Like Tree8Likes

Reply
 
LinkBack Thread Tools Display Modes
Old   April 12, 2005, 07:55
Default Hi everybody, i've written
  #1
Senior Member
 
Markus Hartinger
Join Date: Mar 2009
Posts: 102
Rep Power: 8
hartinger is on a distinguished road
Hi everybody,

i've written a calculator for the grading in the blockMesh format some time ago. It relates length, number of cells, total expansion ration, cell-to-cell expansion ratio, start cell size and end cell size.
Given the length and any two of the other, the remaining values are calculated.

It's a little programm, but I found it myself useful generating meshes with blockMesh.
If someone improves it, let me know

MeshSpace.tar.gz

regards
Markus
eac, shadowfax, m.goudarzi and 1 others like this.
hartinger is offline   Reply With Quote

Old   April 12, 2005, 09:36
Default Actually, the grading factor i
  #2
Senior Member
 
Hrvoje Jasak
Join Date: Mar 2009
Location: London, England
Posts: 1,758
Rep Power: 21
hjasak will become famous soon enough
Actually, the grading factor in blockMesh is defined as the ratio of the last to first cell size, which is much better behaved that defining the number of cells and the geometric expansion ratio. I suppose we have both done the same thing :-)

Hrv
__________________
Hrvoje Jasak
Providing commercial FOAM/OpenFOAM and CFD Consulting: http://wikki.co.uk
hjasak is offline   Reply With Quote

Old   December 19, 2006, 01:09
Default Hi Markus, Thanks for the u
  #3
Senior Member
 
Srinath Madhavan (a.k.a pUl|)
Join Date: Mar 2009
Location: Edmonton, AB, Canada
Posts: 698
Rep Power: 12
msrinath80 is on a distinguished road
Hi Markus,

Thanks for the utility. I found it very useful; esp. to find out the number of cells when one knows the start and end cell sizes in addition to the length.

I had to edit the Makefile to remove the reference to the bin subdirectory which does not exist. A sample of the utility usage is shown below for those who need to know how to use it:

madhavan@karmayug:~/MeshSpace$ ./MeshSpace ds de 0.58 0.000625 0.003125

Meshspace results by Markus.Hartinger@imperial.ac.uk :
Length L : 0.58
Number of cells n : 373
Total expansion ratio r : 5
Cell-to-cell expansion k : 1.00434
Start cell size ds: 0.000625305
End cell size de: 0.00312652

madhavan@karmayug:~/MeshSpace$
lav likes this.
msrinath80 is offline   Reply With Quote

Old   February 6, 2007, 05:08
Default Hi Markus Would you please
  #4
New Member
 
Armin Hosseinian
Join Date: Mar 2009
Location: Perth, Western Australia, Australia
Posts: 17
Rep Power: 8
armin_h is on a distinguished road
Hi Markus

Would you please tel me how your calcualtor works?
i Couldent open that.

Cheers
armin_h is offline   Reply With Quote

Old   August 26, 2008, 18:29
Default I get this error with gcc 4.3.
  #5
Senior Member
 
Srinath Madhavan (a.k.a pUl|)
Join Date: Mar 2009
Location: Edmonton, AB, Canada
Posts: 698
Rep Power: 12
msrinath80 is on a distinguished road
I get this error with gcc 4.3.1 when running make.

Any idea what is wrong?

g++ -g -c MeshSpace.cpp
MeshSpace.cpp: In function 'int main(int, char**)':
MeshSpace.cpp:35: error: 'exit' was not declared in this scope
MeshSpace.cpp:38: error: 'atof' was not declared in this scope
make: *** [MeshSpace.o] Error 1
msrinath80 is offline   Reply With Quote

Old   September 1, 2008, 16:25
Default Problem solved. It was just a
  #6
Senior Member
 
Srinath Madhavan (a.k.a pUl|)
Join Date: Mar 2009
Location: Edmonton, AB, Canada
Posts: 698
Rep Power: 12
msrinath80 is on a distinguished road
Problem solved. It was just a question of adding:

#include <cstdlib>

to MeshSpace.cpp and TEdgeSpace.cpp
msrinath80 is offline   Reply With Quote

Old   July 21, 2010, 09:36
Default
  #7
Member
 
83_Ale_83's Avatar
 
Alessandro
Join Date: Nov 2009
Posts: 67
Rep Power: 7
83_Ale_83 is on a distinguished road
Sorry, which is the problem??

5:45 ale@alien:~/MeshSpace$ make
g++ -g -c MeshSpace.cpp
g++ -g -c TEdgeSpace.cpp
g++ -g -o bin/MeshSpace MeshSpace.o TEdgeSpace.o
/usr/bin/ld: cannot open output file bin/MeshSpace: No such file or directory
collect2: ld returned 1 exit status
make: *** [MeshSpace] Errore 1
__________________

83_Ale_83 is offline   Reply With Quote

Old   July 22, 2010, 07:37
Default
  #8
Senior Member
 
David Boger
Join Date: Mar 2009
Location: Penn State Applied Research Laboratory
Posts: 146
Rep Power: 8
boger is on a distinguished road
Quote:
Originally Posted by 83_Ale_83 View Post
Sorry, which is the problem??
If you read back a few posts, Srinath has already given the answer to this problem (and the next one you'll encounter). Delete bin/ from the Makefile, and include <cstdlib> in both .cpp files.
__________________
David A. Boger
boger is offline   Reply With Quote

Old   July 22, 2010, 08:04
Default
  #9
Member
 
83_Ale_83's Avatar
 
Alessandro
Join Date: Nov 2009
Posts: 67
Rep Power: 7
83_Ale_83 is on a distinguished road
Quote:
Originally Posted by dab143psuedu View Post
If you read back a few posts, Srinath has already given the answer to this problem (and the next one you'll encounter). Delete bin/ from the Makefile, and include <cstdlib> in both .cpp files.
What a useless question I have done, I have missed the post
Thank you
__________________

83_Ale_83 is offline   Reply With Quote

Old   September 4, 2010, 17:40
Default Stupid question..
  #10
Senior Member
 
Nilesh Rane
Join Date: Apr 2010
Posts: 122
Rep Power: 7
nileshjrane is on a distinguished road
How to give the arguments to the program??? I didnt get it..

Sorry for this stupid question.
__________________
Imagination is more important than knowledge..
nileshjrane is offline   Reply With Quote

Old   September 6, 2010, 03:19
Default
  #11
Member
 
83_Ale_83's Avatar
 
Alessandro
Join Date: Nov 2009
Posts: 67
Rep Power: 7
83_Ale_83 is on a distinguished road
Quote:
Originally Posted by nileshjrane View Post
How to give the arguments to the program??? I didnt get it..

Sorry for this stupid question.

Look at the third post; it's just an example
__________________

83_Ale_83 is offline   Reply With Quote

Old   September 6, 2010, 05:44
Default
  #12
Senior Member
 
Nilesh Rane
Join Date: Apr 2010
Posts: 122
Rep Power: 7
nileshjrane is on a distinguished road
Oh yes...i just overlooked it..i was trying meshspace value ds value de value...etc
__________________
Imagination is more important than knowledge..
nileshjrane is offline   Reply With Quote

Old   December 22, 2010, 06:02
Default Broken Link?
  #13
Member
 
P.A.
Join Date: Mar 2009
Location: Germany
Posts: 47
Rep Power: 8
blaise is on a distinguished road
Hi,

I cannot download the .tar.gz file. All I get is a short html file saying that the file I was looking for was not found on the server. This is saved with a .unk file extension. Using wget http://... brings the same result.

Can anybody shed some light on this? Or send me the file via email to pascal \at\ pascal-anschau \dot\ de?

Thanks in advance!

Cheers, Pascal.
blaise is offline   Reply With Quote

Old   May 15, 2011, 12:14
Default
  #14
Member
 
Join Date: May 2010
Posts: 44
Rep Power: 7
la7low is on a distinguished road
Quote:
Originally Posted by armin_h View Post
Hi Markus

Would you please tel me how your calcualtor works?
i Couldent open that.

Cheers
I think it solves the equations I posted there: edge sizing control--Calculate cell-to-cell expansion rate from bias factor

Just rename the downloaded file to "MeshSpace.tar.gz", extract it, then it should work.
la7low is offline   Reply With Quote

Old   June 16, 2011, 13:51
Default
  #15
Member
 
Alex
Join Date: Jun 2010
Location: Planet Earth
Posts: 43
Rep Power: 7
bigbang is on a distinguished road
Quote:
Originally Posted by boger View Post
If you read back a few posts, Srinath has already given the answer to this problem (and the next one you'll encounter). Delete bin/ from the Makefile, and include <cstdlib> in both .cpp files.
Thanks. This tools is just what I was looking for to mesh my boundary layer! Good show.
bigbang is offline   Reply With Quote

Old   August 17, 2011, 12:31
Default
  #16
New Member
 
Pam
Join Date: Feb 2011
Posts: 15
Rep Power: 6
prameelar is on a distinguished road
Hi Srinath,

I am new to OpenFoam.
I need to create a mesh for channel with non linear mesh.
My node spacing is 12% increment for first 20 nodes near wall and 1.5 times viscous length scale and then 8% near the cwnter line and same on the otherside of the center line too..
I am confused how do I can take expansin ration?

Thanks in advance,

Prameela.
__________________
Pam
prameelar is offline   Reply With Quote

Old   August 17, 2011, 13:27
Default
  #17
Member
 
Alex
Join Date: Jun 2010
Location: Planet Earth
Posts: 43
Rep Power: 7
bigbang is on a distinguished road
Hi Pam,

I would suggest first learning how to use blockMesh utility with openFOAM. You will need to separate the mesh into separate blocks for each grading.

First do a couple of the tutorials here to learn

Then use hartinger's tool to specify the grading based on your requirement.

Good luck.
bigbang is offline   Reply With Quote

Old   February 27, 2012, 05:01
Default Blockmesh
  #18
hhh
Senior Member
 
kumar
Join Date: Nov 2011
Posts: 115
Rep Power: 5
hhh is on a distinguished road
Dear Foamers,
i have xyz coordinates(that is model have 33 coumns and 225 rows in .csv file format) how i import and create blockmesh andbody have idea please let me know.

Thanks for the answer in advance!
hhh is offline   Reply With Quote

Old   April 8, 2012, 09:32
Default
  #19
New Member
 
Kirill Cherniy
Join Date: Apr 2012
Posts: 3
Rep Power: 5
Slackware_user is on a distinguished road
first: are these coordinates of block vertices?
second: if so u can easyli write converter that will pull vertices of that file and create blocks, faces and edges.

if not that is not so easy.

Hint: remember that spline edges use mirror of last point for approxymation of y' in last point.
Slackware_user is offline   Reply With Quote

Old   April 9, 2012, 02:10
Default blockmesh-flapping wing
  #20
hhh
Senior Member
 
kumar
Join Date: Nov 2011
Posts: 115
Rep Power: 5
hhh is on a distinguished road
Dear Slackware_user,
thanks for your reply

first: these are the 3Dmodel coordinates generated in matlab,i have xyz coordinates of that model.for example generally people goes for cad model, same thing of that cad model but thing is i have coordinates, in matlab(that is model have 33 coumns and 225 rows xyz coordinates in .csv file format)how i can go for blockmesh.


Thanks for the answer in advance!
hhh 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
gambit flexible grading eselin Main CFD Forum 0 January 17, 2009 15:42
Grading other than simple and edge titio OpenFOAM Native Meshers: blockMesh 0 March 5, 2008 12:50
define grading scheme John Deas FLUENT 0 February 6, 2008 11:18
Mesh grading problem Y FLUENT 3 March 2, 2005 06:47
Calculator tutorial Mahesh Main CFD Forum 1 March 1, 2005 11:45


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