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

[blockMesh] blockMesh with double grading.

Register Blogs Community New Posts Updated Threads Search

Like Tree68Likes

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   December 6, 2009, 17:18
Default blockMesh with double grading.
  #1
New Member
 
Shui Pei
Join Date: Mar 2009
Posts: 27
Rep Power: 17
spwater is on a distinguished road
about edge grading , with blockMesh, currently I can only use simplegrading and cannot generate edge like this

. . . ....... . . .


So I modified it, now, using "-"to represent double grading,
e.g. simpleGrading (1 -2 1) in blockMeshDict,means the mesh in central is 2 times larger than those in side.

Hope it helpful
Attached Files
File Type: zip blockMeshDoubleGrading.zip (60.9 KB, 739 views)
novyno, nisha, SirWombat and 16 others like this.
spwater is offline   Reply With Quote

Old   December 7, 2009, 03:35
Default
  #2
Senior Member
 
Mark Olesen
Join Date: Mar 2009
Location: https://olesenm.github.io/
Posts: 1,715
Rep Power: 40
olesen has a spectacular aura aboutolesen has a spectacular aura about
Quote:
Originally Posted by spwater View Post
So I modified it, now, using "-"to represent double grading,
e.g. simpleGrading (1 -2 1) in blockMeshDict,means the mesh in central is 2 times larger than those in side.
Did you really change all of the files to get this working?
olesen is offline   Reply With Quote

Old   December 7, 2009, 04:09
Default
  #3
New Member
 
Shui Pei
Join Date: Mar 2009
Posts: 27
Rep Power: 17
spwater is on a distinguished road
Quote:
Originally Posted by olesen View Post
Did you really change all of the files to get this working?
No, just two file.
/setEdge.C
/curvedEdges/lineDivide.C

Pei
spwater is offline   Reply With Quote

Old   March 12, 2010, 05:51
Default
  #4
New Member
 
Markus Trenker
Join Date: Feb 2010
Location: Vienna, Austria
Posts: 11
Rep Power: 16
maksen is on a distinguished road
Hi Pei,

good work!

i was searching the forum for something like that...

i modified the code according to your suggestions and be very happy with the result

cheers
Markus
maksen is offline   Reply With Quote

Old   April 14, 2010, 09:15
Default
  #5
New Member
 
Adrian Stalder
Join Date: Mar 2010
Posts: 10
Rep Power: 16
Adrian is on a distinguished road
Great tool! Thanks for sharing!
Adrian is offline   Reply With Quote

Old   June 23, 2011, 23:08
Default
  #6
Senior Member
 
Join Date: Nov 2009
Location: Michigan
Posts: 135
Rep Power: 17
doubtsincfd is on a distinguished road
I compiled the files using wmake in the /application/utilites...../blockMesh
But when I run blockMesh with negative value in the grading area (1 -2 1),
I am getting some error:

Creating blockCorners

Creating curved edges

Creating blocks
#0 Foam::error:rintStack(Foam::Ostream&) in "/opt/OpenFOAM/OpenFOAM-1.7.1/lib/linuxGccDPOpt/libOpenFOAM.so"
#1 Foam::sigFpe::sigFpeHandler(int) in "/opt/OpenFOAM/OpenFOAM-1.7.1/lib/linuxGccDPOpt/libOpenFOAM.so"
#2 Uninterpreted:
#3 in "/lib/tls/i686/cmov/libm.so.6"
#4 pow in "/lib/tls/i686/cmov/libm.so.6"
#5
in "/opt/OpenFOAM/OpenFOAM-1.7.1/applications/bin/linuxGccDPOpt/blockMesh"
#6
in "/opt/OpenFOAM/OpenFOAM-1.7.1/applications/bin/linuxGccDPOpt/blockMesh"
#7
in "/opt/OpenFOAM/OpenFOAM-1.7.1/applications/bin/linuxGccDPOpt/blockMesh"
#8
in "/opt/OpenFOAM/OpenFOAM-1.7.1/applications/bin/linuxGccDPOpt/blockMesh"
#9
in "/opt/OpenFOAM/OpenFOAM-1.7.1/applications/bin/linuxGccDPOpt/blockMesh"
#10
in "/opt/OpenFOAM/OpenFOAM-1.7.1/applications/bin/linuxGccDPOpt/blockMesh"
#11
in "/opt/OpenFOAM/OpenFOAM-1.7.1/applications/bin/linuxGccDPOpt/blockMesh"
#12 __libc_start_main in "/lib/tls/i686/cmov/libc.so.6"
#13
in "/opt/OpenFOAM/OpenFOAM-1.7.1/applications/bin/linuxGccDPOpt/blockMesh"
Floating point exception

