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   May 24, 2013, 07:17
Default
  #41
Senior Member
 
immortality's Avatar
 
Ehsan
Join Date: Oct 2012
Location: Iran
Posts: 2,208
Rep Power: 27
immortality is on a distinguished road
Hi Bruno
I need it on OF 2.2.0
__________________
Injustice Anywhere is a Threat for Justice Everywhere.Martin Luther King.
To Be or Not To Be,Thats the Question!
The Only Stupid Question Is the One that Goes Unasked.
immortality is offline   Reply With Quote

Old   May 24, 2013, 07:30
Default
  #42
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
Quote:
Originally Posted by immortality View Post
Hi Bruno
I need it on OF 2.2.0
Ehsan, go ahead and try the code and see if it works. There is a good chance no changes are required.
__________________
*On twitter @akidTwit
*Spend as much time formulating your questions as you expect people to spend on their answer.
akidess is offline   Reply With Quote

Old   May 24, 2013, 08:29
Default
  #43
Senior Member
 
immortality's Avatar
 
Ehsan
Join Date: Oct 2012
Location: Iran
Posts: 2,208
Rep Power: 27
immortality is on a distinguished road
OK.thanks.compiled without error.
but in conventional way we have for example:
Code:
hex (0 1 4 3 9 10 13 12) (400 40 1) simpleGrading (2 4 1)
in (2 4 1) each number is related to (positive x-direction,y-direction,z-direction)
and its clear.
but in simpleGrading how it is implemented?
I expected something like: ((1 2 3)(4 5 6)(7 8 9)) for double grading,could anyone enlighten me?
Code:
hex (0 1 2 3 4 5 6 7) (20 10 20) simpleGrading (-5 1 1)
__________________
Injustice Anywhere is a Threat for Justice Everywhere.Martin Luther King.
To Be or Not To Be,Thats the Question!
The Only Stupid Question Is the One that Goes Unasked.

Last edited by immortality; May 24, 2013 at 09:35.
immortality is offline   Reply With Quote

Old   May 24, 2013, 19:15
Default
  #44
Retired Super Moderator
 
Bruno Santos
Join Date: Mar 2009
Location: Lisbon, Portugal
Posts: 10,981
Blog Entries: 45
Rep Power: 128
wyldckat is a name known to allwyldckat is a name known to allwyldckat is a name known to allwyldckat is a name known to allwyldckat is a name known to allwyldckat is a name known to all
Greetings to all!

@Anton:
Quote:
Originally Posted by akidess View Post
Bruno, did you ever test it on 2.2? If so, we could add the 2.2 template to the wiki...
Nope, I only had time to build it and to fix the zip related instructions. I'll try to give it a spin tomorrow, using the case from post #25.

@Ehsan: Check the wiki: http://openfoamwiki.net/index.php/Co...ckMeshDG#Usage - and check the examples shown in this thread you're reading.

Best regards,
Bruno
Tushar@cfd likes this.
__________________
wyldckat is offline   Reply With Quote

Old   May 25, 2013, 04:47
Default
  #45
New Member
 
Steve
Join Date: Sep 2012
Location: Perth, Australia
Posts: 17
Rep Power: 14
greenleader is on a distinguished road
Quote:
Originally Posted by akidess View Post
Bruno, did you ever test it on 2.2? If so, we could add the 2.2 template to the wiki...
I've used it with OF v2.2.0 - no issues with it - it just works!
wyldckat likes this.
greenleader is offline   Reply With Quote

Old   May 25, 2013, 06:34
Default
  #46
Senior Member
 
immortality's Avatar
 
Ehsan
Join Date: Oct 2012
Location: Iran
Posts: 2,208
Rep Power: 27
immortality is on a distinguished road
its only this:
Code:
For example, simpleGrading (1 -2 1) in blockMeshDict means the created mesh has cells two times larger in the center than those at the side.
which side we are talking about in grading?if its a 3D mesh it means it has less cells in the middle of domain but we want both sided grading in each face of domain.
what we can do when we want different grading in different directions?it seems nothing!
although this work is valuable but has some defects in it.
__________________
Injustice Anywhere is a Threat for Justice Everywhere.Martin Luther King.
To Be or Not To Be,Thats the Question!
The Only Stupid Question Is the One that Goes Unasked.
immortality is offline   Reply With Quote

Old   May 25, 2013, 08:15
Default
  #47
Retired Super Moderator
 
