Euler.H
Go to the documentation of this file.
1 /*---------------------------------------------------------------------------*\
2  ========= |
3  \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
4  \\ / O peration | Website: https://openfoam.org
5  \\ / A nd | Copyright (C) 2011-2018 OpenFOAM Foundation
6  \\/ M anipulation |
7 -------------------------------------------------------------------------------
8 License
9  This file is part of OpenFOAM.
10 
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
13  the Free Software Foundation, either version 3 of the License, or
14  (at your option) any later version.
15 
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.
20 
21  You should have received a copy of the GNU General Public License
22  along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>.
23 
24 Class
25  Foam::integrationSchemes::Euler
26 
27 Description
28  Euler-implicit integration scheme.
29 
30  \f[
31  \Delta \phi = (A - B \phi^n) \frac{\Delta t}{1 + B \Delta t}
32  \f]
33 
34 \*---------------------------------------------------------------------------*/
35 
36 #ifndef Euler_H
37 #define Euler_H
38 
39 #include "integrationScheme.H"
40 
41 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
42 
43 namespace Foam
44 {
45 namespace integrationSchemes
46 {
47 
48 /*---------------------------------------------------------------------------*\
49  Class Euler Declaration
50 \*---------------------------------------------------------------------------*/
51 
52 class Euler
53 :
54  public integrationScheme
55 {
56 public:
57 
58  //- Runtime type information
59  TypeName("Euler");
60 
61 
62  // Constructors
63 
64  //- Construct
65  Euler();
66 
67  //- Construct and return clone
68  virtual autoPtr<integrationScheme> clone() const
69  {
70  return autoPtr<integrationScheme>(new Euler(*this));
71  }
72 
73 
74  //- Destructor
75  virtual ~Euler();
76 
77 
78  // Member Functions
79 
80  //- Return the integration effective time step
81  virtual scalar dtEff(const scalar dt, const scalar Beta) const;
82 
83  //- Return the integral of the effective time step (using an Euler
84  // integration method)
85  virtual scalar sumDtEff(const scalar dt, const scalar Beta) const;
86 };
87 
88 
89 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
90 
91 } // End namespace integrationSchemes
92 } // End namespace Foam
93 
94 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
95 
96 #endif
97 
98 // ************************************************************************* //
virtual ~Euler()
Destructor.
Definition: Euler.C:48
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:65
Base for a set of schemes which integrate simple ODEs which arise from semi-implcit rate expressions...
virtual autoPtr< integrationScheme > clone() const
Construct and return clone.
Definition: Euler.H:67
An auto-pointer similar to the STL auto_ptr but with automatic casting to a reference to the type and...
Definition: PtrList.H:52
virtual scalar dtEff(const scalar dt, const scalar Beta) const
Return the integration effective time step.
Definition: Euler.C:55
Euler-implicit integration scheme.
Definition: Euler.H:51
Namespace for OpenFOAM.