OpenLB
1.7
Loading...
Searching...
No Matches
src
functors
analytical
atmBoundary.h
Go to the documentation of this file.
1
/* This file is part of the OpenLB library
2
*
3
* Copyright (C) 2013, 2024 Dennis Teutscher
4
* E-mail contact: info@openlb.net
5
* The most recent release of OpenLB can be downloaded at
6
* <http://www.openlb.net/>
7
*
8
* This program is free software; you can redistribute it and/or
9
* modify it under the terms of the GNU General Public License
10
* as published by the Free Software Foundation; either version 2
11
* of the License, or (at your option) any later version.
12
*
13
* This program is distributed in the hope that it will be useful,
14
* but WITHOUT ANY WARRANTY; without even the implied warranty of
15
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16
* GNU General Public License for more details.
17
*
18
* You should have received a copy of the GNU General Public
19
* License along with this program; if not, write to the Free
20
* Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
21
* Boston, MA 02110-1301, USA.
22
*/
23
#ifndef ATMBOUNDARY_H
24
#define ATMBOUNDARY_H
25
26
27
namespace
olb
{
28
template
<
typename
T>
29
class
AnalyticalWindProfileF3D
:
public
AnalyticalF3D
<T,T> {
30
31
protected
:
32
T
_u0
;
33
T
_z0
;
34
T
_z_ref
;
35
T
_kappa
;
36
T
_d
=0;
37
int
_windDirection
;
38
int
_normalToEarth
;
39
40
41
public
:
42
AnalyticalWindProfileF3D
(T u0, T z0, T z_ref,T kappa, T d,
int
windDirection = 0,
int
normalToEarth =2) :
AnalyticalF3D
<T,T>( 3 )
43
,
_u0
(u0),
_z0
(z0),
_z_ref
(z_ref),
_kappa
(kappa),
_d
(d),
_windDirection
(windDirection),
_normalToEarth
(normalToEarth) {
44
this->
getName
() =
"AnalyticalWindProfileF3D"
;
45
};
46
47
bool
operator()
( T output[3],
const
T input[3] )
override
{
48
output[
_windDirection
] = (
_u0
*
_kappa
)/std::log10((
_z_ref
+
_z0
)/
_z0
) /
_kappa
*std::log10(((input[
_normalToEarth
]-
_d
)+
_z0
)/
_z0
);
49
return
true
;
50
};
51
52
};
53
}
54
#endif
olb::AnalyticalF
AnalyticalF are applications from DD to XD, where X is set by the constructor.
Definition
analyticalBaseF.h:46
olb::AnalyticalWindProfileF3D
Definition
atmBoundary.h:29
olb::AnalyticalWindProfileF3D::_u0
T _u0
Definition
atmBoundary.h:32
olb::AnalyticalWindProfileF3D::operator()
bool operator()(T output[3], const T input[3]) override
Definition
atmBoundary.h:47
olb::AnalyticalWindProfileF3D::_windDirection
int _windDirection
Definition
atmBoundary.h:37
olb::AnalyticalWindProfileF3D::AnalyticalWindProfileF3D
AnalyticalWindProfileF3D(T u0, T z0, T z_ref, T kappa, T d, int windDirection=0, int normalToEarth=2)
Definition
atmBoundary.h:42
olb::AnalyticalWindProfileF3D::_normalToEarth
int _normalToEarth
Definition
atmBoundary.h:38
olb::AnalyticalWindProfileF3D::_z0
T _z0
Definition
atmBoundary.h:33
olb::AnalyticalWindProfileF3D::_z_ref
T _z_ref
Definition
atmBoundary.h:34
olb::AnalyticalWindProfileF3D::_kappa
T _kappa
Definition
atmBoundary.h:35
olb::AnalyticalWindProfileF3D::_d
T _d
Definition
atmBoundary.h:36
olb::GenericF::getName
std::string & getName()
read and write access to name
Definition
genericF.hh:51
olb
Top level namespace for all of OpenLB.
Definition
boundaryPostProcessors2D.h:34
Generated on Tue Mar 5 2024 09:57:48 for OpenLB by
1.10.0