initial commit for version 1.6.x patch release
[OpenFOAM-1.6.x.git] / tutorials / lagrangian / rhoPisoTwinParcelFoam / rhoPisoTwinParcelFoam / rhoPisoTwinParcelFoam.C
blobb20e73b487ee743bf0ee6fe7a1faeb7a2243558c
1 /*---------------------------------------------------------------------------*\
2   =========                 |
3   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
4    \\    /   O peration     |
5     \\  /    A nd           | Copyright (C) 1991-2009 OpenCFD Ltd.
6      \\/     M anipulation  |
7 -------------------------------------------------------------------------------
8 License
9     This file is part of OpenFOAM.
11     OpenFOAM is free software; you can redistribute it and/or modify it
12     under the terms of the GNU General Public License as published by the
13     Free Software Foundation; either version 2 of the License, or (at your
14     option) any later version.
16     OpenFOAM is distributed in the hope that it will be useful, but WITHOUT
17     ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
18     FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
19     for more details.
21     You should have received a copy of the GNU General Public License
22     along with OpenFOAM; if not, write to the Free Software Foundation,
23     Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
25 Application
26     rhoPisoTwinParcelFoam
28 Description
29     Transient solver for compressible, turbulent flow with two thermo-clouds.
31 \*---------------------------------------------------------------------------*/
33 #include "fvCFD.H"
34 #include "basicPsiThermo.H"
35 #include "turbulenceModel.H"
37 #include "basicThermoCloud.H"
38 #include "basicKinematicCloud.H"
40 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
42 int main(int argc, char *argv[])
44     #include "setRootCase.H"
46     #include "createTime.H"
47     #include "createMesh.H"
48     #include "readGravitationalAcceleration.H"
49     #include "createFields.H"
50     #include "createClouds.H"
51     #include "readPISOControls.H"
52     #include "initContinuityErrs.H"
53     #include "readTimeControls.H"
54     #include "compressibleCourantNo.H"
55     #include "setInitialDeltaT.H"
57     // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
59     Info<< "\nStarting time loop\n" << endl;
61     while (runTime.run())
62     {
63         #include "readTimeControls.H"
64         #include "readPISOControls.H"
65         #include "compressibleCourantNo.H"
66         #include "setDeltaT.H"
68         runTime++;
70         Info<< "Time = " << runTime.timeName() << nl << endl;
72         thermoCloud1.evolve();
73         thermoCloud1.info();
75         kinematicCloud1.evolve();
76         kinematicCloud1.info();
79         #include "rhoEqn.H"
81         // --- PIMPLE loop
82         for (int ocorr=1; ocorr<=nOuterCorr; ocorr++)
83         {
84             #include "UEqn.H"
86             // --- PISO loop
87             for (int corr=1; corr<=nCorr; corr++)
88             {
89                 #include "hEqn.H"
90                 #include "pEqn.H"
91             }
92         }
94         turbulence->correct();
96         rho = thermo.rho();
98         runTime.write();
100         Info<< "ExecutionTime = " << runTime.elapsedCpuTime() << " s"
101             << "  ClockTime = " << runTime.elapsedClockTime() << " s"
102             << nl << endl;
103     }
105     Info<< "End\n" << endl;
107     return 0;
111 // ************************************************************************* //