# Finite Volume Method For Cylindrical Coordinates

 Register Blogs Members List Search Today's Posts Mark Forums Read

 July 1, 2010, 09:32 Finite Volume Method For Cylindrical Coordinates #1 New Member   Akinola Join Date: Jul 2010 Posts: 25 Rep Power: 7 I am developing a CFD code for a stirred tank but have quite a few issues I will appreciate if anyone can help me with: 1. There are very few books on the discretisation of the Navier-Stokes equation in cylindrical coordinates. I am having problem knowing which terms to put at the surface and which to put at the centre due to the appearance of terms like 1/r^2. 2. Also, I have issues with staggered grid and I dont really understand the collocated grid methods either. My problem with staggered grid has to do with how to store the velocity vectors as matrices as most program dont accept frational index i.e. vij+1/2 used in staggered grid. 3. Most books have the discretised equation for rectangular coordinate but none for cylindrical coordinates. Is there any good book that explained the discetisation of the Navier-Stokes equation in cylindrical coordinates? 4. I am also thinking maybe I should work in rectangular coordinates but with a cylindrical coordinate fitted grids and then approximate the length of the mesh as rectangular i.e dx=dr, dy = rdTheta, dz= dz. My only concern here is that I need to now convert the source term vectors from rectangular to cylindrical and also my boundary conditions. Does anyone understand what I'm trying to say or does it not make any sense. Any help will be greatly appreciated. Thanks

July 1, 2010, 17:11
#2
Senior Member

Arjun
Join Date: Mar 2009
Location: Nurenberg, Germany
Posts: 384
Rep Power: 10
Quote:
 Originally Posted by falopsy I am developing a CFD code for a stirred tank but have quite a few issues I will appreciate if anyone can help me with:

Is mesh motion involved??
If it is there then how will you handle that in cylindrical coordinates?

PS: I have written a code for cylindrical coordinate but can not comment much on it as lots of patents etc are still pending. At the year end, there will be some publications that time probably you will find out.

 July 1, 2010, 18:57 #3 New Member   Akinola Join Date: Jul 2010 Posts: 25 Rep Power: 7 Thanks arjun,for your response. Mesh motion is not involved. I will just be grateful if you can give me the equations for the coefficients (aP, aE, aW, etc) in the discretised equation so I can compare them to the one I obtained to verify the correctness before I start coding. Thanks

July 1, 2010, 20:52
#4
Senior Member

Arjun
Join Date: Mar 2009
Location: Nurenberg, Germany
Posts: 384
Rep Power: 10
Quote:
 Originally Posted by falopsy Thanks arjun,for your response. Mesh motion is not involved. I will just be grateful if you can give me the equations for the coefficients (aP, aE, aW, etc) in the discretised equation so I can compare them to the one I obtained to verify the correctness before I start coding. Thanks
Nothing great about them. I use collocated method and SIMPLE algorithm as peric describe. And i treat it as a unstructured mesh.
Download the peric's code and work along that line, you will be fine.

My patents are about mesh motion in large meshes and development of solver for pressure equation. (Solves to machine precision in less than 5 iteration for 1-2 billion cells mesh).

 July 2, 2010, 00:14 #5 New Member   Join Date: Jun 2010 Posts: 16 Rep Power: 7 If it is finite-volume, I don't see the point of solving the equations written in the cylindrical coordinate system (maybe I'm missing something). If finite-volume, you have a control volume and You integrate the equations over the control-volume. What you need is then a numerical flux at the face in the face normal direction. Maybe I'm missing simething, but I don't know why the equations are discretized in the cylindrical coordinate system. Ignore me if it is not relevant.

July 2, 2010, 00:25
#6
Senior Member

Arjun
Join Date: Mar 2009
Location: Nurenberg, Germany
Posts: 384
Rep Power: 10
Quote:
 Originally Posted by bjohn If it is finite-volume, I don't see the point of solving the equations written in the cylindrical coordinate system (maybe I'm missing something). If finite-volume, you have a control volume and You integrate the equations over the control-volume. What you need is then a numerical flux at the face in the face normal direction. Maybe I'm missing simething, but I don't know why the equations are discretized in the cylindrical coordinate system. Ignore me if it is not relevant.
