Dear Gilles,
This is quite a good idea; I believe artificial compressibility may even have originally been developed as a false-transient method of enforcing incompressibility (though I don't have access to Chorin's paper at the moment). While it might be possible to adapt and re-use the infrastructure of class ddt as commonly used in the transient solvers distributed with OpenFOAM, such as laplacianFOAM, that wouldn't be necessary in this case. Instead, I presume one would really only contemplate using backward-Euler integration for the false transient, so all that would be required is to set up two lots of variables for the unknowns, e.g. add pold for the pressure, defined just like your original pressure variable. Then formulate the backward-Euler step equation for your pseudo-time, and each pseudo-timestep, solve these for the new unknowns in terms of the old and then copy the new to the old, repeating till converged within a tolerance (or whatever). Implement this as a standard C++ while-loop, inside the real time-stepping loop. (Again, there are facilities in the OpenFOAM library to support iteration, but it's by no means necessary to use them if you haven't learned them, as nothing too complicated is required here.) Hope this helps. |
Artificial Compressibility
Can anyone explain me for noobs what is artificial compressibility?
lg Stefan |
All times are GMT -4. The time now is 08:47. |