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 The time-step is computed locally so that the local Courant number
29 does not exceed the specified value.
38 \*---------------------------------------------------------------------------*/
40 #ifndef localTimeStep_H
41 #define localTimeStep_H
44 #include "basicThermo.H"
45 #include "turbulenceModel.H"
47 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
52 /*---------------------------------------------------------------------------*\
53 Class localTimeStep Declaration
54 \*---------------------------------------------------------------------------*/
63 // Reference to primitive fields
66 const volVectorField& U_;
68 //- Reference to the thermophysicalModel
69 const basicThermo& thermo_;
71 //- Reference to the turbulenceModel
72 const compressible::turbulenceModel& turbModel_;
75 //- CFL number limited local time step field
76 volScalarField CoDeltaT_;
79 // Private Member Functions
81 //- Disallow default bitwise copy construct
82 localTimeStep(const localTimeStep&);
84 //- Disallow default bitwise assignment
85 void operator=(const localTimeStep&);
92 //- Construct from mesh and Istream
95 const volVectorField& U,
96 const basicThermo& thermo,
97 compressible::turbulenceModel& turbModel
103 //- Return mesh reference
104 const fvMesh& mesh() const
109 //- Return the Courant-number limited time-step
110 const volScalarField& CoDeltaT() const
115 //- Update the local deltaT field
116 // and adjust it to the minimum value optionally
117 void update(const scalar maxCo, const bool adjustTimeStep = false);
121 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
123 } // End namespace Foam
126 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
130 // ************************************************************************* //