Bruno Santos
Join Date: Mar 2009
Location: Lisbon, Portugal
Posts: 10,981
Blog Entries: 45
Rep Power: 128
wyldckat is a name known to allwyldckat is a name known to allwyldckat is a name known to allwyldckat is a name known to allwyldckat is a name known to allwyldckat is a name known to all
Greetings to all!

@Steve: Many thanks for the report!
@Anton: Wiki page updated.

@Ehsan:
Quote:
Originally Posted by immortality View Post
which side we are talking about in grading?if its a 3D mesh it means it has less cells in the middle of domain but we want both sided grading in each face of domain.
"simpleGrading (1 -2 1)" - The minus 2 is for the Y direction.

You might not see much with just "(1 -2 1)", because it's just an example; it implies that the person reading the instructions already has some experience with blockMesh's original grading capabilities, which are explained in the OpenFOAM User Guide, section "5.3 Mesh generation with the blockMesh utility", more specifically subsection "5.3.1.3 The blocks": http://www.openfoam.org/docs/user/blockMesh.php

Best regards,
Bruno
__________________
wyldckat is offline   Reply With Quote

Old   May 25, 2013, 08:41
Default
  #48
Senior Member
 
immortality's Avatar
 
Ehsan
Join Date: Oct 2012
Location: Iran
Posts: 2,208
Rep Power: 27
immortality is on a distinguished road
thanks.so it only do double grading.if someone likes single grading in x-direction as well as double grading in y-direction can combine blockMesh and blockMeshDG together?I still think we need a more powerful tool in meshing.
------------------------------------------------------
I tested it by a very coarse mesh:
Code:
hex (0 1 2 3 4 5 6 7) (10 8 1) simpleGrading (-2 -4 1)
and works fine as the attachment.it made me free of so many excess points and blocks!
Attached Images
File Type: jpg Mesh_coarse.jpg (13.3 KB, 206 views)
the_ichthyologist likes this.
__________________
Injustice Anywhere is a Threat for Justice Everywhere.Martin Luther King.
To Be or Not To Be,Thats the Question!
The Only Stupid Question Is the One that Goes Unasked.

Last edited by immortality; May 25, 2013 at 12:45.
immortality is offline   Reply With Quote

Old   May 27, 2013, 07:36
Default Uneven number of cells
  #49
Senior Member
 
Gerhard Holzinger
Join Date: Feb 2012
Location: Austria
Posts: 342
Rep Power: 28
GerhardHolzinger will become famous soon enoughGerhardHolzinger will become famous soon enough
Hello,

I noticed a problem when using double grading and an uneven number of cells.
Attached Images
File Type: jpg doubleGradingProblem.jpg (52.5 KB, 215 views)

Last edited by GerhardHolzinger; May 27, 2013 at 08:46.
GerhardHolzinger is offline   Reply With Quote

Old   May 27, 2013, 08:41
Default
  #50
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
Please attach your blockMeshDict.

Quote:
Originally Posted by GerhardHolzinger View Post
Hello,

I noticed a problem when using double grading and an uneven number of cells.
__________________
*On twitter @akidTwit
*Spend as much time formulating your questions as you expect people to spend on their answer.
akidess is offline   Reply With Quote

Old   May 27, 2013, 08:48
Default
  #51
Senior Member
 
Gerhard Holzinger
Join Date: Feb 2012
Location: Austria
Posts: 342
Rep Power: 28
GerhardHolzinger will become famous soon enoughGerhardHolzinger will become famous soon enough
Here is my blockMeshDict.
Attached Files
File Type: txt blockMeshDictDG.txt (3.7 KB, 93 views)
GerhardHolzinger is offline   Reply With Quote

Old   May 27, 2013, 09:04
Default
  #52
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
Gerhard, I think your edgeGrading is botched. Double check while referring to figure 5.5 of the user manual for the edge numbering.

Edit: I take that back for now Need to look into this a bit more carefully.
__________________
*On twitter @akidTwit
*Spend as much time formulating your questions as you expect people to spend on their answer.
akidess is offline   Reply With Quote

Old   May 27, 2013, 10:54
Default
  #53
New Member
 
Steve
Join Date: Sep 2012
Location: Perth, Australia
Posts: 17
Rep Power: 14
greenleader is on a distinguished road
Yes, I seem to recall that doublegrading does not work with an odd number of cells. I always make sure I use an even number.
greenleader is offline   Reply With Quote

Old   July 23, 2013, 09:49
Default In combination with edge Grading
  #54
New Member
 
Aditya
Join Date: May 2013
Location: Munich Germany
Posts: 29
Rep Power: 13
kingmaker is on a distinguished road
Hello

