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

[Other] Number of cells in each direction

Register Blogs Community New Posts Updated Threads Search

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   September 10, 2012, 08:27
Default Number of cells in each direction
  #1
New Member
 
Ivana
Join Date: Feb 2012
Posts: 16
Rep Power: 14
IvanaS is on a distinguished road
Hi,

I am trying to couple Fortran code with ReactingFoam. For this I need to extract number of cells in each direction.

Could someone please tell me if that's possible to do? And if yes, how?

Also, is it somehow possible to extract data from OpenFoam in form u(i,j,k), for example in case of velocity?

Thank you very much.

Regards,

Ivana
IvanaS is offline   Reply With Quote

Old   October 25, 2012, 11:57
Default
  #2
Member
 
Usit McCarra
Join Date: Oct 2010
Posts: 51
Blog Entries: 2
Rep Power: 15
McCarra is on a distinguished road
Hey Ivana,

Do you create the mesh using blockMesh? Then you can check (and modify) the number of cells you have in each direction in your mesh in constant/polyMesh/blockMeshDict. Check this.

And you can check all your vector variables in the form (Ux, Uy, Uz) at each time saved. Go to the folder of the time you want, for example 0.4 and open the file with the name of your variable, U for example.
If you want the values for a specific point you can use a probe. Then you can check this.
__________________
Mc
McCarra is offline   Reply With Quote

Old   April 16, 2013, 05:22
Default
  #3
New Member
 
Ivana
Join Date: Feb 2012
Posts: 16
Rep Power: 14
IvanaS is on a distinguished road
Hi,

Thanks for your reply and sorry for my vary late answer, I was away.

I do use blockMesh. I know that you can modify number of cells in each direction and things are very simple when you have one block. But what confuses me is what happens when you have several blocks, something like this:
blocks
(
hex (0 1 2 3 4 5 6 7) (8 160 8) simpleGrading (1 1 1)//0
hex (8 0 3 11 9 4 7 10) (8 160 8) simpleGrading (1 1 1)//1
hex (1 12 15 2 5 13 14 6) (8 160 8) simpleGrading (1 1 1)//2
hex (4 5 6 7 9 13 14 10) (8 160 8) simpleGrading (1 1 1)//3
hex (8 12 15 11 0 1 2 3) (8 160 8) simpleGrading (1 1 1)//4
hex (16 8 11 19 17 9 10 18) (24 160 8) simpleGrading (0.333 1 1)//5
hex (12 20 23 15 13 21 22 14) (24 160 8) simpleGrading (3 1 1)//6
hex (9 13 14 10 17 21 22 18) (8 160 24) simpleGrading (1 1 3)//7
hex (16 20 23 19 8 12 15 11) (8 160 24) simpleGrading (1 1 0.333)//8
);

How do you then determine total number of cells in each direction?

Regarding the velocity field, I don't want to read velocity field from the file because I need it in my FORTRAN code at every time step but I would rather like to pass it on a fly. Do you maybe have some suggestion how to do that?

Thank you very much!

Best regards,

I.
IvanaS is offline   Reply With Quote

Old   April 16, 2013, 06:05
Default
  #4
Member
 
Usit McCarra
Join Date: Oct 2010
Posts: 51
Blog Entries: 2
Rep Power: 15
McCarra is on a distinguished road
Hey,

I would say that in that case the number of cells in each direction is the sum of cells of each block. I dont know other ways of figuring that out without working block by block.

I am afraid I cannot help you with the passing of the velocity to your FORTRAN code.

Good luck
__________________
Mc
McCarra 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
[snappyHexMesh] snappyHexMesh sticking point natty_king OpenFOAM Meshing & Mesh Conversion 11 February 20, 2024 09:12
[mesh manipulation] Mesh Refinement Luiz Eduardo Bittencourt Sampaio (Sampaio) OpenFOAM Meshing & Mesh Conversion 42 January 8, 2017 12:55
[mesh manipulation] Importing Multiple Meshes thomasnwalshiii OpenFOAM Meshing & Mesh Conversion 18 December 19, 2015 18:57
Cluster ID's not contiguous in compute-nodes domain. ??? Shogan FLUENT 1 May 28, 2014 15:03
Unaligned accesses on IA64 andre OpenFOAM 5 June 23, 2008 10:37


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