analytical.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::analytical
26 
27 Description
28  Analytical integration scheme
29 
30  \f[
31  \Delta \phi = (A - B \phi^n) \frac{1}{B} (1 - e^{- B \Delta t})
32  \f]
33 
34 \*---------------------------------------------------------------------------*/
35 
36 #ifndef analytical_H
37 #define analytical_H
38 
39 #include "integrationScheme.H"
40 
41 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
42 
43 namespace Foam
44 {
45 namespace integrationSchemes
46 {
47 
48 /*---------------------------------------------------------------------------*\
49  Class analytical Declaration
50 \*---------------------------------------------------------------------------*/
51 
52 class analytical
53 :
54  public integrationScheme
55 {
56 public:
57 
58  //- Runtime type information
59  TypeName("analytical");
60 
61 
62  // Constructors
63 
64  //- Construct
65  analytical();
66 
67  //- Construct and return clone
68  virtual autoPtr<integrationScheme> clone() const
69  {
70  return autoPtr<integrationScheme>(new analytical(*this));
71  }
72 
73 
74  //- Destructor
75  virtual ~analytical();
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
84  virtual scalar sumDtEff(const scalar dt, const scalar Beta) const;
85 };
86 
87 
88 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
89 
90 } // End namespace integrationSchemes
91 } // End namespace Foam
92 
93 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
94 
95 #endif
96 
97 // ************************************************************************* //
virtual ~analytical()
Destructor.
Definition: analytical.C:48
Analytical integration scheme.
Definition: analytical.H:51
TypeName("analytical")
Runtime type information.
Base for a set of schemes which integrate simple ODEs which arise from semi-implcit rate expressions...
virtual scalar sumDtEff(const scalar dt, const scalar Beta) const
Return the integral of the effective time step.
Definition: analytical.C:68
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 autoPtr< integrationScheme > clone() const
Construct and return clone.
Definition: analytical.H:67
virtual scalar dtEff(const scalar dt, const scalar Beta) const
Return the integration effective time step.
Definition: analytical.C:55
Namespace for OpenFOAM.