CFD Online Discussion Forums

CFD Online Discussion Forums (http://www.cfd-online.com/Forums/)
-   OpenFOAM (http://www.cfd-online.com/Forums/openfoam/)
-   -   rhoPimpleFoam/rhoPisoFoam-compressible flows (http://www.cfd-online.com/Forums/openfoam/95251-rhopimplefoam-rhopisofoam-compressible-flows.html)

achinta December 11, 2011 11:41

rhoPimpleFoam/rhoPisoFoam-compressible flows
 
Hi all,
I would like to learn about rhoPimple/rhoPisoFoam code. I have few questions.

1) The code solves rhoEqn first. Then it solves UEqn and hEqn. pEqn is solved at the end. Is it necessary to follow this order. Could we solve rhoEqn and other equations like scalar transport eqn after pEqn?

2)What is 'psi' in the pEqn of rhoPimple/PisoFoam? Could we directly use fvc::ddt(rho) instead of fvm::ddt(psi,p)? Whats the advantage of using the latter notation?

Thank you,
AV

Linse December 12, 2011 06:29

I am not too deep into the particular solvers, but my take on the questions is:

1) It depends if the equations included later depend on the equations included before. If you see any reference to any part of the previous equations, it MIGHT be problematic for the equation to find the preconditions.
If there is no reference to the other equations, from the side of the solver there should not really be a problem.
But maybe that problem does not exist at all if the compiler deals fine with that problem. Just give it a try!

2) If I remember correctly, psi has to do with the flux and already contains division by time. So if I am right you would have a different dimensionset for the approach you offer, which - given OpenFOAM's dimensionality control - would cause the simulation to fail due to conflicting dimensionsets on the different equation terms.
Even if I am wrong on the resulting dimensionset (which is quite possible!), you need to be sure it doesn't matter if you define an explicit or an implicit equation term, because once you use fvm(ethod) and the other time fvc(alculus)...


Sorry for not giving perfect answers, but I guess at least I am pointing out some directions that might be helpful. ;-)

hz283 December 19, 2012 18:57

If I didnot make s mistake, the density for output in rhoPimpleEqn is from thermo.rho(). So here why is the rhoEqn should be solved? Just for correction? Does anybody know something about this?

Thank you!

kalle December 20, 2012 16:21

fvc::ddt(rho) would be an explicit formulation of the density derivative. You want something implicit, as you want to find pressure at the new timestep, such that continuity equation is fulfilled. rho is however equal to p*psi (for ideal gas, and where psi is compressibility). By writing fvm::ddt(psi, p) (which means implicit time derivative of the product of p and psi) you can get density at the new time step's pressure. You cannot, for instance, write fvm::ddt(rho), as the linear solver would not know how to get density at the new time step, while it does know how to get psi*p, as psi is a constant, while p at the new time step is the variable solved for (iteratively).

Hope it is a bit more clear,
K

hz283 December 20, 2012 16:33

Hi Kalle,

Thank you so much for your reply. but what do you mean by 'the linear solver would not know how to get density at the new time step'? Could you please write more about this? Thank you in advance.

Merry Christmas!
h

kalle December 21, 2012 03:11

The solver is solving to find p at the new time step. Rho at that time step is not known yet, as it depends on p. The solver can however still caluclate the ddt(rho) implicitly, as rho=p*psi, which consists of know quantities (psi) and the quantity solved for (p)

K

hz283 December 21, 2012 09:07

Hi Kalle,

Thank you very much for your reply. About the rhoPimpleFoam, based on the method that the density is updated, i.e. rho=pressure/(RT). As far as I know, this pressure for the EoS is from Poission equation, so this is the hydrodynamc pressure. From this point, rhoPimpleFoam is a fully compressible solver. However, when it solves the governing for rho, rho*U, it seems that it still use the Simple or Piso method, they are methods for incompressible flows. I am a little confused about this. Can you give any comments about this?

Merry Xmas!


All times are GMT -4. The time now is 23:27.