the "pow" function is not being recognized. I am using OF 1.7.
Thank you.
doubtsincfd is offline   Reply With Quote

Old   June 24, 2011, 03:24
Default
  #7
Senior Member
 
Bernhard
Join Date: Sep 2009
Location: Delft
Posts: 790
Rep Power: 22
Bernhard is on a distinguished road
There were some changes between 1.7.1 and the version that this utility was designed for. I attached a version that worked for me in 1.7.1, based on the blockMesh of 1.7.1 and some code snippets from the above posted files.
Attached Files
File Type: gz blockMeshDoubleGrading.tar.gz (24.2 KB, 217 views)
JR22 likes this.
Bernhard is offline   Reply With Quote

Old   June 24, 2011, 14:03
Default
  #8
Senior Member
 
Join Date: Nov 2009
Location: Michigan
Posts: 135
Rep Power: 17
doubtsincfd is on a distinguished road
Thanks for the updated code.But I am still getting the same error. Do I need to do anything other than running wmake in .../applications/utlilities/...../blockMesh ?

My OF is installed under root and I access through user login. But the bash file for user is sourced so I am reckoning this should not create any problem unless I am missing something.
doubtsincfd is offline   Reply With Quote

Old   June 24, 2011, 18:30
Default
  #9
Senior Member
 
Join Date: Nov 2009
Location: Michigan
Posts: 135
Rep Power: 17
doubtsincfd is on a distinguished road
Got It. I was making a stupid mistake of typing blockMesh instead of blockMeshDoubleGrading. Thank you for the code! Its a very useful utility.
doubtsincfd is offline   Reply With Quote

Old   July 25, 2011, 03:41
Default Agreement
  #10
New Member
 
Join Date: Mar 2011
Posts: 16
Rep Power: 15
RygeltheXVI is on a distinguished road
I also found it to be very useful and would suggest that something like it be made part of the standard distribution.
RygeltheXVI is offline   Reply With Quote

Old   July 25, 2011, 23:13
Default
  #11
Senior Member
 
Daniel
Join Date: Jul 2009
Location: Montreal, Canada
Posts: 156
Rep Power: 17
dancfd is on a distinguished road
Hello all, I am having some difficulty compiling and running this application. I extracted Bernhard's archive into the $FOAM_USER_APPBIN directory, and ran "wmake libso" from that directory. The compilation ended with no errors and a satisfying "'libNULL.so' is up to date." However, I cannot find the executable file, and when I attempt to run "blockMeshDoubleGrading" I get an error ("blockMeshDoubleGrading: command not found"). I attempted the install on OF 1.7.0. Could someone please assist me with installing this application for use with OF 1.7.0 or above?

Thank you,

Dan

Last edited by dancfd; July 26, 2011 at 00:07.
dancfd is offline   Reply With Quote

Old   July 26, 2011, 05:04
Default
  #12
Senior Member
 
akidess's Avatar
 
Anton Kidess
Join Date: May 2009
Location: Germany
Posts: 1,377
Rep Power: 30
akidess will become famous soon enough
Dan, using "wmake libso" you compile libraries, not executables. Use plain "wmake" and all should be well.
akidess is offline   Reply With Quote

Old   July 27, 2011, 01:49
Default
  #13
Senior Member
 
Daniel
Join Date: Jul 2009
Location: Montreal, Canada
Posts: 156
Rep Power: 17
dancfd is on a distinguished road
Hello akidess,

Thank you - I had a feeling it was something fundamental.

Regards,

Dan
dancfd is offline   Reply With Quote

Old   August 9, 2011, 23:45
Default
  #14
Senior Member
 
Daniel
Join Date: Jul 2009
Location: Montreal, Canada
Posts: 156
Rep Power: 17
dancfd is on a distinguished road
Hello all,

In case anyone is interested, I fixed up this great utility so that it now works with OF 2.0.1. I'm afraid it has become somewhat more complex in OF 2.0.1. With these instructions, it will get working.

First, the library:
1) Copy /src/mesh/blockMesh to $FOAM_USER_APPLIB;
2) Replace blockMesh/blockDescriptor/blockDescriptorEdges.C with the one from the "bin" tarball attached;
3) Replace blockMesh/curvedEdges/lineDivide.C with the one from the "bin" tarball attached;
4) Replace make/files with the one from the "bin" tarball attached
5) Rename the folder from "blockMesh" to "blockMeshDG"
6) Run "wmake libso"

