OpenLB 1.7
Loading...
Searching...
No Matches
Public Member Functions | List of all members
olb::CirclePowerLawTurbulent3D< T > Class Template Reference

Velocity profile for util::round pipes and turbulent flows: u(r)=u_max*(1-r/R)^(1/n) The exponent n can be calculated by n = 1.03 * ln(Re) - 3.6 n=7 is used for many flow applications. More...

#include <frameChangeF3D.h>

+ Inheritance diagram for olb::CirclePowerLawTurbulent3D< T >:
+ Collaboration diagram for olb::CirclePowerLawTurbulent3D< T >:

Public Member Functions

 CirclePowerLawTurbulent3D (std::vector< T > axisPoint_, std::vector< T > axisDirection, T maxVelocity, T radius, T n=7, T turbulenceIntensity=0.05, T scale=T(1))
 
 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))
 
 CirclePowerLawTurbulent3D (SuperGeometry< T, 3 > &superGeometry, int material, T maxVelocity, T distance2Wall, T n=7, T turbulenceIntensity=0.05, T scale=T(1))
 
 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))
 
 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))
 
 CirclePowerLawTurbulent3D (bool useMeanVelocity, SuperGeometry< T, 3 > &superGeometry, int material, T Velocity, T distance2Wall, T n=7, T turbulenceIntensity=0.05, T scale=T(1))
 
bool operator() (T output[], const T x[]) override
 
- Public Member Functions inherited from olb::CirclePowerLaw3D< T >
 CirclePowerLaw3D (olb::Vector< T, 3 > axisPoint, std::vector< T > axisDirection, T maxVelocity, T radius, T n, T scale=T(1))
 
 CirclePowerLaw3D (T center0, T center1, T center2, T normal0, T normal1, T normal2, T radius, T maxVelocity, T n, T scale=T(1))
 
 CirclePowerLaw3D (const SuperGeometry< T, 3 > &superGeometry, int material, T maxVelocity, T n, T distance2Wall, T scale=T(1))
 
 CirclePowerLaw3D (bool useMeanVelocity, std::vector< T > axisPoint, std::vector< T > axisDirection, T Velocity, T radius, T n, T scale=T(1))
 
 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))
 
 CirclePowerLaw3D (bool useMeanVelocity, SuperGeometry< T, 3 > &superGeometry, int material, T Velocity, T n, T distance2Wall, T scale=T(1))
 
olb::Vector< T, 3 > getCenter ()
 Returns centerpoint vector.
 
std::vector< T > getNormal ()
 Returns normal vector.
 
getRadius ()
 Returns radi.
 
bool operator() (T output[], const T x[]) override
 
- Public Member Functions inherited from olb::AnalyticalF< D, T, S >
AnalyticalF< D, T, S > & operator- (AnalyticalF< D, T, S > &rhs)
 
AnalyticalF< D, T, S > & operator+ (AnalyticalF< D, T, S > &rhs)
 
AnalyticalF< D, T, S > & operator* (AnalyticalF< D, T, S > &rhs)
 
AnalyticalF< D, T, S > & operator/ (AnalyticalF< D, T, S > &rhs)
 
- Public Member Functions inherited from olb::GenericF< T, S >
virtual ~GenericF ()=default
 
int getSourceDim () const
 read only access to member variable _m
 
int getTargetDim () const
 read only access to member variable _n
 
std::string & getName ()
 read and write access to name
 
std::string const & getName () const
 read only access to name
 
virtual bool operator() (T output[], const S input[])=0
 has to be implemented for 'every' derived class
 
bool operator() (T output[])
 wrapper that call the pure virtual operator() (T output[], const S input[]) from above
 
bool operator() (T output[], S input0)
 
bool operator() (T output[], S input0, S input1)
 
bool operator() (T output[], S input0, S input1, S input2)
 
bool operator() (T output[], S input0, S input1, S input2, S input3)
 

Additional Inherited Members

- Public Types inherited from olb::AnalyticalF< D, T, S >
using identity_functor_type = AnalyticalIdentity<D,T,S>
 