you are not missing very much.

In fact i think in his case it would be better for him to just write a mesh from cylindrical format to any format that openFOAM type solver can understand and use them. It would be better than reinventing the wheel.

July 2, 2010, 05:56
#7
New Member

Akinola
Join Date: Jul 2010
Posts: 25
Rep Power: 7
Quote:
 Originally Posted by bjohn If it is finite-volume, I don't see the point of solving the equations written in the cylindrical coordinate system (maybe I'm missing something). If finite-volume, you have a control volume and You integrate the equations over the control-volume. What you need is then a numerical flux at the face in the face normal direction. Maybe I'm missing simething, but I don't know why the equations are discretized in the cylindrical coordinate system. Ignore me if it is not relevant.

Thanks bjohn, what I mean is integration over the control volume after which you have expressions with aP, aN, aE etc. What I want is a confirmation of my expressions for these constants as they are much more complex in cylindrical coordinates than rectangular coordinates and I have not seen any book with them. The other option is to approximate the control volume with a rectangular box and just use the more common expression in rectangular coordinates but I dont know if that is visible.

@ arjun, like you, my final aim is not just the flow in a stirred tank. I'm working on crystallisation and just need the flow fields at different time steps to predict my crystal properties and can't just use openFOAM. Even if I can, I'll like to learn how to do it. Any help you can offer will be appreciated. Thanks

July 2, 2010, 06:17
#8
Senior Member

Arjun
Join Date: Mar 2009
Location: Nurenberg, Germany
Posts: 384
Rep Power: 10
Quote:
 Originally Posted by falopsy @ arjun, like you, my final aim is not just the flow in a stirred tank. I'm working on crystallisation and just need the flow fields at different time steps to predict my crystal properties and can't just use openFOAM. Even if I can, I'll like to learn how to do it. Any help you can offer will be appreciated. Thanks

you got to tell me this one thing, is your calculation less than 5 to 10 million cells and are you happy running the simulation on shared memory parallel. (preferably on windows).

If this is true then within a week or two i am going to release inavier version 2, that would solve you navier stokes.
Plus you will be able to add models to it with little efforts.

The solver takes care of navier stokes part you take care of model that you want to add.

 July 2, 2010, 06:18 #9 Senior Member   Arjun Join Date: Mar 2009 Location: Nurenberg, Germany Posts: 384 Rep Power: 10 if you want, i can send you manual in pdf format. By reading it you will know if it is any use to you or not. in that case give me your email id.

July 2, 2010, 09:39
#10
New Member

Akinola
Join Date: Jul 2010
Posts: 25
Rep Power: 7
Quote:
 Originally Posted by arjun if you want, i can send you manual in pdf format. By reading it you will know if it is any use to you or not. in that case give me your email id.
Arjun, I have sent u my email address and will be expecting the manual. Thanks a mil

July 2, 2010, 16:34
#11
Senior Member

Arjun
Join Date: Mar 2009
Location: Nurenberg, Germany
Posts: 384
Rep Power: 10
Quote:
 Originally Posted by falopsy Arjun, I have sent u my email address and will be expecting the manual. Thanks a mil

I sent you email.

i will be out of town for today and tomorrow so might not mail these two days. (not sure if am taking my laptop with me).

Last edited by arjun; July 2, 2010 at 17:42.

 July 2, 2010, 18:25 #12 New Member   Akinola Join Date: Jul 2010 Posts: 25 Rep Power: 7 Thanks, I have seen the message. The iNavier will be very helpful for me for validation. I will surely acknowledge u in my dissertation.My question again is: I have already written an explicit time stepping code but my issue then is the CFL restriction because crystallisation typically runs for hourrs, say 2 hrs (7200s), and the time limitation is such that it will take forever to finish the simulation. That is why I'm trying to rewrite it using implicit time stepping. My questions again are these: 1. Can I choose the time step to be around 1 sec for an implicit scheme. I noticed u used a time step of 1e-3 in the manual, why use something that small for an implicit scheme? 2. is it possible to have steady state in an impeller induced flow? I am asking this because the impeller is always moving and I kind of dont see how the flo w can reach steady state? I dont know if you get what I mean.

