Finite Volume Method For Cylindrical Coordinates
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 
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. 
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

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). 
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. 
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. 
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 
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. 
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. 
Quote:

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). 
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. 
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. 
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. 
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. 
sorry did not reply to your mail, been very busy.

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 
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 
Quote:
:D 
All times are GMT 4. The time now is 19:29. 