- **OpenFOAM**
(*https://www.cfd-online.com/Forums/openfoam/*)

- - **The Artificial Compressibility Method**
(*https://www.cfd-online.com/Forums/openfoam/83286-artificial-compressibility-method.html*)

The Artificial Compressibility Methodhi 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, |

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. |

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 |

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. |

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. |

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 N-S equations and recompile the solver. |

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. |

All times are GMT -4. The time now is 02:52. |