25#ifndef FRAME_CHANGE_F_3D_H
26#define FRAME_CHANGE_F_3D_H
61template<
typename T,
unsigned D>
class SuperGeometry;
82 RotatingLinear3D(std::vector<T> axisPoint_, std::vector<T> axisDirection_, T w_, T scale_=1);
83 bool operator()(T output[],
const T x[])
override;
104 RotatingLinearAnnulus3D(std::vector<T> axisPoint_, std::vector<T> axisDirection_, T w_, T ri_, T ro_, T scale_=1);
127 T w_, T scale_=1, T additive_=0);
128 bool operator()(T output[],
const T x[])
override;
165 CirclePowerLaw3D(T center0, T center1, T center2, T normal0, T normal1, T normal2, T radius, T maxVelocity, T n, T scale = T(1));
168 CirclePowerLaw3D(
bool useMeanVelocity, std::vector<T> axisPoint, std::vector<T> axisDirection, T Velocity, T radius, T n, T scale = T(1));
169 CirclePowerLaw3D(
bool useMeanVelocity, T center0, T center1, T center2, T normal0, T normal1, T normal2, T radius, T Velocity, T n, T scale = T(1));
188 bool operator()(T output[],
const T x[])
override;
196 T _turbulenceIntensity;
197 std::random_device _rd;
198 std::mt19937 _generator;
199 std::normal_distribution<T> _dist;
202 CirclePowerLawTurbulent3D(std::vector<T> axisPoint_, std::vector<T> axisDirection, T maxVelocity, T radius, T n = 7, T turbulenceIntensity = 0.05, T scale = T(1));
203 CirclePowerLawTurbulent3D(T center0, T center1, T center2, T normal0, T normal1, T normal2, T radius, T maxVelocity, T n = 7, T turbulenceIntensity = 0.05, T scale = T(1));
206 CirclePowerLawTurbulent3D(
bool useMeanVelocity, std::vector<T> axisPoint, std::vector<T> axisDirection, T Velocity, T radius, T n = 7, T turbulenceIntensity = 0.05, T scale = T(1));
207 CirclePowerLawTurbulent3D(
bool useMeanVelocity, T center0, T center1, T center2, T normal0, T normal1, T normal2, T radius, T Velocity, T n = 7, T turbulenceIntensity = 0.05, T scale = T(1));
210 bool operator()(T output[],
const T x[])
override;
218 CirclePoiseuille3D(std::vector<T> axisPoint, std::vector<T> axisDirection, T maxVelocity, T radius, T scale = T(1));
219 CirclePoiseuille3D(T center0, T center1, T center2, T normal0, T normal1, T normal2, T radius, T maxVelocity, T scale = T(1));
222 CirclePoiseuille3D(
bool useMeanVelocity, std::vector<T> axisPoint, std::vector<T> axisDirection, T Velocity, T radius, T scale = T(1));
223 CirclePoiseuille3D(
bool useMeanVelocity, T center0, T center1, T center2, T normal0, T normal1, T normal2, T radius, T Velocity, T scale = T(1));
228template <
typename T,
typename DESCRIPTOR>
237 bool operator()(T output[],
const T input[])
override;
259 bool operator()(T output[],
const T x[])
override;
284 bool operator()(T output[],
const T x[])
override;
307 bool operator()(T output[],
const T x[])
override;
323 bool operator()(T output[],
const T input[])
override;
334template <
typename T,
typename S>
345 std::vector<T> orientation);
347 bool operator()(T output[],
const S x[])
override;
355template <
typename T,
typename S>
371 bool operator()(T output[],
const S x[])
override;
383template <
typename T,
typename S>
392 bool operator()(T output[],
const S x[])
override;
403template <
typename T,
typename S>
421 T axisDirectionX, T axisDirectionY,
423 T orientationX = T(1), T orientationY = T(),
424 T orientationZ = T());
428 bool operator()(T output[],
const S x[])
override;
453template <
typename T,
typename S>
461 bool operator()(T output[],
const S x[])
override;
471template <
typename T,
typename S>
480 std::vector<T> axisDirection);
485 bool operator()(T output[],
const S x[])
override;
497template <
typename T,
typename S>
519 T radWire, T cutoff, T Mw, T Mp = T(1),
520 T radParticle = T(1), T mu0 = 4*3.14159265e-7);
522 bool operator()(T output[],
const S x[])
override;
525template <
typename T,
typename S>
547 bool operator()(T output[],
const S x[])
override;
AnalyticalF are applications from DD to XD, where X is set by the constructor.
Analytical solution of porous media channel flow with low Reynolds number See Spaid and Phelan (doi:1...
AnalyticalPorousVelocity3D(SuperGeometry< T, 3 > &superGeometry, int material, T K_, T mu_, T gradP_, T radius_, T eps_=T(1))
bool operator()(T output[], const T input[]) override
olb::Vector< T, 3 > normal
olb::Vector< T, 3 > center
This class calculates the angle alpha between vector _referenceVector and any other vector x.
std::vector< T > _orientation
direction around which x has to be turned with angle is in math pos sense to lie over _referenceVecto...
std::vector< T > _referenceVector
between _referenceVector and vector x, angle is calculated
AngleBetweenVectors3D(std::vector< T > referenceVector, std::vector< T > orientation)
constructor defines _referenceVector and _orientation
bool operator()(T output[], const S x[]) override
operator writes angle between x and _referenceVector inro output field
This class converts Cartesian coordinates of point x to cylindrical coordinates wrote into output fie...
olb::Vector< T, 3 > const & getAxisDirection() const
Read only access to _axisDirection.
olb::Vector< T, 3 > _cartesianOrigin
origin of the Cartesian coordinate system
olb::Vector< T, 3 > const & getCartesianOrigin() const
Read only access to _catesianOrigin.
bool operator()(T output[], const S x[]) override
operator writes cylindrical coordinates of Cartesian point x into output field, output[0] = radius ( ...
CartesianToCylinder3D(olb::Vector< T, 3 > cartesianOrigin, T &angle, olb::Vector< T, 3 > orientation={T(1), T(), T()})
olb::Vector< T, 3 > _axisDirection
direction of the axis along which the cylindrical coordinates are calculated
void setAngle(T angle)
Read and write access to _axisDirection using angle.
olb::Vector< T, 3 > _orientation
direction to know orientation for math positive to obtain angle phi of Cartesian point x
This class converts Cartesian coordinates of point x to spherical coordinates wrote into output field...
std::vector< T > _axisDirection
direction of the axis along which the spherical coordinates are calculated
bool operator()(T output[], const S x[]) override
operator writes shperical coordinates of Cartesian point x into output field, output[0] = radius ( >=...
CartesianToSpherical3D(std::vector< T > cartesianOrigin, std::vector< T > axisDirection)
std::vector< T > _cartesianOrigin
origin of the Cartesian coordinate system
Velocity profile for util::round pipes and a laminar flow of a Newtonian fluid: u(r)=u_max*(1-(r/R)^2...
CirclePoiseuille3D(std::vector< T > axisPoint, std::vector< T > axisDirection, T maxVelocity, T radius, T scale=T(1))
Strain rate for util::round pipes and laminar flow of a Newtonian fluid.
bool operator()(T output[], const T input[]) override
CirclePoiseuilleStrainRate3D(UnitConverter< T, DESCRIPTOR > const &converter, T ly)
This functor returns a quadratic Poiseuille profile for use with a pipe with util::round cross-sectio...
bool operator()(T output[], const T x[]) override
olb::Vector< T, 3 > getCenter()
Returns centerpoint vector.
olb::Vector< T, 3 > _center
std::vector< T > getNormal()
Returns normal vector.
T getRadius()
Returns radi.
CirclePowerLaw3D(olb::Vector< T, 3 > axisPoint, std::vector< T > axisDirection, T maxVelocity, T radius, T n, T scale=T(1))
Velocity profile for util::round pipes and turbulent flows: u(r)=u_max*(1-r/R)^(1/n) The exponent n c...
CirclePowerLawTurbulent3D(std::vector< T > axisPoint_, std::vector< T > axisDirection, T maxVelocity, T radius, T n=7, T turbulenceIntensity=0.05, T scale=T(1))
bool operator()(T output[], const T x[]) override
This class converts cylindrical of point x (x[0] = radius, x[1] = phi, x[2] = z) to Cartesian coordin...
bool operator()(T output[], const S x[]) override
operator writes Cartesian coordinates of cylinder coordinates x[0] = radius >= 0, x[1] = phi in [0,...
std::vector< T > _cylinderOrigin
CylinderToCartesian3D(std::vector< T > cylinderOrigin)
constructor defines _cylinderOrigin
This functor returns a quadratic Poiseuille profile for use with a pipe with elliptic cross-section.
EllipticPoiseuille3D(std::vector< T > center, T a, T b, T maxVel)
bool operator()(T output[], const T x[]) override
T _factor
factor = mu0*4/3.*PI*radParticle^3*_Mp*radWire^2/r^3
T _cutoff
maximal distance from wire cutoff/threshold
CartesianToCylinder3D< T, S > & _car2cyl
MagneticFieldFromCylinder3D(CartesianToCylinder3D< T, S > &car2cyl, T length, T radWire, T cutoff, T Mw)
T _length
length of the wire, from origin to _car2cyl.axisDirection
bool operator()(T output[], const S x[]) override
operator writes the magnetic force in a point x util::round a cylindrical wire into output field
T _Mw
saturation magnetization wire, linear scaling factor
Magnetic field that creates magnetization in wire has to be orthogonal to the wire.
T _factor
factor = mu0*4/3.*PI*radParticle^3*_Mp*radWire^2/r^3
CartesianToCylinder3D< T, S > & _car2cyl
T _radParticle
particle radius, cubic scaling factor
T _Mw
saturation magnetization wire, linear scaling factor
T _cutoff
maximal distance from wire cutoff/threshold
MagneticForceFromCylinder3D(CartesianToCylinder3D< T, S > &car2cyl, T length, T radWire, T cutoff, T Mw, T Mp=T(1), T radParticle=T(1), T mu0=4 *3.14159265e-7)
Magnetic field that creates magnetization in wire has to be orthogonal to the wire.
bool operator()(T output[], const S x[]) override
operator writes the magnetic force in a point x util::round a cylindrical wire into output field
T _length
length of the wire, from origin to _car2cyl.axisDirection
T _Mp
magnetization particle, linear scaling factor
T _mu0
permeability constant, linear scaling factor
class for marking output with some text
This functor returns a Poiseuille profile for use with a pipe with square shaped cross-section.
RectanglePoiseuille3D(olb::Vector< T, 3 > &x0_, olb::Vector< T, 3 > &x1_, olb::Vector< T, 3 > &x2_, std::vector< T > &maxVelocity_)
std::vector< T > maxVelocity
bool operator()(T output[], const T x[]) override
RectangleTrigonometricPoiseuille3D(std::vector< T > &x0_, std::vector< T > &x1_, std::vector< T > &x2_, std::vector< T > &maxVelocity, int numOfPolynoms_=1)
std::vector< T > maxVelocity
bool operator()(T output[], const T x[]) override
This functor gives a linar profile for a given point x as it computes the distance between x and the ...
std::vector< T > axisPoint
RotatingLinear3D(std::vector< T > axisPoint_, std::vector< T > axisDirection_, T w_, T scale_=1)
std::vector< T > axisDirection
bool operator()(T output[], const T x[]) override
This functor gives a linar profile in an annulus for a given point x between the inner and outer radi...
std::vector< T > axisPoint
std::vector< T > axisDirection
RotatingLinearAnnulus3D(std::vector< T > axisPoint_, std::vector< T > axisDirection_, T w_, T ri_, T ro_, T scale_=1)
bool operator()(T output[], const T x[])
This functor gives a parabolic profile for a given point x as it computes the distance between x and ...
RotatingQuadratic1D(std::vector< T > axisPoint_, std::vector< T > axisDirection_, T w_, T scale_=1, T additive_=0)
std::vector< T > axisPoint
std::vector< T > axisDirection
bool operator()(T output[], const T x[]) override
This class saves coordinates of the resulting point after rotation in the output field.
olb::Vector< T, 3 > _rotAxisDirection
direction, around which x is turned
T _alpha
angle, by which vector x is rotated around _rotAxisDirection
olb::Vector< T, 3 > _origin
origin, around which x is turned
RotationRoundAxis3D(olb::Vector< T, 3 > origin, olb::Vector< T, 3 > rotAxisDirection, T alpha)
constructor defines _rotAxisDirection, _alpha and _origin
bool operator()(T output[], const S x[]) override
operator writes coordinates of the resulting point after rotation of x by angle _alpha in math positi...
This class converts spherical coordinates of point x (x[0] = radius, x[1] = phi, x[2] = theta) to Car...
bool operator()(T output[], const S x[]) override
operator writes spherical coordinates of Cartesian coordinates of x (x[0] = radius,...
Representation of a statistic for a parallel 2D geometry.
Conversion between physical and lattice units, as well as discretization.
Top level namespace for all of OpenLB.