OpenLB 1.7
Loading...
Searching...
No Matches
latticeFrameChangeF3D.h
Go to the documentation of this file.
1/* This file is part of the OpenLB library
2 *
3 * Copyright (C) 2013, 2015 Gilles Zahnd, Mathias J. Krause
4 * Marie-Luise Maier
5 * E-mail contact: info@openlb.net
6 * The most recent release of OpenLB can be downloaded at
7 * <http://www.openlb.net/>
8 *
9 * This program is free software; you can redistribute it and/or
10 * modify it under the terms of the GNU General Public License
11 * as published by the Free Software Foundation; either version 2
12 * of the License, or (at your option) any later version.
13 *
14 * This program is distributed in the hope that it will be useful,
15 * but WITHOUT ANY WARRANTY; without even the implied warranty of
16 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
17 * GNU General Public License for more details.
18 *
19 * You should have received a copy of the GNU General Public
20 * License along with this program; if not, write to the Free
21 * Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
22 * Boston, MA 02110-1301, USA.
23*/
24
25#ifndef LATTICE_FRAME_CHANGE_F_3D_H
26#define LATTICE_FRAME_CHANGE_F_3D_H
27
28#include <vector>
29#include <string>
30
33#include "superBaseF3D.h"
35#include "latticeDensity3D.h"
36
37/* To enable simulations in a rotating frame, the axis is set in the
38 * constructor with axisPoint and axisDirection. The axisPoint can be the
39 * coordinate of any point on the axis. The axisDirection has to be a normed to
40 * 1. The pulse w is in rad/s. It determines the pulse speed by its norm while
41 * the trigonometric or clockwise direction is determined by its sign: When the
42 * axisDirection is pointing "towards you", a positive pulse makes it turn in
43 * the trigonometric way. It has to be noticed that putting both axisDirection
44 * into -axisDirection and w into -w yields an exactly identical situation.
45 */
46
47
48namespace olb {
49
50
51template<typename T, typename DESCRIPTOR> class SuperLatticeF3D;
52
65template <typename T, typename DESCRIPTOR>
66class RotatingForceField3D final : public SuperLatticeF3D<T,DESCRIPTOR> {
67protected:
70 std::vector<T> axisPoint;
71 std::vector<T> axisDirection;
72 T w;
77
78public:
80 SuperGeometry<T,3>& superGeometry_,
81 const UnitConverter<T,DESCRIPTOR>& converter_,
82 std::vector<T> axisPoint_,
83 std::vector<T> axisDirection_,
84 T w_,
85 bool centrifugeForceOn_ = true,
86 bool coriolisForceOn_ = true);
87
88 bool operator() (T output[], const int x[]) override;
89};
90
91template<typename T, typename DESCRIPTOR> class SuperLatticeF3D;
92
102template <typename T, typename DESCRIPTOR>
104protected:
107 std::vector<T> axisPoint;
108 std::vector<T> axisDirection;
111 T w;
114
115public:
117 SuperGeometry<T,3>& superGeometry_,
118 const UnitConverter<T,DESCRIPTOR>& converter_,
119 std::vector<T> axisPoint_,
120 std::vector<T> axisDirection_,
121 T amplitude_,
122 T frequency_);
123 void updateTimeStep(int iT);
124
125 bool operator() (T output[], const int x[]) override;
126};
127
128
129} // end namespace olb
130
131#endif
This functor gives a parabolic profile for a given point x as it computes the distance between x and ...
HarmonicOscillatingRotatingForceField3D(SuperLattice< T, DESCRIPTOR > &sLattice_, SuperGeometry< T, 3 > &superGeometry_, const UnitConverter< T, DESCRIPTOR > &converter_, std::vector< T > axisPoint_, std::vector< T > axisDirection_, T amplitude_, T frequency_)
bool operator()(T output[], const int x[]) override
SuperLatticePhysVelocity3D< T, DESCRIPTOR > velocity
const UnitConverter< T, DESCRIPTOR > & converter
This functor gives a parabolic profile for a given point x as it computes the distance between x and ...
SuperLatticeDensity3D< T, DESCRIPTOR > rho
const UnitConverter< T, DESCRIPTOR > & converter
SuperGeometry< T, 3 > & sg
RotatingForceField3D(SuperLattice< T, DESCRIPTOR > &sLattice_, SuperGeometry< T, 3 > &superGeometry_, const UnitConverter< T, DESCRIPTOR > &converter_, std::vector< T > axisPoint_, std::vector< T > axisDirection_, T w_, bool centrifugeForceOn_=true, bool coriolisForceOn_=true)
bool operator()(T output[], const int x[]) override
SuperLatticePhysVelocity3D< T, DESCRIPTOR > velocity
Representation of a statistic for a parallel 2D geometry.
functor to get pointwise density rho on local lattices
represents all functors that operate on a SuperLattice in general, e.g. getVelocity(),...
functor to get pointwise phys velocity on local lattice
Super class maintaining block lattices for a cuboid decomposition.
Conversion between physical and lattice units, as well as discretization.
This file contains two different classes of functors, in the FIRST part.
Top level namespace for all of OpenLB.