delete uncleaned files from test case
[ShipHydroSIG.git] / src / navalFoamVariant2 / UEqn.H
blob17f1fa8df605cf5af9564f0484d42ae746edba21
1     surfaceScalarField nuEff
2     (
3         "nuEff",
4         twoPhaseProperties.nuf()
5       + fvc::interpolate(turbulence->nut())
6     );
8     // Convection term to be added separately, depending on singlePhase switch
9     // HJ, 4/Aug/2008
10     fvVectorMatrix UEqn
11     (
12         fvm::ddt(U)
13       - fvm::laplacian(nuEff, U)
14       - (fvc::grad(U) & fvc::grad(nuEff))
15       ==
16       - alpha1*fvm::Sp(beach.damping(), U)
17     );
20     Switch singlePhase(pimple.lookup("singlePhase"));
22     if (singlePhase)
23     {
24         UEqn += pos(alpha1 - 0.1)*fvm::div(phi, U);
25 //         UEqn += alpha1*fvm::div(phi, U);
26     }
27     else
28     {
29         UEqn += fvm::div(phi, U);
30     }
32     if (oCorr == nOuterCorr - 1)
33     {
34         UEqn.relax(1);
35     }
36     else
37     {
38         UEqn.relax();
39     }
41     solve
42     (
43         UEqn
44      ==
45         fvc::reconstruct
46         (
47             (
48                 fvc::interpolate(interface.sigmaK())*fvc::snGrad(alpha1)
49               - ghf*fvc::snGrad(rho)
50               - fvc::snGrad(pd)
51             )*mesh.magSf()
52         )/rho
53     );
55     if (singlePhase)
56     {
57         U *= pos(alpha1 - 0.1);
58         U.correctBoundaryConditions();
59     }