Do any one know if this utility works with edge grading also.. ?
Like if we say one of the values in edge grading to be -ve ... will that edge be graded on both sides .. ??

Thank you
kingmaker is offline   Reply With Quote

Old   July 23, 2013, 10:06
Default
  #55
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
I think Gerhard had success using edge grading. Just be sure to specify an even number of cells.
__________________
*On twitter @akidTwit
*Spend as much time formulating your questions as you expect people to spend on their answer.
akidess is offline   Reply With Quote

Old   July 23, 2013, 10:27
Default Snappy Hex Mesh and BlockMeshDG
  #56
New Member
 
Aditya
Join Date: May 2013
Location: Munich Germany
Posts: 29
Rep Power: 13
kingmaker is on a distinguished road
Quote:
Originally Posted by akidess View Post
I think Gerhard had success using edge grading. Just be sure to specify an even number of cells.
Hello Thank you for your answer. I will try and post if I have any problems.
Mean while, I have one more question, can we use snappy hex mesh after blockMeshDG with out any problems ... ??

Thank you
immortality likes this.
kingmaker is offline   Reply With Quote

Old   August 1, 2013, 05:40
Default Some problem with lineDivide.C
  #57
New Member
 
ME
Join Date: Mar 2012
Posts: 1
Rep Power: 0
roamer is on a distinguished road
Hello Everyone,

Thanks for sharing. But for some meshes using this "double grading" create high aspect ratio meshes and non-orthogonal faces.
I found that a minor editing to the file curvedEdges/lineDivide.C solves the problem.

Code:
        if ( xratio > 0 )
        {
        for (label i=1; i < ndiv; i++)
        {
            divisions_[i] = (1.0 - pow(xratio, i))/(1.0 - pow(xratio, ndiv));
        }
        }
        else
        {
            for (label i=1; i < ndiv; i++)
            {
                if ( i <= ndiv/2.0 )
                {
                    divisions_[i] = (1.0 - pow(-xratio, i))/(1.0 - pow(-xratio, ndiv/2))/2;
                }
                else
                {
                    divisions_[i] = 1.0-(1.0 - pow(-xratio, ndiv-i))/(1.0 - pow(-xratio, ndiv/2))/2;
                }
            }
        }
To this:
Code:
        if ( xratio > 0 )
        {
        for (label i=1; i < ndiv; i++)
        {
            divisions_[i] = (1.0 - pow(xratio, i))/(1.0 - pow(xratio, ndiv));
        }
        }
        else
        {
            for (label i=1; i < ndiv; i++)
            {
                if ( i <= ndiv/2.0 )
                {
                    divisions_[i] = (1.0 - pow(-xratio, i))/(1.0 - pow(-xratio,ndiv/2.0))/2.0;
                }
                else
                {
                    divisions_[i] = 1.0-(1.0 - pow(-xratio, ndiv-i))/(1.0 - pow(-xratio, ndiv/2.0))/2.0;
                }
            }
        }
I hope it helps somebody.
wyldckat and pjohannes183 like this.

Last edited by wyldckat; August 17, 2013 at 14:30. Reason: Added [CODE][/CODE]
roamer is offline   Reply With Quote

Old   August 1, 2013, 05:51
Default
  #58
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
I pushed your patch to the repository: http://code.google.com/p/blockmeshdg...a63253d80a5c93

If you would like to be acknowledged differently please let me know.
__________________
*On twitter @akidTwit
*Spend as much time formulating your questions as you expect people to spend on their answer.
akidess is offline   Reply With Quote

Old   August 1, 2013, 10:55
Default
  #59
Senior Member
 
immortality's Avatar
 
Ehsan
Join Date: Oct 2012
Location: Iran
Posts: 2,208
Rep Power: 27
immortality is on a distinguished road
Hi Anton
I can't have access to this link by this message "Request not allowed from your country That’s all we know."could you upload it anywhere else?
thanks.
__________________
Injustice Anywhere is a Threat for Justice Everywhere.Martin Luther King.
To Be or Not To Be,Thats the Question!
The Only Stupid Question Is the One that Goes Unasked.
immortality is offline   Reply With Quote

Old   August 1, 2013, 11:15
Default
  #60
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
Sorry Ehsan, but I do not have the time to repackage and re-upload every commit. The code changes however are minimal and are within this thread, so you could easily make your own executable.
__________________
*On twitter @akidTwit
*Spend as much time formulating your questions as you expect people to spend on their answer.

Last edited by akidess; August 2, 2013 at 05:38.
akidess 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 11:39.