- Public Types inherited from olb::GenericF< T, S >
using targetType = T
 
using sourceType = S
 
- Public Attributes inherited from olb::GenericF< T, S >
std::shared_ptr< GenericF< T, S > > _ptrCalcC
 memory management, frees resouces (calcClass)
 
- Static Public Attributes inherited from olb::AnalyticalF< D, T, S >
static constexpr unsigned dim = D
 
- Protected Member Functions inherited from olb::AnalyticalF< D, T, S >
 AnalyticalF (int n)
 
- Protected Member Functions inherited from olb::GenericF< T, S >
 GenericF (int targetDim, int sourceDim)
 
- Protected Attributes inherited from olb::CirclePowerLaw3D< T >
olb::Vector< T, 3 > _center
 
std::vector< T > _normal
 
_radius
 
_maxVelocity
 
_n
 
_scale
 

Detailed Description

template<typename T>
class olb::CirclePowerLawTurbulent3D< T >

Velocity profile for util::round pipes and turbulent flows: u(r)=u_max*(1-r/R)^(1/n) The exponent n can be calculated by n = 1.03 * ln(Re) - 3.6 n=7 is used for many flow applications.

Definition at line 194 of file frameChangeF3D.h.

Constructor & Destructor Documentation

◆ CirclePowerLawTurbulent3D() [1/6]

template<typename T >
olb::CirclePowerLawTurbulent3D< T >::CirclePowerLawTurbulent3D ( std::vector< T > axisPoint_,
std::vector< T > axisDirection,
T maxVelocity,
T radius,
T n = 7,
T turbulenceIntensity = 0.05,
T scale = T(1) )

Definition at line 242 of file frameChangeF3D.hh.

244 : CirclePowerLaw3D<T>(center, normal, maxVelocity, radius, n, scale), _turbulenceIntensity(turbulenceIntensity), _generator(_rd()), _dist(0.0, 1.0) { }

◆ CirclePowerLawTurbulent3D() [2/6]

template<typename T >
olb::CirclePowerLawTurbulent3D< T >::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) )

Definition at line 247 of file frameChangeF3D.hh.

249 : CirclePowerLaw3D<T>(center0, center1, center2, normal0, normal1, normal2, radius, maxVelocity, n, scale), _turbulenceIntensity(turbulenceIntensity), _generator(_rd()), _dist(0.0, 1.0) { }

◆ CirclePowerLawTurbulent3D() [3/6]

template<typename T >
olb::CirclePowerLawTurbulent3D< T >::CirclePowerLawTurbulent3D ( SuperGeometry< T, 3 > & superGeometry,
int material,
T maxVelocity,
T distance2Wall,
T n = 7,
T turbulenceIntensity = 0.05,
T scale = T(1) )

Definition at line 252 of file frameChangeF3D.hh.

254 : CirclePowerLaw3D<T>(superGeometry, material, maxVelocity, n, distance2Wall, scale), _turbulenceIntensity(turbulenceIntensity), _generator(_rd()), _dist(0.0, 1.0) { }

◆ CirclePowerLawTurbulent3D() [4/6]

template<typename T >
olb::CirclePowerLawTurbulent3D< T >::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) )

Definition at line 257 of file frameChangeF3D.hh.

258 : CirclePowerLawTurbulent3D(axisPoint, axisDirection, Velocity, radius, n, turbulenceIntensity, scale)
259{
260 if (useMeanVelocity) {
261 this->_maxVelocity = ((1. + 1./n) * (2. + 1./n)) / 2. * Velocity;
262 }
263}
CirclePowerLawTurbulent3D(std::vector< T > axisPoint_, std::vector< T > axisDirection, T maxVelocity, T radius, T n=7, T turbulenceIntensity=0.05, T scale=T(1))

References olb::CirclePowerLaw3D< T >::_maxVelocity.

◆ CirclePowerLawTurbulent3D() [5/6]

template<typename T >
olb::CirclePowerLawTurbulent3D< T >::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) )

Definition at line 265 of file frameChangeF3D.hh.

