# Number of cells in each direction

 User Name Remember Me Password
 Register Blogs Members List Search Today's Posts Mark Forums Read

 LinkBack Thread Tools Display Modes
 September 10, 2012, 08:27 Number of cells in each direction #1 New Member   Ivana Join Date: Feb 2012 Posts: 16 Rep Power: 6 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

 October 25, 2012, 11:57 #2 Member   Usit McCarra Join Date: Oct 2010 Posts: 51 Blog Entries: 2 Rep Power: 7 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

 April 16, 2013, 05:22 #3 New Member   Ivana Join Date: Feb 2012 Posts: 16 Rep Power: 6 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.

 April 16, 2013, 06:05 #4 Member   Usit McCarra Join Date: Oct 2010 Posts: 51 Blog Entries: 2 Rep Power: 7 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

 Thread Tools Display Modes Linear Mode

 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 OffTrackbacks are On Pingbacks are On Refbacks are On Forum Rules

 Similar Threads Thread Thread Starter Forum Replies Last Post Luiz Eduardo Bittencourt Sampaio (Sampaio) OpenFOAM Mesh Utilities 41 January 17, 2013 03:43 danny123 OpenFOAM 19 October 24, 2012 07:44 andre OpenFOAM 5 June 23, 2008 10:37 Ralf Schmidt FLUENT 2 April 13, 2008 12:53 Christian Holm Main CFD Forum 8 February 20, 2002 08:37

All times are GMT -4. The time now is 11:01.

 Contact Us - CFD Online - Top