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 -------------------------------------------------------------------------------
10 License
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 
26 Class
27  Foam::Euler
28 
29 Description
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 
45 namespace Foam
46 {
47 namespace integrationSchemes
48 {
49 
50 /*---------------------------------------------------------------------------*\
51  Class Euler Declaration
52 \*---------------------------------------------------------------------------*/
53 
54 class Euler
55 :
56  public integrationScheme
57 {
58 public:
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 // ************************************************************************* //
Foam::integrationSchemes::Euler::dtEff
virtual scalar dtEff(const scalar dt, const scalar Beta) const
Return the integration effective time step.
Definition: Euler.C:57
Foam::integrationScheme
Base for a set of schemes which integrate simple ODEs which arise from semi-implcit rate expressions.
Definition: integrationScheme.H:90
Foam::integrationSchemes::Euler::TypeName
TypeName("Euler")
Runtime type information.
Foam
Namespace for OpenFOAM.
Definition: atmBoundaryLayer.C:33
Foam::autoPtr
Pointer management similar to std::unique_ptr, with some additional methods and type checking.
Definition: HashPtrTable.H:53
integrationScheme.H
Foam::integrationSchemes::Euler
Definition: Euler.H:53
Foam::integrationSchemes::Euler::Euler
Euler()
Construct.
Definition: Euler.C:44
Foam::integrationSchemes::Euler::~Euler
virtual ~Euler()
Destructor.
Definition: Euler.C:50
Foam::integrationSchemes::Euler::sumDtEff
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
Foam::integrationSchemes::Euler::clone
virtual autoPtr< integrationScheme > clone() const
Construct and return clone.
Definition: Euler.H:69