AtmosphericBoundaryLayerVelocity_DimensionedFieldFunction.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) 2026 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::DimensionedFieldFunctions::AtmosphericBoundaryLayerVelocity
26 
27 Description
28  Runtime selectable DimensionedFieldFunction to set the velocity
29  for an atmospheric boundary layer.
30 
31  See Foam::atmosphericBoundaryLayer for details.
32 
33 Usage
34  Example to set the U internal field:
35  \verbatim
36  internalField
37  {
38  type atmosphericBoundaryLayerVelocity;
39  libs ("libatmosphericModels.so");
40  }
41  \endverbatim
42 
43 
44 SourceFiles
45  AtmosphericBoundaryLayerVelocity_DimensionedFieldFunction.C
46 
47 \*---------------------------------------------------------------------------*/
48 
49 #ifndef AtmosphericBoundaryLayerVelocity_DimensionedFieldFunction_H
50 #define AtmosphericBoundaryLayerVelocity_DimensionedFieldFunction_H
51 
53 
54 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
55 
56 namespace Foam
57 {
58 namespace DimensionedFieldFunctions
59 {
60 
61 /*---------------------------------------------------------------------------*\
62  Class AtmosphericBoundaryLayerVelocity Declaration
63 \*---------------------------------------------------------------------------*/
64 
65 template<class DimensionedFieldType>
67 :
68  public DimensionedFieldFunction<DimensionedFieldType>
69 {
70  typedef typename DimensionedFieldType::Type_ Type;
71  typedef typename DimensionedFieldType::GeoMesh_::Zone Zone;
72 
73 
74 public:
75 
76  //- Runtime type information
77  TypeName("atmosphericBoundaryLayerVelocity");
78 
79 
80  // Constructors
81 
82  //- Construct with dictionary to initialise given field
84  (
85  const dictionary& dict,
86  DimensionedFieldType& field
87  );
88 
89  //- Construct a copy for the given field
91  (
93  DimensionedFieldType& field
94  );
95 
96  //- Construct and return a clone for the specified field
98  clone(DimensionedFieldType& field) const;
99 
100 
101  //- Destructor
103  {}
104 
105 
106  // Member Functions
107 
108  //- Evaluate the function and set the field
109  virtual void evaluate();
110 
111  //- Write data to dictionary stream
112  virtual void write(Ostream& os) const;
113 };
114 
115 
116 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
117 
118 } // End namespace DimensionedFieldFunctions
119 } // End namespace Foam
120 
121 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
122 
123 #ifdef NoRepository
125 #endif
126 
127 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
128 
129 #endif
130 
131 // ************************************************************************* //
Base class for run-time selectable internal and patch field initialisation evaluation and update with...
virtual autoPtr< DimensionedFieldFunction< DimensionedFieldType > > clone() const
Construct and return a clone for the specified field.
Runtime selectable DimensionedFieldFunction to set the velocity for an atmospheric boundary layer.
TypeName("atmosphericBoundaryLayerVelocity")
Runtime type information.
AtmosphericBoundaryLayerVelocity(const dictionary &dict, DimensionedFieldType &field)
Construct with dictionary to initialise given field.
An Ostream is an abstract base class for all output systems (streams, files, token lists,...
Definition: Ostream.H:57
An auto-pointer similar to the STL auto_ptr but with automatic casting to a reference to the type and...
Definition: autoPtr.H:51
A list of keywords followed by any number of values (e.g. words and numbers) or sub-dictionaries.
Definition: dictionary.H:162
Namespace for OpenFOAM.
dictionary dict