- **OpenFOAM Running, Solving & CFD**
(*https://www.cfd-online.com/Forums/openfoam-solving/*)

- - **Update Fluxes**
(*https://www.cfd-online.com/Forums/openfoam-solving/60268-update-fluxes.html*)

Hi all,
I try to build in OHi all,
I try to build in OpenFOAM a pressure based algorithm for prediciting flows at all speed. I formulate pressure equation in term of pressure-correction like in original SIMPLE procedure. After I've solved pressure-correction equation i need to update fluxes in order to satisfy local continuity equation. I use this empirical formulation after I've corrected volScalarField "rho", "p" and "U": -- p.correctBoundaryConditions(); phi = fvc::interpolate(rho*U) & mesh.Sf(); phi.boundaryField() = ( rho.boundaryField()*U.boundaryField() ) & mesh.Sf().boundaryField(); -- Is it right?! This procedure works but I'm not sure about that.. Thanks in advance at all OpenFOAM users |

In this case, the fluxes you'vIn this case, the fluxes you've got are not conservative, unless you are very very careful with all the details on interpolation and consistency between the face flux formula in the pressure equation and the interpolation of rho*U on the face (and the expression above says you're not) :-)
Try using pEqn.flux() - if the p equation has been formed correctly, you will get the consistent and conservative flux from it. For details of what flux() member function does, have a dig through the archive or the source code. Enjoy, Hrv |

Hi Hrv,
I know the operatorHi Hrv,
I know the operator pEqn.flux(), in my case I use fvScalarMatrix "pEqn" to solve pressure correction scalar only. Following the Peric's formulation for compressible flows I need to correct the fluxes also with explicitly density corrector. Does pEqn.flux() work properly in this case!? I hope you can help me another time Luca |

All times are GMT -4. The time now is 11:09. |