solveSolid.H 789 Bytes
Newer Older
1
2
3
4
5
if (finalIter)
{
    mesh.data::add("finalIteration", true);
}

6
7
8
{
    for (int nonOrth=0; nonOrth<=nNonOrthCorr; nonOrth++)
    {
9
        tmp<fvScalarMatrix> hEqn
10
        (
11
            fvm::ddt(betav*rho, h)
12
13
14
          - (
               thermo.isotropic()
             ? fvm::laplacian(betav*thermo.alpha(), h, "laplacian(alpha,h)")
15
             : fvm::laplacian(betav*taniAlpha(), h, "laplacian(alpha,h)")
16
            )
17
          ==
18
            fvOptions(rho, h)
19
        );
20

21
        hEqn().relax();
22

23
        fvOptions.constrain(hEqn());
24

25
        hEqn().solve(mesh.solver(h.select(finalIter)));
26

27
        fvOptions.correct(h);
28
29
    }
}
30
31
32

thermo.correct();

33
34
Info<< "Min/max T:" << min(thermo.T()) << ' ' << max(thermo.T()) << endl;

35
36
37
38
if (finalIter)
{
    mesh.data::remove("finalIteration");
}