AtmosphericBoundaryLayerVelocity_DimensionedFieldFunction.C
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 \*---------------------------------------------------------------------------*/
25 
27 #include "DimensionedField.H"
29 
30 // * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * //
31 
32 template<class DimensionedFieldType>
36 (
37  const dictionary& dict,
38  DimensionedFieldType& field
39 )
40 :
41  DimensionedFieldFunction<DimensionedFieldType>(dict, field)
42 {}
43 
44 
45 template<class DimensionedFieldType>
49 (
51  DimensionedFieldType& field
52 )
53 :
54  DimensionedFieldFunction<DimensionedFieldType>(dff, field)
55 {}
56 
57 
58 template<class DimensionedFieldType>
62 (
63  DimensionedFieldType& field
64 ) const
65 {
67  (
69  );
70 }
71 
72 
73 // * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * //
74 
75 template<class DimensionedFieldType>
78 {
79  const atmosphericBoundaryLayer& abl =
80  atmosphericBoundaryLayer::New(this->field_.mesh().db());
81 
82  this->field_.primitiveFieldRef() =
83  abl.U(this->field_.mesh().C().primitiveField());
84 }
85 
86 
87 template<class DimensionedFieldType>
90 (
91  Ostream& os
92 ) const
93 {}
94 
95 
96 // ************************************************************************* //
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.
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
This class provides functions to evaluate the velocity and turbulence distributions appropriate for a...
static const atmosphericBoundaryLayer & New(const objectRegistry &db)
Return a reference to the atmosphericBoundaryLayer.
tmp< vectorField > U(const vectorField &p) const
Return the velocity field.
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
dictionary dict