
[Sponsors] 
July 16, 2010, 23:38 
For Point 4

#21 
Member

Hi,
I have developed a compressible flow FVM solver in the manner u have explained in point 4. My grid is in cylindrical coordinates and the solver in Cartesian. I have worked on a cylindrical domain (flow through pipe). I did not get any issue of singularity at the cylindrical axis, both my Euler code and NS code work fine. 

July 17, 2010, 06:56 

#22  
New Member
Akinola
Join Date: Jul 2010
Posts: 25
Rep Power: 8 
Quote:


July 17, 2010, 15:45 
Hi

#23 
Member

I did 3D, compressible NS solver, but tested it only for laminar case only. I didnot add any of the relaxation factors.


July 19, 2010, 20:19 

#24 
New Member
Akinola
Join Date: Jul 2010
Posts: 25
Rep Power: 8 
I tried to use openFOAM as you suggestd but it is also not as easy as that as it will involve me learning C#, linux and then trying to understand the code as well. I believe writing my own code will give me better control if I want to add other physics/models to the code. I also think the purpose of the project is to learn how to do something and not just use what has been done by others. If we keep discouraging people from trying things out then in the next ten years when those people who wrote openFOAM are retired, we will have no one to develop new codes . That is just a joke by the way.
Anyway, I just finished implementing SIMPLE (collocated grid, Rhiechow) algorithm in the code with good convergence and I am now ready to add a turbulence model? Like you advice, any idea on the implementation of kepsilon will be highly appreciated so i dont reinvent the wheel. Thanks. 

July 19, 2010, 20:32 

#25  
Senior Member
Arjun
Join Date: Mar 2009
Location: Nurenberg, Germany
Posts: 484
Rep Power: 13 
Quote:
1. Writing a CFD code is lot of work. Plus writing a stable CFD code is even more difficult. 2. For larger meshes simple matrix solvers do not cut it. The best would be AMG but that is also very difficult in itself. So the next best is BiCGStab which is relatively easy. (but hinders convergence for very large meshes). Now given (1) and (2) ask yourself  would you suggest someone to write solver code if he wants to do small things??? About your idea of learning and encouraging is good. But do you think companies should make it mandatory for every person who work on CFD to first write a working CFD code. After all it encourages learning isn't it. It is lot of work. On net it is difficult to know who wants to go to what levels to learn. This is why first suggestion is  not to reinvent the wheel. PS: I wrote inavier because i wanted to learn. So yes , in that case i reinvented the wheel, but i knew what i am getting into. And about openFOAM , i also found it difficult and could not make it work. (I am not that intellegent i guess). 

July 19, 2010, 20:36 

#26  
New Member
Akinola
Join Date: Jul 2010
Posts: 25
Rep Power: 8 
Quote:
I did not take your advice the wrong way. In fact I fully understand it. My comments was because of nicoledc109 who mentioned it again and I even understand it. A professor in my school shares the same idea. I'm sorry if it sounds like that. I meant it as a joke. Hope you get my drift. Thanks 

July 19, 2010, 21:41 

#27  
Senior Member
Arjun
Join Date: Mar 2009
Location: Nurenberg, Germany
Posts: 484
Rep Power: 13 
Quote:
I am glad that you are type of person who does not cut corners. And it is nice that you are not afraid of working. It is good trait. Edited to remove typo. 

August 14, 2010, 01:01 

#28 
Member
Javed
Join Date: Mar 2010
Location: Mumbai,India
Posts: 32
Rep Power: 8 
Hi falopsy,
I am just completed writing NS code in cartesian and going to shift to cylindericals cordinates, the pbm is i dont know much abt cyl cordinates , its discretization methods and calculation of Coedd(aE,aW etc). Could u plz help me 1) is there any book or document which will clear my concepts regarding CFD in cyliderical cordinates. 2) i m so confude , dont know how to start, plz help me Thanks in advance Javed 

