OpenLB 1.7
Loading...
Searching...
No Matches
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
27namespace olb {
28template <typename T>
30
31protected:
32 T _u0;
33 T _z0;
36 T _d =0;
39
40
41public:
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
AnalyticalF are applications from DD to XD, where X is set by the constructor.
bool operator()(T output[3], const T input[3]) override
Definition atmBoundary.h:47
AnalyticalWindProfileF3D(T u0, T z0, T z_ref, T kappa, T d, int windDirection=0, int normalToEarth=2)
Definition atmBoundary.h:42
std::string & getName()
read and write access to name
Definition genericF.hh:51
Top level namespace for all of OpenLB.