Euler.H
Go to the documentation of this file.
1/*---------------------------------------------------------------------------*\
2 ========= |
3 \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
4 \\ / O peration |
5 \\ / A nd | www.openfoam.com
6 \\/ M anipulation |
7-------------------------------------------------------------------------------
8 Copyright (C) 2011-2017 OpenFOAM Foundation
9-------------------------------------------------------------------------------
10License
11 This file is part of OpenFOAM.
12
13 OpenFOAM is free software: you can redistribute it and/or modify it
14 under the terms of the GNU General Public License as published by
15 the Free Software Foundation, either version 3 of the License, or
16 (at your option) any later version.
17
18 OpenFOAM is distributed in the hope that it will be useful, but WITHOUT
19 ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
20 FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
21 for more details.
22
23 You should have received a copy of the GNU General Public License
24 along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>.
25
26Class
27 Foam::Euler
28
29Description
30 Euler-implicit integration scheme.
31
32 \f[
33 \Delta \phi = (A - B \phi^n) \frac{\Delta t}{1 + B \Delta t}
34 \f]
35
36\*---------------------------------------------------------------------------*/
37
38#ifndef Euler_H
39#define Euler_H
40
41#include "integrationScheme.H"
42
43// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
44
45namespace Foam
46{
47namespace integrationSchemes
48{
49
50/*---------------------------------------------------------------------------*\
51 Class Euler Declaration
52\*---------------------------------------------------------------------------*/
54class Euler
55:
57{
58public:
59
60 //- Runtime type information
61 TypeName("Euler");
62
63
64 // Constructors
65
66 //- Construct
67 Euler();
68
69 //- Construct and return clone
70 virtual autoPtr<integrationScheme> clone() const
71 {
72 return autoPtr<integrationScheme>(new Euler(*this));
73 }
74
75
76 //- Destructor
77 virtual ~Euler();
78
79
80 // Member Functions
81
82 //- Return the integration effective time step
83 virtual scalar dtEff(const scalar dt, const scalar Beta) const;
84
85 //- Return the integral of the effective time step (using an Euler
86 // integration method)
87 virtual scalar sumDtEff(const scalar dt, const scalar Beta) const;
88};
89
90
91// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
92
93} // End namespace integrationSchemes
94} // End namespace Foam
95
96// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
97
98#endif
99
100// ************************************************************************* //
Pointer management similar to std::unique_ptr, with some additional methods and type checking.
Definition: autoPtr.H:66
Base for a set of schemes which integrate simple ODEs which arise from semi-implcit rate expressions.
virtual ~Euler()
Destructor.
Definition: Euler.C:50
TypeName("Euler")
Runtime type information.
virtual scalar sumDtEff(const scalar dt, const scalar Beta) const
Return the integral of the effective time step (using an Euler.
Definition: Euler.C:67
virtual scalar dtEff(const scalar dt, const scalar Beta) const
Return the integration effective time step.
Definition: Euler.C:57
virtual autoPtr< integrationScheme > clone() const
Construct and return clone.
Definition: Euler.H:69
Namespace for OpenFOAM.
#define TypeName(TypeNameString)
Declare a ClassName() with extra virtual type info.
Definition: typeInfo.H:73