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/)
-   -   Hi,I have a question about momentum equation in interFoam (https://www.cfd-online.com/Forums/openfoam-programming-development/111631-hi-i-have-question-about-momentum-equation-interfoam.html)

shchao January 11, 2013 09:19

Hi,I have a question about momentum equation in interFoam
 
Dear Foamers:
I have read Henrik Rusche's phd thesis.Now i meet a question in the momentum equation of interFoam. Mr. Rusche defined an 'H' operator AH=As-An*phi where 'As' means source vector.Does As include the item like -grad(p)-g*x*grad(rho)...?Or What included in As?Thank you very much!

fumiya January 13, 2013 05:59

Take a look at the interFoam/UEqn.H:

Code:

    fvVectorMatrix UEqn
    (
        fvm::ddt(rho, U)
      + fvm::div(rhoPhi, U)
      + turbulence->divDevRhoReff(rho, U)
    ==
        sources(rho, U)
    );

In the case of UEqn.H(), 'H' operator is constructed from the above
fvVectorMatrix UEqn. In the above definition of UEqn, there is no
terms corresponding to grad(p) and g*x*grad(rho), so these terms
are not included in the H operator in the interFoam solver.

Fumiya

shchao January 14, 2013 07:47

Here's the UEqn.H in of 2.1.1

surfaceScalarField muEff
(
"muEff",
twoPhaseProperties.muf()
+ fvc::interpolate(rho*turbulence->nut())
);
fvVectorMatrix UEqn
(
fvm::ddt(rho, U)
+ fvm::div(rhoPhi, U)
- fvm::laplacian(muEff, U)
- (fvc::grad(U) & fvc::grad(muEff))
//- fvc::div(muEff*(fvc::interpolate(dev(fvc::grad(U)) ) & mesh.Sf()))
);
UEqn.relax();
if (pimple.momentumPredictor())
{
solve
(
UEqn
==
fvc::reconstruct
(
(
fvc::interpolate(interface.sigmaK())*fvc::snGrad(a lpha1)
- ghf*fvc::snGrad(rho)
- fvc::snGrad(p_rgh)
) * mesh.magSf()
)
);
}

The H operator is constructed by :
fvVectorMatrix UEqn
(
fvm::ddt(rho, U)
+ fvm::div(rhoPhi, U)
- fvm::laplacian(muEff, U)
- (fvc::grad(U) & fvc::grad(muEff))
//- fvc::div(muEff*(fvc::interpolate(dev(fvc::grad(U)) ) & mesh.Sf()))
);

Right?

fumiya January 15, 2013 07:26

I think so.

Fumiya

santiagomarquezd January 28, 2013 21:27

Hi, the H operator gives which is defined in Hrv thesis for the implicit terms used in the fvVectorMatrix declaration.

Regards.

behzad-cfd November 13, 2017 11:05

Quote:

Originally Posted by shchao (Post 401724)
Here's the UEqn.H in of 2.1.1

surfaceScalarField muEff
(
"muEff",
twoPhaseProperties.muf()
+ fvc::interpolate(rho*turbulence->nut())
);
fvVectorMatrix UEqn
(
fvm::ddt(rho, U)
+ fvm::div(rhoPhi, U)
- fvm::laplacian(muEff, U)
- (fvc::grad(U) & fvc::grad(muEff))
//- fvc::div(muEff*(fvc::interpolate(dev(fvc::grad(U)) ) & mesh.Sf()))
);
UEqn.relax();
if (pimple.momentumPredictor())
{
solve
(
UEqn
==
fvc::reconstruct
(
(
fvc::interpolate(interface.sigmaK())*fvc::snGrad(a lpha1)
- ghf*fvc::snGrad(rho)
- fvc::snGrad(p_rgh)
) * mesh.magSf()
)
);
}

The H operator is constructed by :
fvVectorMatrix UEqn
(
fvm::ddt(rho, U)
+ fvm::div(rhoPhi, U)
- fvm::laplacian(muEff, U)
- (fvc::grad(U) & fvc::grad(muEff))
//- fvc::div(muEff*(fvc::interpolate(dev(fvc::grad(U)) ) & mesh.Sf()))
);

Right?

Hi,
I've a question about momentum equation of interFoam. why Area (mesh.magSf()) is multiplied to RHS of equation?

Tobi December 18, 2017 17:34

This is based on the divergence operator. We interpolate the deviatoric part of grad(U) to the face and have to multiply it with the surface normal vector (area of the face). As it is given in Hrv thesis, the divergence is approximately the sum of fluxes through the faces.

behzad-cfd December 18, 2017 17:40

Quote:

Originally Posted by Tobi (Post 675490)
This is based on the divergence operator. We interpolate the deviatoric part of grad(U) to the face and have to multiply it with the surface normal vector (area of the face). As it is given in Hrv thesis, the divergence is approximately the sum of fluxes through the faces.

Thanks for your great answer Tobias. I''ll read the harvoj jasak's thesis for further information.

Regards,


All times are GMT -4. The time now is 12:13.