Initial commit for version 2.0.x patch release
[OpenFOAM-2.0.x.git] / applications / solvers / multiphase / interFoam / porousInterFoam / UEqn.H
blob155c0527b7338035d444a03f97cf52cef2924e3b
1     surfaceScalarField muEff
2     (
3         "muEff",
4         twoPhaseProperties.muf()
5       + fvc::interpolate(rho*turbulence->nut())
6     );
8     // Calculate and cache mu for the porous media
9     volScalarField mu(twoPhaseProperties.mu());
11     fvVectorMatrix UEqn
12     (
13         //pZones.ddt(rho, U)
14         fvm::ddt(rho, U)
15       + fvm::div(rhoPhi, U)
16       - fvm::laplacian(muEff, U)
17       - (fvc::grad(U) & fvc::grad(muEff))
18     //- fvc::div(muEff*(fvc::interpolate(dev(fvc::grad(U))) & mesh.Sf()))
19     );
21     UEqn.relax();
23     pZones.addResistance(UEqn);
25     if (pimple.momentumPredictor())
26     {
27         solve
28         (
29             UEqn
30          ==
31             fvc::reconstruct
32             (
33                 (
34                     fvc::interpolate(interface.sigmaK())*fvc::snGrad(alpha1)
35                   - ghf*fvc::snGrad(rho)
36                   - fvc::snGrad(p_rgh)
37                 ) * mesh.magSf()
38             )
39         );
40     }