August 16, 2010, 14:57 

#29  
New Member
Akinola
Join Date: Jul 2010
Posts: 25
Rep Power: 8 
Quote:
the discretisation is quite similar to the one for rectangular coordinates just that the face areas and volume will no longer be constant as in rectangular coordinates. I was quite initially confused myself but you will find a 2D example in the book by Patankar (Numerical heat transfer and fluid flow) pp 7273. If you study that closely, you should easily derive the coefficients. I am so sorry for my late reply, I am very busy nowadays. hope this is not too late. 

August 17, 2010, 01:17 

#30 
Member
Javed
Join Date: Mar 2010
Location: Mumbai,India
Posts: 32
Rep Power: 8 
Thanks falopsy,
I will surely look into that. 

August 17, 2010, 04:05 

#31  
New Member
Louis le Grange
Join Date: Sep 2009
Posts: 9
Rep Power: 9 
Quote:
What are the advantages of having a finite volume code witten and discretized in cylindrical coordinates versus one in Cartesian coordinates? Is it about faster convergence when using cylindrical geometries? Can you comment on the comparisson of FV codes written in Cartesian coordinates compared to cylindrical coordinates for pipe flow with and without swirl? Thanks, Louis 

August 17, 2010, 13:35 

#32 
Member
private
Join Date: Mar 2009
Posts: 74
Rep Power: 9 
Folks above have asked for NS equations in cylindrical and spherical coordinates.
A classic text that (I think) is still in print is Bird, Stewart, and Lightfoot, "Transport Phenomena". It's aimed at Chemical Engineers, but Mechanical and Civil and many scientific disciplines will feel comfortable with it, especially graduate students. Good luck to all. 

August 17, 2010, 21:20 

#33  
Senior Member
Arjun
Join Date: Mar 2009
Location: Nurenberg, Germany
Posts: 484
Rep Power: 13 
Quote:
If the equations are discretisized in finite volume sense than you are only dealing with Area of face and cell to cell distance. Plus no cell center falls on cylindrical axis. In a way it is much more well behaved than the ones that involve 1/r terms. I wanted to avoid this 1/r related issue so discretized as finite volume and just like unstructured mesh. After i treated it as unstructured grid, i have access to lot of literature, more importantly peric's book which could help me with all my doubts. I can just follow this book and done with solver. There are two advantage of using Cartesian type meshes.: A) you can construct direct Poisson solvers on them by using FFT and tridiagonal algorithms or by using FFT and block cyclic reduction algorithms. B) If mesh is regular like cartsian mesh then searching a point inside it is easier than normal unstructured mesh. what it means is that if you are using immersed boundary type methods you could save good amount of time. Both points A and B impact efficiency very much. 

August 18, 2010, 10:48 
Advantages of using cylindrical coordinates

#34  
New Member
Louis le Grange
Join Date: Sep 2009
Posts: 9
Rep Power: 9 
Quote:
Thanks for your explanation  I am however very much and more interested in the advantages of working in cylindrical coordinates  so could you please elaborate on the reasons why you have decided to write a 3D FV code in cylindrical coordinates? What are the advantages over the Cartesian FV method  such codes are readily available, e.g. OpenFOAM? Thanks, Louis 

August 18, 2010, 17:29 

#35  
Senior Member
Arjun
Join Date: Mar 2009
Location: Nurenberg, Germany
Posts: 484
Rep Power: 13 
Quote:


August 19, 2010, 03:27 

