CFD Online Discussion Forums

CFD Online Discussion Forums (https://www.cfd-online.com/Forums/)
-   OpenFOAM Meshing & Mesh Conversion (https://www.cfd-online.com/Forums/openfoam-meshing/)
-   -   [blockMesh] blockMesh with double grading. (https://www.cfd-online.com/Forums/openfoam-meshing/70798-blockmesh-double-grading.html)

spwater December 6, 2009 16:18

blockMesh with double grading.
 
1 Attachment(s)
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

olesen December 7, 2009 02:35

Quote:

Originally Posted by spwater (Post 238883)
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?

spwater December 7, 2009 03:09

Quote:

Originally Posted by olesen (Post 238915)
Did you really change all of the files to get this working?

No, just two file.
/setEdge.C
/curvedEdges/lineDivide.C

Pei

maksen March 12, 2010 04:51

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

Adrian April 14, 2010 08:15

Great tool! Thanks for sharing!

doubtsincfd June 23, 2011 22:08

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::printStack(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.

Bernhard June 24, 2011 02:24

1 Attachment(s)
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.

doubtsincfd June 24, 2011 13:03

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 June 24, 2011 17:30

Got It. I was making a stupid mistake of typing blockMesh instead of blockMeshDoubleGrading. Thank you for the code! Its a very useful utility.

RygeltheXVI July 25, 2011 02:41

Agreement
 
I also found it to be very useful and would suggest that something like it be made part of the standard distribution.

dancfd July 25, 2011 22:13

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

akidess July 26, 2011 04:04

Dan, using "wmake libso" you compile libraries, not executables. Use plain "wmake" and all should be well.

dancfd July 27, 2011 00:49

Hello akidess,

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

Regards,

Dan

dancfd August 9, 2011 22:45

2 Attachment(s)
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

RygeltheXVI November 1, 2011 03:46

Error?
 
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

dancfd November 1, 2011 18:11

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

akidess November 14, 2011 03:37

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.

dancfd November 16, 2011 20:32

1 Attachment(s)
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

akidess November 17, 2011 07:46

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

dancfd November 26, 2011 14:34

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

Ivooo March 28, 2012 11:20

Thanks for the program and the repository! It works great. Btw ParaFoam segfaults when setting an odd number of cells in the double-grading direction, I didn't notice until a colleague reminded me to check that, then it worked :)

pjohannes183 May 3, 2012 07:34

works like a charm, thanks to all contributors!

vonboett July 3, 2012 08:14

I got the same Floating point exception like Omkar if calling blockMesh after updating the files using hg clone, and blockMeshDoubleGrading is an unknown command, so maybe for clarifying: calling ./Allwmake in the src/mesh folder or at top level? Works with OF 2.1.x?
However I think ist a great tool, especially if one has to deal with internal boundaries like baffles it is cool to avoid half of the blocks.

akidess July 3, 2012 10:05

Albrecht, the executable name is blockMeshDG. I will make that more clear on the repository site.

Pekka October 31, 2012 06:01

5 Attachment(s)
Hi Foamers,

Thanks for DG version!

One problem found when the O-grid type block mesh was generated. BlockMeshDG switch the grading opposite if midpoints on the block edges are used. This problem does not occur if blocks coordinate system is in same direction, but on the O-grid blocks coordinate systems is not possible keep on same direction. Any ideas fix this problem?

Attached case can be run by blockMeshDG on 1.6-ext.

BR/Pekka

sasanghomi January 31, 2013 18:59

Hi
 
Quote:

Originally Posted by Bernhard (Post 313355)
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.

I want to compile this utility on OP 1.6-ext , Do you have the source code???

please help me...

Thanks,
Sasan.

wyldckat February 2, 2013 05:39

1 Attachment(s)
Hi Sasan,

Attached is the modified version for 1.6-ext, based on the instructions from post #3: http://www.cfd-online.com/Forums/ope...tml#post238922

Instructions:
  1. Download the attached file.
  2. Uncompress it:
    Code:

    tar -xf blockMeshDG-1.6-ext.tar.gz
  3. Build it:
    Code:

    cd blockMeshDG-1.6-ext
    wmake

I tested with the case from post #25.


Best regards,
Bruno

sasanghomi February 2, 2013 06:14

Hi Bruno,

works like a charm.
Thank you very much.

Sasan

Pekka February 3, 2013 11:59

2 Attachment(s)
I found the solution to my problem. It's simpler than anybody can guess. :mad:

When arc is used on the block edges it is a matter of the order of arc end points. So the grading direction can be changed by switching the end points order:

HTML Code:

arc 6 7 ( 1.375 1 1.2 )  => arc 7 6 ( 1.375 1 1.2 )
BR/Pekka

greenleader April 5, 2013 10:14

Disappointed to see that blockMeshDG still does not seem to be part of the standard distribution. Are the developers not aware of it? How do we make them aware of it? As an OF newbie it was the first thing I looked for when I was creating my first mesh!

About to download and try it for the first time (OF V2.1.1).....

Later:
Worked perfectly, but as pointed out by others earlier, you must make sure you specify an even number of cells. I found that if its an odd number, although blockMesh works fine, checkMesh crashes, as does paraFoam.

wyldckat April 6, 2013 06:29

Greetings Steve,

Quote:

Originally Posted by greenleader (Post 418568)
Disappointed to see that blockMeshDG still does not seem to be part of the standard distribution. Are the developers not aware of it? How do we make them aware of it? As an OF newbie it was the first thing I looked for when I was creating my first mesh!

  • They have already been made aware of this: http://www.openfoam.org/mantisbt/view.php?id=457 - but it has a low priority.
  • They already provide the means for people to contribute with source code: http://www.openfoam.org/contrib/unsupported.php
  • But I think the problem right now is that the original author of the modifications made for "blockMeshDG" should be the one to submit them. The other possibility is for someone else to write from scratch a similar algorithm and submit it according to the specifications made in the previous link.
In the mean time, this is a (good?) way to make new and old OpenFOAM users think a bit about exploring what the community has to offer and hopefully it will eventually reach critical mass and be part of the official code :).

Best regards,
Bruno

greenleader April 6, 2013 23:18

Thanks for that Bruno, appreciate you taking the time to reply!
Regards
Steve

OpenF May 7, 2013 09:14

Hi Foamers,

I tried to install blockMeshDoubleGrading but after wmake I get this error :

/opt/openfoam220/wmake/wmake: line 222: make: command not found
/opt/openfoam220/wmake/wmake: line 223: make: command not found
wmake error: file 'Make/linux64GccDPOpt/objectFiles' could not be created in /tmp/blockMeshDG-1.6-ext

and I don't know why. I already succeeded to install this program with another computer..

thanks

Anselme

akidess May 7, 2013 11:36

Anselme, your error is not related to blockMeshDG, but to your OpenFOAM installation. I'm guessing you can't compile any other program either.

wyldckat May 7, 2013 16:30

Greetings Anselme,

As Anton indicated, you're missing the tools needed for compiling. Check the instructions shown in the section "System Requirements" for the "Source Pack" instructions: http://www.openfoam.org/download/source.php#x6-29000 - that section is all you need to follow, since you've already installed OpenFOAM.

Best regards,
Bruno

OpenF May 13, 2013 03:46

Thanks a lot for your answer wyldckat and akidess, it works ! Now I would like to set a parabolic velocity inlet profile but I can't get the sources on

svn checkout http://openfoam-extend.svn.sourceforge.net/svnroot/\
openfoam-extend/trunk/Core/OpenFOAM-1.5-dev/src/finiteVolume/\
fields/fvPatchFields/derived/parabolicVelocity/

because of that http://openfoamwiki.net/index.php/Main_Page

Someone has an idee ?

Best regards,
Anselme

akidess May 13, 2013 03:49

Anselme, you can use Swak4Foam/GroovyBC. If you run into problems in doing so please start a new thread so we can keep this one focused on blockMeshDG.

- Anton

immortality May 23, 2013 15:02

Hi all
how can find a 2.2.0 version of blockMeshDG?

wyldckat May 23, 2013 18:08

Hi Ehsan,

Quote:

Originally Posted by immortality (Post 429591)
how can find a 2.2.0 version of blockMeshDG?

Simply follow the instructions from here: http://openfoamwiki.net/index.php/Contrib_blockMeshDG - I suggest that you follow the instructions for the zip version.

Best regards,
Bruno

akidess May 24, 2013 03:43

Bruno, did you ever test it on 2.2? If so, we could add the 2.2 template to the wiki...


All times are GMT -4. The time now is 19:47.