July 4, 2010, 21:33
#13
Senior Member

Arjun
Join Date: Mar 2009
Location: Nurenberg, Germany
Posts: 384
Rep Power: 10
Quote:
 Originally Posted by falopsy Thanks, I have seen the message. The iNavier will be very helpful for me for validation. I will surely acknowledge u in my dissertation.My question again is: I have already written an explicit time stepping code but my issue then is the CFL restriction because crystallisation typically runs for hourrs, say 2 hrs (7200s), and the time limitation is such that it will take forever to finish the simulation. That is why I'm trying to rewrite it using implicit time stepping. My questions again are these: 1. Can I choose the time step to be around 1 sec for an implicit scheme. I noticed u used a time step of 1e-3 in the manual, why use something that small for an implicit scheme? 2. is it possible to have steady state in an impeller induced flow? I am asking this because the impeller is always moving and I kind of dont see how the flo w can reach steady state? I dont know if you get what I mean.

Without looking at the whole thing (equations) it is really difficult to say anything. If you have them in any papers or documents or if you could write down then please email me. I could tell you if using finite volume solver inavier/openfoam would be feasible or not.

Here are few notes though:

1. One of the old versions of inavier, i did solve some curing problems that run for minutes (if not hours) and i used large steps. I did compare my results with polyflow software and they matched well.

2. If you are using cylindrical coordinate and mesh is regular that for uniform poisson equation
nabla^2( phi ) = src ,
you can create a direct solver which is very very fast.

3. Unfortunately when you try to use fully implicit method with SIMPLE type method, the pressure equation is no longer uniform and it is of form:

nabla (k . nabla phi ) = src, where k varies in calculation domain so direct solver is no longer valid.

So it all depends on nature of your equations and your mesh.

 July 7, 2010, 08:20 #14 New Member   Akinola Join Date: Jul 2010 Posts: 25 Rep Power: 7 Hi arjun, Is it possible to work with cylindrical grids but with velocity components in cartesian coordinates. My question is, how do I calculate the area of the faces perpendicular to the velocity components in terms of r, theta and z. I think I will prefer to work in cartesian coordinates because I can easily verify my equations for the coefficients. I have already programmed the solver for my program and have the user interface ready. I just need to make sure the equations for the coefficients are correct. I will send my equations in cylindrical coordinates to your before end of day tomorrow. Thanks a lot for your help.

July 7, 2010, 20:55
#15
Senior Member

Arjun
Join Date: Mar 2009
Location: Nurenberg, Germany
Posts: 384
Rep Power: 10
Quote:
 Originally Posted by falopsy Hi arjun, Is it possible to work with cylindrical grids but with velocity components in cartesian coordinates.
Yepp, this is what i did.

Quote:
 Originally Posted by falopsy Hi arjun, Is it possible to work with cylindrical grids but with velocity components in cartesian coordinates. My question is, how do I calculate the area of the faces perpendicular to the velocity components in terms of r, theta and z. I think I will prefer to work in cartesian coordinates because I can easily verify my equations for the coefficients. I have already programmed the solver for my program and have the user interface ready. I just need to make sure the equations for the coefficients are correct. I will send my equations in cylindrical coordinates to your before end of day tomorrow. Thanks a lot for your help.

Before we go further, let me clearify one thing that so far i am assuming that you are talking about cylindrical grids which has meshes:
Ni x Nj x Nk ,

where Ni is say theta distribution (0 to 360 deg),
Nj is radial distribution 0 to Rmax
and Nk is z distribution zmin to zmax.

Once we fixed this, you should be able to access every thing by (i,j,k).
That means lets say pressure is given by P(i,j,k).

Now in a finite volume solver each cell has 6 neighbors, those could be accessed by (i,j,k) notation, by i+/-1, j+/-1, k+/-1 .