#36 
New Member
Louis le Grange
Join Date: Sep 2009
Posts: 9
Rep Power: 9 
Quote:" There are two advantage of using Cartesian type meshes.:
A) you can construct direct Poisson solvers on them by using FFT and tridiagonal algorithms or by using FFT and block cyclic reduction algorithms. B) If mesh is regular like cartsian mesh then searching a point inside it is easier than normal unstructured mesh. what it means is that if you are using immersed boundary type methods you could save good amount of time. " end quote. Louis: Do you mean by the above: "There are two advantage of using structured type meshes"? I'm sorry Arjun  I think there is a misunderstanding or a type error  above you listed (A) and (B) as advantages of using a Cartesian type mesh  Do you really mean that A and B are advantages of a code written in cylindrical coordinates above a code written in Cartesian coordinates? A and B are advantages of a structured mesh  if I understand correctly. A code written by discretizing the NS equations in cylindrical coordinates can still be constructed structured or unstructed regarding your matrix array storing system. If you say that you have written a 3D cylindrical code I understand by that that you have written the NS equations in cylindrical coordinates and then discretized those equations and then implemented that into a code. My question is  why did you not considered the NS equations in Cartesian coordinates and discretized them  also on a structured grid. What are the particular advantages of discretizing the NS equations in cylindrical coordinates versus considering the Cartesian form of the NS equations? My guess is to handle swirl better in pipe flow  can you confirm this? Cylindrical coordinates has the ability to map a cake slice mesh into a rectangular mesh in the computational space... in effect taking out the problem of the thin wedge elements, which are not very friendly to Cartesian coordinate discretized solution methods  but again  this advantage only for swirl type flows? Please support or reject this notion? Kind regards, Louis 

August 21, 2010, 03:56 

#37  
Senior Member
Arjun
Join Date: Mar 2009
Location: Nurenberg, Germany
Posts: 484
Rep Power: 13 
Sorry Louis for confusing.
The reason for confusing other than me being not very clear is that use of word Cartesian mesh. many times this word is simply used to mean regular meshes of type NI x NJ x NZ, this means they could be cylindrical meshes, spherical or simple cartesian meshes. I used the word structured mesh to say this type of mesh. The second part of confusion is stemming from catesian system (x,y,z) and cylindrical system (r,theta, z). I am assuming that we are discussing solving navier stokes in cartesian system and in cylindrical system. What i have been saying that cylindrical mesh of type NI x NJ x NZ where NI NJ and NZ are distributions in r , theta and z could be solved in Cartesian system (x,y,z) if we just treat them as untructured meshes (again in (x,y,z) system). So even though mesh is given in r,theta,z variables are stored as Ux,Uy, Uz and pressure as opposed to Ur, Utheta, Uz and pressure of cylindrical system. Further Quote:
I mean that if the meshes are in NI x NJ x NZ format (Cartesian , spherical and cylindrical) direct poisson solvers could be constructed. So while descretization is handles as unstructured mesh pressure correction or pressure equation could be directly solved by such solvers. Quote:
Quote:
Sorry for confusion though. 

October 14, 2010, 07:11 

#38  
Senior Member
Join Date: Apr 2009
Posts: 118
Rep Power: 9 
Quote:
I followed Patankar's method for spherical coordinates (the method seems similar to cylindrical) to a spherically symmetric system. The NavierStokes equations in cylindrical and spherical coordinates have extra terms for which there is no analogue in the Cartesian case. I treated these geometric terms as part of my source term. Is this what you did as well? For a spherically symmetric system someone suggested applying the FVM to the full NS equations. When I do this I don't get these extra source terms (for 1D). Is this correct? What I mean by this is that for the coordinate independent form of the NS equations you integrate it over a volume and then apply the divergence theorem and carry on in this way. 

October 14, 2010, 10:16 

#39 
Member
Javed
Join Date: Mar 2010
Location: Mumbai,India
Posts: 32
Rep Power: 8 
@ lost.identity
Handle those extra terms as source terms only. But if u take the integration of conservative form of the governing equations, u wont get any of the extra term.This is wat i have done in my code. 

October 14, 2010, 18:24 

#40  
Senior Member
Join Date: Apr 2009
Posts: 118
Rep Power: 9 
Quote:
Once I integrate the conversation laws I get the following standar equation after applying the divergence theorem where F are the flux terms collected together. 

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 