Remove trailing whitespace systematically
[foam-extend-3.2.git] / applications / solvers / multiSolver / multiSolverDemo / solverIcoFoam.H
blob1fedb60d0324a4cf13a62c2a6e345f456e857fcd
2 #   include "createTime.H"
3 #   include "createMesh.H"
4 #   include "createFields_icoFoam.H"
5 #   include "initContinuityErrs.H"
7 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
9     Info<< "\nStarting time loop\n" << endl;
11     for (runTime++; !runTime.end(); runTime++)
12     {
13         Info<< "Time = " << runTime.timeName() << nl << endl;
15 #       include "readPISOControls.H"
16 #       include "CourantNo.H"
18         fvVectorMatrix UEqn
19         (
20             fvm::ddt(U)
21           + fvm::div(phi, U)
22           - fvm::laplacian(nu, U)
23         );
25         solve(UEqn == -fvc::grad(p));
27         // --- PISO loop
29         for (int corr=0; corr<nCorr; corr++)
30         {
31             volScalarField rUA = 1.0/UEqn.A();
33             U = rUA*UEqn.H();
34             phi = (fvc::interpolate(U) & mesh.Sf())
35                 + fvc::ddtPhiCorr(rUA, U, phi);
37             adjustPhi(phi, U, p);
39             for (int nonOrth=0; nonOrth<=nNonOrthCorr; nonOrth++)
40             {
41                 fvScalarMatrix pEqn
42                 (
43                     fvm::laplacian(rUA, p) == fvc::div(phi)
44                 );
46                 pEqn.setReference(pRefCell, pRefValue);
47                 pEqn.solve();
49                 if (nonOrth == nNonOrthCorr)
50                 {
51                     phi -= pEqn.flux();
52                 }
53             }
55 #           include "continuityErrs.H"
57             U -= rUA*fvc::grad(p);
58             U.correctBoundaryConditions();
59         }
61         runTime.write();
63         Info<< "ExecutionTime = " << runTime.elapsedCpuTime() << " s"
64             << "  ClockTime = " << runTime.elapsedClockTime() << " s"
65             << nl << endl;
66     }
68     Info<< "End\n" << endl;