1 /*---------------------------------------------------------------------------*\
3 \\ / F ield | foam-extend: Open Source CFD
4 \\ / O peration | Version: 3.2
5 \\ / A nd | Web: http://www.foam-extend.org
6 \\/ M anipulation | For copyright notice see file Copyright
7 -------------------------------------------------------------------------------
9 This file is part of foam-extend.
11 foam-extend 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 3 of the License, or (at your
14 option) any later version.
16 foam-extend is distributed in the hope that it will be useful, but
17 WITHOUT ANY WARRANTY; without even the implied warranty of
18 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
19 General Public License for more details.
21 You should have received a copy of the GNU General Public License
22 along with foam-extend. If not, see <http://www.gnu.org/licenses/>.
28 Density-based compressible explicit time-marching flow solver
29 using enthalpy-based thermo packages
34 \*---------------------------------------------------------------------------*/
37 #include "basicPsiThermo.H"
38 #include "turbulenceModel.H"
42 #include "rusanovFlux.H"
44 #include "MDLimiter.H"
45 #include "firstOrderLimiter.H"
46 #include "BarthJespersenLimiter.H"
47 #include "VenkatakrishnanLimiter.H"
48 #include "numericFlux.H"
50 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
52 int main(int argc, char *argv[])
54 # include "setRootCase.H"
55 # include "createTime.H"
56 # include "createMesh.H"
57 # include "createFields.H"
59 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
61 Info<< "\nStarting time loop\n" << endl;
63 // Runge-Kutta coefficient
72 # include "readTimeControls.H"
73 # include "readFieldBounds.H"
74 # include "compressibleCourantNo.H"
75 # include "setDeltaT.H"
79 Info<< "\n Time = " << runTime.value() << endl;
81 // Switch off solver messages for diagonal solver RK
84 // Low storage Runge-Kutta time integration
87 // Solve the approximate Riemann problem for this time step
88 dbnsFlux.computeFlux();
93 1.0/beta[i]*fvm::ddt(rho)
94 + fvc::div(dbnsFlux.rhoFlux())
99 1.0/beta[i]*fvm::ddt(rhoU)
100 + fvc::div(dbnsFlux.rhoUFlux())
101 + fvc::div(turbulence->devRhoReff())
106 1.0/beta[i]*fvm::ddt(rhoE)
107 + fvc::div(dbnsFlux.rhoEFlux())
108 + fvc::div(turbulence->devRhoReff() & U)
109 - fvc::laplacian(turbulence->alphaEff(), h)
112 # include "updateFields.H"
115 // Switch on solver messages for turbulence
116 lduMatrix::debug = 1;
118 turbulence->correct();
122 Info<< " ExecutionTime = "
123 << runTime.elapsedCpuTime()
133 // ************************************************************************* //