damping.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) 2017-2019 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::fv::damping
26 
27 Description
28  Base fvOption for damping functions.
29 
30 See also
31  Foam::fv::isotropicDamping
32  Foam::fv::verticalDamping
33 
34 SourceFiles
35  damping.C
36 
37 \*---------------------------------------------------------------------------*/
38 
39 #ifndef damping_H
40 #define damping_H
41 
42 #include "cellSetOption.H"
43 #include "Function1.H"
44 #include "volFields.H"
45 
46 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
47 
48 namespace Foam
49 {
50 namespace fv
51 {
52 
53 /*---------------------------------------------------------------------------*\
54  Class damping Declaration
55 \*---------------------------------------------------------------------------*/
56 
57 class damping
58 :
59  public cellSetOption
60 {
61 protected:
62 
63  // Protected Data
64 
65  //- Damping coefficient [1/s]
67 
68  //- The scaling function
70 
71  //- Origins of the scaling coordinate
73 
74  //- Directions of increasing scaling coordinate
76 
77 
78  // Protected Member Functions
79 
81 
82 
83 public:
84 
85  //- Runtime type information
86  TypeName("damping");
87 
88 
89  // Constructors
90 
91  //- Construct from components
92  damping
93  (
94  const word& name,
95  const word& modelType,
96  const dictionary& dict,
97  const fvMesh& mesh
98  );
99 
100 
101  //- Destructor
102  virtual ~damping()
103  {}
104 
105 
106  // Member Functions
107 
108  // IO
109 
110  //- Read dictionary
111  virtual bool read(const dictionary& dict);
112 };
113 
114 
115 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
116 
117 } // End namespace fv
118 } // End namespace Foam
119 
120 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
121 
122 #endif
123 
124 // ************************************************************************* //
dictionary dict
autoPtr< Function1< scalar > > scale_
The scaling function.
Definition: damping.H:68
dimensionedScalar lambda_
Damping coefficient [1/s].
Definition: damping.H:65
vectorField origins_
Origins of the scaling coordinate.
Definition: damping.H:71
A list of keyword definitions, which are a keyword followed by any number of values (e...
Definition: dictionary.H:158
damping(const word &name, const word &modelType, const dictionary &dict, const fvMesh &mesh)
Construct from components.
Definition: damping.C:97
TypeName("damping")
Runtime type information.
const fvMesh & mesh() const
Return const access to the mesh database.
Definition: fvOptionI.H:34
virtual bool read(const dictionary &dict)
Read dictionary.
Definition: damping.C:116
A class for handling words, derived from string.
Definition: word.H:59
labelList fv(nPoints)
const word & name() const
Return const access to the source name.
Definition: fvOptionI.H:28
virtual ~damping()
Destructor.
Definition: damping.H:101
Base fvOption for damping functions.
Definition: damping.H:56
Mesh data needed to do the Finite Volume discretisation.
Definition: fvMesh.H:78
Cell-set options abstract base class. Provides a base set of controls, e.g.:
Definition: cellSetOption.H:69
An auto-pointer similar to the STL auto_ptr but with automatic casting to a reference to the type and...
Definition: PtrList.H:52
A class for managing temporary objects.
Definition: PtrList.H:53
tmp< volScalarField::Internal > forceCoeff() const
Definition: damping.C:43
Namespace for OpenFOAM.
vectorField directions_
Directions of increasing scaling coordinate.
Definition: damping.H:74