about phi in fvm::div(phi,U)
hi,
I am new in openfoam. When reading codes, I can't understand the phi in fvm::div(phi, U). It stands for △·(UU), why don't we write as fvm::div(U, U) and what does phi means exactly. thanks a lot |
Hi,
phi is actually the flux through the cells (so it is not a volVectorField, but a surfaceScalarField). For incompressible solver phi=U, but in case of compressible flows, phi=rho*U. This is why phi is used, you only change its definition in createFields. |
thx very much~~
|
By the way, your equation is wrong. Be careful with laplacian and nabla!
@agustinvo, you missed the face area! |
Quote:
|
Not 100 % or you did not write it carefully.
First of all, the fluxes are different compared to the velocities as its on the surface and not in the cell center. You are right, the fluxes are created (firstly) by the actual velocities, after constructing the velocity matrix (momentum predictor is not needed), we solve the pressure equation which gives us the correction of the fluxes. These correction are used to recalculate the new velocity field. The flux calculation might be repeated even though, the velocity matrix is not re-built (updated) only the velocities. See, A and H operator. We repeat until the solution is satisfied and the continuity is fine. This is mainly PISO + non-Ortho correctors. In PIMPLE we also update the velocity matrix. Cheers. |
Quote:
Suppose we have an equation which is not non-linear. In that case, would it be incorrect to calculate the flux before the momentum predictor step? Say it is a linear PDE (coupled, similar to NSE). I would assume that we do not need the flux calculation before momentum predictor since there is no requirement to handle non-linearity. By making this flux calculation from existing velocity, the flux Correction after the pressure equation solution will be applied to the previous iteration flux, not the current one. In such a case, would it be correct to add the flux calculation AFTER momentum predictor step? |
All times are GMT -4. The time now is 06:25. |