266 : CirclePowerLawTurbulent3D(center0, center1, center2, normal0, normal1, normal2, radius, Velocity, n, turbulenceIntensity, scale)
267{
268 if (useMeanVelocity) {
269 this->_maxVelocity = ((1. + 1./n) * (2. + 1./n)) / 2. * Velocity;
270 }
271}

References olb::CirclePowerLaw3D< T >::_maxVelocity.

◆ CirclePowerLawTurbulent3D() [6/6]

template<typename T >
olb::CirclePowerLawTurbulent3D< T >::CirclePowerLawTurbulent3D ( bool useMeanVelocity,
SuperGeometry< T, 3 > & superGeometry,
int material,
T Velocity,
T distance2Wall,
T n = 7,
T turbulenceIntensity = 0.05,
T scale = T(1) )

Definition at line 274 of file frameChangeF3D.hh.

275 : CirclePowerLawTurbulent3D(superGeometry, material, Velocity, n, turbulenceIntensity, distance2Wall, scale)
276{
277 if (useMeanVelocity) {
278 this->_maxVelocity = ((1. + 1./n) * (2. + 1./n)) / 2. * Velocity;
279 }
280}

References olb::CirclePowerLaw3D< T >::_maxVelocity.

Member Function Documentation

◆ operator()()

template<typename T >
bool olb::CirclePowerLawTurbulent3D< T >::operator() ( T output[],
const T x[] )
override

Definition at line 283 of file frameChangeF3D.hh.

284{
285 T meanVelocity = this->_maxVelocity * 2.0 / ((1. + 1./this->_n) * (2. + 1./this->_n));
286
287 if ( 1.-util::sqrt((x[1]-this->_center[1])*(x[1]-this->_center[1])+(x[2]-this->_center[2])*(x[2]-this->_center[2]))/this->_radius < 0.) {
288 output[0] = T();
289 }
290 else {
291 output[0] = this->_scale*this->_maxVelocity*this->_normal[0]*
292 (util::pow(1.-util::sqrt((x[1]-this->_center[1])*(x[1]-this->_center[1])+(x[2]-this->_center[2])*(x[2]-this->_center[2]))/this->_radius, 1./this->_n));
293 output[0] += _dist(_generator) * _turbulenceIntensity * meanVelocity;
294 }
295 if ( 1.-util::sqrt((x[0]-this->_center[0])*(x[0]-this->_center[0])+(x[2]-this->_center[2])*(x[2]-this->_center[2]))/this->_radius < 0.) {
296 output[1] = T();
297 }
298 else {
299 output[1] = this->_scale*this->_maxVelocity*this->_normal[1]*
300 (util::pow(1.-util::sqrt((x[0]-this->_center[0])*(x[0]-this->_center[0])+(x[2]-this->_center[2])*(x[2]-this->_center[2]))/this->_radius, 1./this->_n));
301 output[1] += _dist(_generator) * _turbulenceIntensity * meanVelocity;
302 }
303 if ( 1.-util::sqrt((x[1]-this->_center[1])*(x[1]-this->_center[1])+(x[0]-this->_center[0])*(x[0]-this->_center[0]))/this->_radius < 0.) {
304 output[2] = T();
305 }
306 else {
307 output[2] = this->_scale*this->_maxVelocity*this->_normal[2]*
308 (util::pow(1.-util::sqrt((x[1]-this->_center[1])*(x[1]-this->_center[1])+(x[0]-this->_center[0])*(x[0]-this->_center[0]))/this->_radius, 1./this->_n));
309 output[2] += _dist(_generator) * _turbulenceIntensity * meanVelocity;
310 }
311
312 return true;
313}
std::vector< T > _normal
olb::Vector< T, 3 > _center
cpu::simd::Pack< T > sqrt(cpu::simd::Pack< T > value)
Definition pack.h:100
cpu::simd::Pack< T > pow(cpu::simd::Pack< T > base, cpu::simd::Pack< T > exp)
Definition pack.h:112

References olb::util::pow(), and olb::util::sqrt().

+ Here is the call graph for this function:

The documentation for this class was generated from the following files: