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

[blockMesh] Creating a mesh that has high resolution at fluid interface

Register Blogs Community New Posts Updated Threads Search

Like Tree1Likes
  • 1 Post By Antimony

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   July 20, 2016, 13:26
Default Creating a mesh that has high resolution at fluid interface
  #1
New Member
 
Evan
Join Date: May 2016
Posts: 23
Rep Power: 10
k13113y is on a distinguished road
Hello all,

I'm trying to run a multiphase simulation in a cube which has air on the top half and water on the bottom half.

When generating my mesh with blockMesh, how would I make the grading more fine around the interface (about half way up the vertical axis)?

k13113y is offline   Reply With Quote

Old   July 21, 2016, 00:26
Default
  #2
Senior Member
 
Join Date: Aug 2013
Posts: 407
Rep Power: 16
Antimony is on a distinguished road
Hi,

If you are using upwards of OF2.4, you can do multigrading on your blockMesh to get your desired mesh.

Cheers,
Antimony
Antimony is offline   Reply With Quote

Old   July 21, 2016, 02:00
Default
  #3
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
topoSet with fieldToCell between e.g. 0.1 and 0.9, then refineMesh on the resulting cellSet.
__________________
*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 21, 2016, 10:26
Default
  #4
New Member
 
Evan
Join Date: May 2016
Posts: 23
Rep Power: 10
k13113y is on a distinguished road
Awesome thanks for getting back to me; I'd like to try both techniques.

Quote:
Originally Posted by Antimony View Post
Hi,

If you are using upwards of OF2.4, you can do multigrading on your blockMesh to get your desired mesh.

Cheers,
Antimony
For multigrading, I believe I would do something like this no?

simpleGrading
(
1
1
(a b c) (d e f) (g h i)
);

but I'm not sure what a-i should be because I don't understand the algorithm; for a domain with a dense middle in the z-dir, what do you think?

Quote:
Originally Posted by akidess View Post
topoSet with fieldToCell between e.g. 0.1 and 0.9, then refineMesh on the resulting cellSet.
This I'm actually going to try right now but I've never used refineMesh before; is it an action that goes in the topoSetDict?
k13113y is offline   Reply With Quote

Old   July 21, 2016, 23:16
Default
  #5
Senior Member
 
Join Date: Aug 2013
Posts: 407
Rep Power: 16
Antimony is on a distinguished road
Hi,

Yup, you are right:
Quote:
simpleGrading
(
1
1
(a b c) (d e f) (g h i)
);
This is perhaps best explained with an example. Assume that in z-direction your domain goes from say 0 to 100 (z-direction defined as pointing in direction of increasing z-coordinate) . For the first 20, let us say you want 20 cells with a size ratio of 0.25 (end cell is 1/4th start cell size). For the next 50, let us say you want 100 cells, all uniform. And for the remaining 30, let us say you go for 10 cells with size ratio of 4 (end cell is 4 times start cell).

So the simpleGrading now becomes:
Code:
simpleGrading
( 
   1
   1
   (
      (20 20 0.25)
      (50 100 1)
      (30 10 4)
   )
)
Personally I prefer to work in absolutes rather than in fractions. I prefer to use a (20), d (50) and g (30) as lengths that sum up to the total extent in that dimension (100). Also, I sum up the number of cells b (20), e (100), h (10) and put it in the number of cells (130) in the definition of the block: hex (....) (nx ny 130)

Hope this clarifies.

Cheers,
Antimony
Antimony is offline   Reply With Quote

Old   July 22, 2016, 00:26
Wink
  #6
New Member
 
Evan
Join Date: May 2016
Posts: 23
Rep Power: 10
k13113y is on a distinguished road
Ah its so simple now

Many thanks Antimony. If I can help you in the future, though unlikely, don't hesitate to ask.
k13113y is offline   Reply With Quote

Old   October 5, 2016, 12:51
Default tips to find out mesh resolution in r, theta and z direction
  #7
New Member
 
Sandeep Pandey
Join Date: Jul 2016
Location: Germany
Posts: 10
Rep Power: 10
sandeep.pandey is on a distinguished road
Hello all,

