AtmosphericBoundaryLayerTurbulentKineticEnergy_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  *this,
71  field
72  )
73  );
74 }
75 
76 
77 // * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * //
78 
79 template<class DimensionedFieldType>
82 {
83  const atmosphericBoundaryLayer& abl =
84  atmosphericBoundaryLayer::New(this->field_.mesh().db());
85 
86  this->field_.primitiveFieldRef() =
87  abl.k(this->field_.mesh().C().primitiveField());
88 }
89 
90 
91 template<class DimensionedFieldType>
94 (
95  Ostream& os
96 ) const
97 {}
98 
99 
100 // ************************************************************************* //
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.
AtmosphericBoundaryLayerTurbulentKineticEnergy(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< scalarField > k(const vectorField &p) const
Return the turbulent kinetic energy 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