CFD Online Discussion Forums

CFD Online Discussion Forums (https://www.cfd-online.com/Forums/)
-   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)

luca March 29, 2006 03:43

Hi all, I try to build in O
 
Hi 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

hjasak March 29, 2006 10:01

In this case, the fluxes you'v
 
In 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

luca March 29, 2006 10:47

Hi Hrv, I know the operator
 
Hi 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:24.