Next, the application:
1) Extract the blockMeshDG_bin tarball to $FOAM_USER_APPBIN
2) run wmake

That should do it. Sorry for the long instructions for the library, the files were too big to include as a single zip.

Enjoy,

Dan
Attached Files
File Type: gz blockMeshDG_bin.tar.gz (37.6 KB, 168 views)
File Type: gz lib.tar.gz (2.2 KB, 123 views)
mirko, akidess, wiedangel and 5 others like this.
dancfd is offline   Reply With Quote

Old   November 1, 2011, 04:46
Default Error?
  #15
New Member
 
Join Date: Mar 2011
Posts: 16
Rep Power: 15
RygeltheXVI is on a distinguished road
Hail dancfd,

I'm not sure if it is just me but there is no $FOAM_USER_APPLIB in my openFoam 2.0.1 release, I think you mean $FOAM_USER_LIBBIN.
Or are we ment to make such a directory in the even that it does not exist?

Also in the blockMeshApp.dep you need to replace the instances of:
/home/dan/OpenFOAM/dan-2.0.1/platforms/linux64GccDPOpt/lib
with something else...

Cheers,
Jesse Coombs

Last edited by RygeltheXVI; November 1, 2011 at 05:02.
RygeltheXVI is offline   Reply With Quote

Old   November 1, 2011, 19:11
Default
  #16
Senior Member
 
Daniel
Join Date: Jul 2009
Location: Montreal, Canada
Posts: 156
Rep Power: 17
dancfd is on a distinguished road
Hello RygeltheXVI,

You are correct, you need to create the $FOAM_USER_APPBIN directory to avoid changing the paths in the files in the "make" directories. As for the .dep file, that is generated by running "wmake" - no need to change anything there.

Regards,

Dan
dancfd is offline   Reply With Quote

Old   November 14, 2011, 04:37
Default
  #17
Senior Member
 
akidess's Avatar
 
Anton Kidess
Join Date: May 2009
Location: Germany
Posts: 1,377
Rep Power: 30
akidess will become famous soon enough
Dan, did you include the modified version of lineDivide.C in the tarball or the original? I see no changes compared to the stock 2.0.x version.
akidess is offline   Reply With Quote

Old   November 16, 2011, 21:32
Default
  #18
Senior Member
 
Daniel
Join Date: Jul 2009
Location: Montreal, Canada
Posts: 156
Rep Power: 17
dancfd is on a distinguished road
Hello Anton,

I apologize, it seems that I did include the wrong file. I have attached the correct lineDivide.c file to this post.

Regards,

Dan
Attached Files
File Type: zip lineDivide.C.zip (1.2 KB, 84 views)
wiedangel and snappyHex like this.
dancfd is offline   Reply With Quote

Old   November 17, 2011, 08:46
Default
  #19
Senior Member
 
akidess's Avatar
 
Anton Kidess
Join Date: May 2009
Location: Germany
Posts: 1,377
Rep Power: 30
akidess will become famous soon enough
Hi Dan, thanks for the upload. For convenience, I have packaged the updated code in an online repository. Now anyone that wants to use the patched version can clone the code and compile it with two commands:

Code:
hg clone https://code.google.com/p/blockmeshdg/ 
./Allwmake
Naturally credit goes to you, so I put your user name in the utility header. Send me a message if you'd like to make any changes.

- Anton
lth, nisha, SirWombat and 9 others like this.
akidess is offline   Reply With Quote

Old   November 26, 2011, 15:34
Default
  #20
Senior Member
 
Daniel
Join Date: Jul 2009
Location: Montreal, Canada
Posts: 156
Rep Power: 17
dancfd is on a distinguished road
Hello Anton,

I am happy that the files are getting wider distribution in the hope that others may find it useful, however would you please add the name of the original author to the credits: Shui Pei. He developed it in the first place.

Regards,

Daniel
Attesz likes this.
dancfd 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
fvOptions npatricia OpenFOAM 6 May 23, 2018 06:21
CFD by anderson, chp 10.... supersonic flow over flat plate varunjain89 Main CFD Forum 18 May 11, 2018 08:31
Warning message C4133 while compiling Arminius Fluent UDF and Scheme Programming 0 October 2, 2017 12:44
Missing math.h header Travis FLUENT 4 January 15, 2009 12:48
REAL GAS UDF brian FLUENT 6 September 11, 2006 09:23


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