Being naive to OF, I am asking this question which you may find simple!

I have a small tube, and to create mesh, I used blockMesh with arcs with 5 hex as shown. Now I want to find mesh resolution in 'r' and 'theta' direction (as in z direction it will be same as defined in blockMesh). Is there any utility in ParaView or in OF? Also, any hint to calculate delta(r), delta(r.theta)?

Attached Images
File Type: jpg problem.jpg (137.2 KB, 129 views)
sandeep.pandey is offline   Reply With Quote

Old   October 6, 2016, 00:32
Default
  #8
Senior Member
 
Join Date: Aug 2013
Posts: 407
Rep Power: 16
Antimony is on a distinguished road
Hi,

When you specify the arcs, you end up specifying the mesh resolution in the radial and circumferential direction, no?

The x1 & x2 directions of the blockMesh are along the first and second edges used to define the blockMesh. So if your first edge is an arc, then the number of divisions would be equivalent to that of the circumferential direction. And if your second edge is one that connects the two arcs, then it would be equivalent to specifying the number of divisions along the radial direction. No?

Cheers,
Antimony
sandeep.pandey likes this.
Antimony is offline   Reply With Quote

Old   October 7, 2016, 09:40
Default
  #9
New Member
 
Sandeep Pandey
Join Date: Jul 2016
Location: Germany
Posts: 10
Rep Power: 10
sandeep.pandey is on a distinguished road
Hi Antimony!

Thanks for quick reply, and sorry to ping here again.
In the blockMesh which I've received, they defined first 'arc' then defined the in 'hex' with number of division (as shown in attached image, just look at the lower five 'hex'). If I understand you correctly, resolution in r is 180, theta is ?


Thanks
Sandeep




Attached Images
File Type: jpg Unbenannt.jpg (73.5 KB, 120 views)
sandeep.pandey is offline   Reply With Quote

Old   October 9, 2016, 23:10
Default
  #10
Senior Member
 
Join Date: Aug 2013
Posts: 407
Rep Power: 16
Antimony is on a distinguished road
Hi,

Look at the block defined by hex (13 14 10 9 .... )

And look at how the edges 13-14, 14-10, 10-9 and 9-13 are defined. 13-14 and 9-10 are arcs an thus for that block they can be seen as the "circumferential" divisions.

14-10 and 13-9, nothing has been defined. So they are taken as straight arcs and thus can be seen as "radial" divisions.

Hope this clarifies at least some of it.

Cheers,
Antimony
Antimony is offline   Reply With Quote

Old   December 31, 2016, 12:58
Default
  #11
New Member
 
Sandeep Pandey
Join Date: Jul 2016
Location: Germany
Posts: 10
Rep Power: 10
sandeep.pandey is on a distinguished road
Quote:
Originally Posted by Antimony View Post
Hi,

Look at the block defined by hex (13 14 10 9 .... )

And look at how the edges 13-14, 14-10, 10-9 and 9-13 are defined. 13-14 and 9-10 are arcs an thus for that block they can be seen as the "circumferential" divisions.

14-10 and 13-9, nothing has been defined. So they are taken as straight arcs and thus can be seen as "radial" divisions.

Hope this clarifies at least some of it.

Cheers,
Antimony
Hey,

Thank you very much for the reply . I missed the latest reply from you because mail directly landed into spam . I figured it out with you previous message.

Thanks again
Sandeep
sandeep.pandey is offline   Reply With Quote

Reply

Tags
blockmesh, simplegrading


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
sliding mesh problem in CFX Saima CFX 46 September 11, 2021 08:38
Radiation in semi-transparent media with surface-to-surface model? mpeppels CFX 11 August 22, 2019 08:30
Velocity vector in impeller passage ngoc_tran_bao CFX 24 May 3, 2016 22:16
Moving mesh Niklas Wikstrom (Wikstrom) OpenFOAM Running, Solving & CFD 122 June 15, 2014 07:20
Multicomponent fluid Andrea CFX 2 October 11, 2004 06:12


All times are GMT -4. The time now is 14:40.