CFD Online Discussion Forums

CFD Online Discussion Forums (https://www.cfd-online.com/Forums/)
-   OpenFOAM Programming & Development (https://www.cfd-online.com/Forums/openfoam-programming-development/)
-   -   compressible and incompressible twophaseeulerfoam's UEqn is the same? (https://www.cfd-online.com/Forums/openfoam-programming-development/146463-compressible-incompressible-twophaseeulerfoams-ueqn-same.html)

sharonyue December 29, 2014 06:05

compressible and incompressible twophaseeulerfoam's UEqn is the same?
 
2 Attachment(s)
Hi guys,

right now I was comparing the codes of openfoam 22x and 23x. cuz it provides different result. see more details here:

http://www.cfd-online.com/Forums/ope...ty-result.html

For now lets discuss the codes for openfoam 22x.

I found that the UEqn in twophaseeulerfoam and compressibleTwoPhaseEulerFoam is the same...

this formula is for compressibletwophaseeulerfoam:
http://www.cfd-online.com/Forums/att...1&d=1419849942

this is for incompressible:
http://www.cfd-online.com/Forums/att...1&d=1419849942

So the difference is that incompressible's UEqn are multiplied with alpha_1 and the density is reduced.

what confuse me is that both solvers use this incompreesible velocity equation.


if we neglect the R.H.S of the equation. this is twophaseEulerFoam:
Code:

U1Eqn =
        (
           
                fvm::ddt(U1)
              + fvm::div(phi1, U1, "div(phi1,U1)")
              - fvm::Sp(fvc::div(phi1), U1)

          - fvm::laplacian(nuEff1, U1)
          + fvc::div(Rc1)

          + fvm::div(phiR1, U1, "div(phi1,U1)")
          - fvm::Sp(fvc::div(phiR1), U1)
          + (fvc::grad(alpha1)/(fvc::average(alpha1) + scalar(0.001)) & Rc1)
        ==

compressibleTwoPhaseEulerFoam:
Code:

U1Eqn =
        (
            fvm::ddt(alpha1, U1)
          + fvm::div(alphaPhi1, U1)
          - fvm::Sp(fvc::ddt(alpha1) + fvc::div(alphaPhi1), U1)

          - fvm::laplacian(alpha1*nuEff1, U1)
          + fvc::div(alpha1*Rc1)
        ==

        );

if we do some rearrangements(multiply alpha1 in the incompressible UEqn), we can see this is the same:confused::confused::confused:

so does that mean in compressible two fluid model this density can also be reduced? or?

Thanks!


All times are GMT -4. The time now is 22:20.