Simple velocity correction difference between ussing grad(p) or pEqn.flux()
Hi all.
In the SIMPLE algorithm, after solving the pEqn laplacian equation the velocity is corrected like this : Code:
U = HbyA - rAU*fvc::grad(p); In some other solvers i may see this like this : Code:
U = HbyA + rAU*fvc::reconstruct((-pEqn.flux())/rAUf); According to some of my quick tests these 2 ways provide the same U field. For me the first form is close to the analytical developpement starting with MU = AU - H = - ∇p Thus I don't realy undertand why the second form is working. In which form the pEqn.flux is linked to the gradient of pressure ? Thanks for your help. |
I don't recognise the second bit of coding you have included in your posting. Maybe it's a better idea to copy the exact coding from the solvers you are interested in, and tell us which ones?
It's fairly standard practice in the solvers to see something like the following: Code:
phi = phiHbyA - pEqn.flux(); |
Thanks for your explanation. The second statement is from a custom solver of my advisor.
I've found the same way here in compressibleInterFoam: https://github.com/OpenFOAM/OpenFOAM...terFoam/pEqn.H line 141. But I'm now convinced why your recall on the fact that a gradient Gauss discretization involve face fluxes. You answered my question. |
All times are GMT -4. The time now is 16:27. |