
[Sponsors] 
December 22, 2010, 06:19 
The Artificial Compressibility Method

#1 
New Member
nsreddy
Join Date: Sep 2010
Posts: 27
Rep Power: 5 
hi Foamers,
I am trying to use compressible flow solvers ( like Roe Scheme and Riemann solver based schemes ) for solving incompressible flows. My Problem is how to write a code for the above problem in OpenFOAM using artificial compressibility method. can anybody please send me a format of the code. My email id is "nsreddysrsit@gmail.com". thanks in advance. With Regards N.S. Reddy, 

December 22, 2010, 08:08 

#2 
Senior Member
Nakul
Join Date: Apr 2010
Location: India
Posts: 147
Rep Power: 6 
Hi,
What do you mean by the "format" of the code? If you are asking about the way you can implement your written line into OF then have a look at the solvers in "applications" folder. You should be well versed with C++ to understand it. The solvers there would give you an idea about the way you may write your code to integrate it into OF. Moreover you may pick up anyone of those solvers and modify it. 

December 22, 2010, 23:32 

#3  
New Member
nsreddy
Join Date: Sep 2010
Posts: 27
Rep Power: 5 
Quote:
what i mean to say is whatever available algorithm in openfoam is SIMPLE algorithm(Pressure correction Method). I need to write a code for new algorithm using Artificial Compressibility method. is it possible to implement SIMPLE algorithm or i need to write a new code. Regards, N. S. Reddy 

December 23, 2010, 09:36 

#4 
Senior Member
Nakul
Join Date: Apr 2010
Location: India
Posts: 147
Rep Power: 6 
Hi,
I still can't understand as to what you are trying to do exactly. If you want to implement some equations you may post them here (or some reference material/theory) and I would have a look. From what you have written, all I can say is that OF is quite flexible and you can implement both SIMPLE algorithm and can implement your own specific algorithm, if you want to. 

December 23, 2010, 19:14 

#5 
Senior Member
Arjun
Join Date: Mar 2009
Location: Nurenberg, Germany
Posts: 353
Rep Power: 9 
First I am not openFOAM user and thus am not aware of its details. I am replying because you haven't got any helpful reply from openfoam users.
my impression is that openFOAM is pressure based solver. It means that you can not convert it into the type of solver you want to write. (Even if it might be possible by some means it would be a great amount of work). In the same amount you can write a fresh solver. Here is one book you should consult : Riemann Solvers and Numerical Methods for Fluid Dynamics. E. F. Toro. I have it here in library as hard copy and i can tell you by reading it you will get lot of help writing code. Other than that basic idea of artificial compressibility is this. In a incompressible navier stokes solver, pressure equation that is solved for continuity is elliptic. The biggest problem with this type of equation is that matrix solver does not converge easily. But if someway diagonal dominance is increased it would converge rapidly. So lets add a term to pressure equation: (1/beta) dP/dt here beta = artificial compressibility parameter , dt is your time step. Beauty of this method is that now equation is not only diagonal dominant but some methods like approaximate factorization could be applied to it. For example ADI. This is only and outline there are lot more of details that books would tell you. 

December 24, 2010, 10:12 

#6 
Senior Member
Nakul
Join Date: Apr 2010
Location: India
Posts: 147
Rep Power: 6 
Hi Arjun,
You are right in saying that most of the solvers in OF are pressure based. But there is a package there which has Riemann Solvers also. Its called AeroFOAM and can be easily found by googling for it. If by "adding artificial compressibility", it is meant that the changes to be made are just to the level mentioned above then its quite easy to make these changes without much effort. You just need to define this parameter, them make changes to NS equations and recompile the solver. 

January 3, 2011, 01:06 

#7  
New Member
nsreddy
Join Date: Sep 2010
Posts: 27
Rep Power: 5 
Quote:
thanks for your kind information and you are exactly correct. Is there any source code readily available for Artificial Compressibility method for any type of test case rather than writing a code for a new solver. 

Thread Tools  
Display Modes  


Similar Threads  
Thread  Thread Starter  Forum  Replies  Last Post 
The Artificial Compressibility Method  nsreddysrsit  OpenFOAM  0  December 20, 2010 01:14 
the artificial compressibility method  nsreddysrsit  OpenFOAM  1  December 19, 2010 08:19 
Artificial compressibility method for free surface  A.M.Yang  Main CFD Forum  0  October 4, 2008 05:05 
Artificial Compressiblity Method  KK.Khan  Main CFD Forum  1  August 20, 2006 00:05 
about artificial compressibility method  Jerry  Main CFD Forum  1  August 4, 2003 23:35 