
[Sponsors] 
July 1, 2010, 09:32 
Finite Volume Method For Cylindrical Coordinates

#1 
New Member
Akinola
Join Date: Jul 2010
Posts: 25
Rep Power: 8 
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 NavierStokes 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 NavierStokes 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: 505
Rep Power: 13 
Quote:
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: 8 
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: 505
Rep Power: 13 
Quote:
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 12 billion cells mesh). 

July 2, 2010, 00:14 

#5 
New Member
Join Date: Jun 2010
Posts: 16
Rep Power: 8 
If it is finitevolume, I don't see the point of solving the equations written in the cylindrical coordinate system (maybe I'm missing something). If finitevolume, you have a control volume and You integrate the equations over the controlvolume. 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: 505
Rep Power: 13 
Quote:
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: 8 
Quote:
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: 505
Rep Power: 13 
Quote:
i think i can help you a lot. 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: 505
Rep Power: 13 
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: 8 

July 2, 2010, 16:34 

#11  
Senior Member
Arjun
Join Date: Mar 2009
Location: Nurenberg, Germany
Posts: 505
Rep Power: 13 
Quote:
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: 8 
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 1e3 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: 505
Rep Power: 13 
Quote:
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: 8 
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: 505
Rep Power: 13 
Quote:
Quote:
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: 9 
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 rdependence), i.e. it is 1D. Therefore the general governing equation can be written as where the total flux . When I use the FVM in 1D (only retaining rdependence) 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. WwPeE However, for a 2D polar coordinates the equations I obtain were different to the 2D Cartesian as expected. For a detailed description of what I'm done, here's how I'm trying to discretise it in 1D spherical coordinates. The general conservation equation (in 3D) 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 1D 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 rdependence gives which is the same as that for 1D Cartesian coordinates with x replaced by r And since in 1D , 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: 505
Rep Power: 13 
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: 8 
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 gausssiedel 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: 8 
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: 505
Rep Power: 13 
Quote:
:D 

Thread Tools  
Display Modes  


Similar Threads  
Thread  Thread Starter  Forum  Replies  Last Post 
finite volume VS finite element  solomon  FLUENT  4  April 3, 2015 00:10 
Finite Difference Vs. Finite Volume  elankov  Main CFD Forum  43  December 18, 2010 17:30 
fluent add additional zones for the mesh file  SSL  FLUENT  2  January 26, 2008 12:55 
ALE in finite volume method  littlelz  Main CFD Forum  5  June 21, 2003 12:50 
What is C.V. based finite element method  CH Kuo  Main CFD Forum  3  November 5, 1998 10:07 