For discitesation in finite volume sense you will need fluxes on these faces plus you will need area and distance between them.

convection term will be calculated based on discretisation scheme (based on flux).

Diffusional term would be something like = visc_eff_at_face * (Area / dist_between_cells)

Area and dist_between_cells could be easily calcuted, based on your grid.

you can send me equations, as you get time.

 July 14, 2010, 19:34 #16 Senior Member   Join Date: Apr 2009 Posts: 118 Rep Power: 8 Hello, Instead of cylindrical coordinates I'm trying to discretise the governing equations written in spherical coordinates using FVM. However, I'm considering a spherically symmetric flow (retaining only r-dependence), i.e. it is 1-D. Therefore the general governing equation can be written as where the total flux . When I use the FVM in 1-D (only retaining r-dependence) for the following control volume, my discretised equation looks exactly the same as it does for the Cartesian coordinates! This doesn't sound right to me as I don't know where the 1/r^2 terms went. W---------|w----------P----------|e---------E However, for a 2-D polar coordinates the equations I obtain were different to the 2-D Cartesian as expected. For a detailed description of what I'm done, here's how I'm trying to discretise it in 1-D spherical coordinates. The general conservation equation (in 3-D) can be written as where . I then apply FVM to obtain (note using fully implicit scheme) where f refers to the cell faces and A are the face area vectors. I think the key here is the face area vectors. So for the 1-D control volume shown above the equation just becomes Now this is where I have the biggest doubt, for the control volume above, wouldn't the face area vectors just be For spherical coordinates the gradient operator is given by which therefore for only r-dependence gives which is the same as that for 1-D Cartesian coordinates with x replaced by r And since in 1-D , isn't my discretisation the same as that for Cartesian coordinates?

 July 14, 2010, 22:36 #17 Senior Member   Arjun Join Date: Mar 2009 Location: Nurenberg, Germany Posts: 384 Rep Power: 10 sorry did not reply to your mail, been very busy.

 July 15, 2010, 06:34 #18 New Member   Akinola Join Date: Jul 2010 Posts: 25 Rep Power: 7 Thanks arjun, Concerning the calculation of area, I wont be able to just use the area of the cylindrical control volume if my velocities are in cartesian coordinates as the will no longer be perpendicular to the cylindrical coordinates. Another issue will be implementation of boundary condition say I want the velocity to be a particular value in radial direction. I hope you understand my concerns. Anyway, I think I have the right equations now. I have been writing them all in my notebook and will type them up and send to you before end of day today so you can verify for me. I am using the general discretisation scheme written in TVD format and using the deferred correction method and gauss-siedel to solve the algebraic equation. My problem now is that my algorithm seems not to be diverging even when I use the upwind scheme. Is this a normal issue and how do I go around it. Thanks

 July 15, 2010, 19:08 #19 New Member   Akinola Join Date: Jul 2010 Posts: 25 Rep Power: 7 Hi Arjun, Should I still send my derivation of the equations to you cos I noticed you are yet to reply my last mails. Please let me know if I can send to you. Thanks

July 16, 2010, 19:21
#20
Senior Member

Arjun
Join Date: Mar 2009
Location: Nurenberg, Germany
Posts: 384
Rep Power: 10
Quote:
 Originally Posted by falopsy Hi Arjun, Should I still send my derivation of the equations to you cos I noticed you are yet to reply my last mails. Please let me know if I can send to you. Thanks
you can definitely send in, i will look as time permits. I keep very very busy usually. Plus computers at home on which i work are not connected to internet. And the one that is connected is usually taken by my 3year old daughter (she spends lot of time with youtube) so sometimes i need to wait a bit to see my emails etc etc.

:-D

 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 solomon FLUENT 4 April 3, 2015 00:10 elankov Main CFD Forum 43 December 18, 2010 17:30 SSL FLUENT 2 January 26, 2008 12:55 littlelz Main CFD Forum 5 June 21, 2003 12:50 C-H Kuo Main CFD Forum 3 November 5, 1998 10:07

All times are GMT -4. The time now is 15:18.