OpenLB 1.7
Loading...
Searching...
No Matches
Public Member Functions | Protected Attributes | List of all members
olb::EllipticPoiseuille3D< T > Class Template Referencefinal

This functor returns a quadratic Poiseuille profile for use with a pipe with elliptic cross-section. More...

#include <frameChangeF3D.h>

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

Public Member Functions

 EllipticPoiseuille3D (std::vector< T > center, T a, T b, T maxVel)
 
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)
 

Protected Attributes

OstreamManager clout
 
std::vector< T > _center
 
_a2
 
_b2
 
_maxVel
 

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)
 

Detailed Description

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

This functor returns a quadratic Poiseuille profile for use with a pipe with elliptic cross-section.

Ellpise is orthogonal to z-direction. a is in x-direction b is in y-direction Velocity profile for util::round pipes.

Definition at line 298 of file frameChangeF3D.h.

Constructor & Destructor Documentation

◆ EllipticPoiseuille3D()

template<typename T >
olb::EllipticPoiseuille3D< T >::EllipticPoiseuille3D ( std::vector< T > center,
T a,
T b,
T maxVel )

Definition at line 683 of file frameChangeF3D.hh.

684 : AnalyticalF3D<T,T>(3), clout(std::cout, "EllipticPoiseuille3D"), _center(center),
685 _a2(a*a), _b2(b*b), _maxVel(maxVel) { }

Member Function Documentation

◆ operator()()

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

Definition at line 689 of file frameChangeF3D.hh.

690{
691 T cosOmega2 = util::pow(x[0]-_center[0],2.)/(util::pow(x[0]-_center[0],2.)+util::pow(x[1]-_center[1],2.));
692 T rad2 = _a2*_b2 /((_b2-_a2)*cosOmega2 + _a2) ;
693 T x2 = (util::pow(x[0]-_center[0],2.)+util::pow(x[1]-_center[1],2.))/rad2;
694
695 // clout << _center[0] << " " << _center[1] << " " << x[0] << " " << x[1] << " " << util::sqrt(rad2) << " " << util::sqrt(util::pow(x[0]-_center[0],2.)+util::pow(x[1]-_center[1],2.)) << " " << x2 << std::endl;
696
697 output[0] = 0.;
698 output[1] = 0.;
699 output[2] = _maxVel*(-x2+1);
700 if ( util::nearZero(_center[0]-x[0]) && util::nearZero(_center[1]-x[1]) ) {
701 output[2] = _maxVel;
702 }
703 return true;
704}
cpu::simd::Pack< T > pow(cpu::simd::Pack< T > base, cpu::simd::Pack< T > exp)
Definition pack.h:112
bool nearZero(const ADf< T, DIM > &a)
Definition aDiff.h:1087

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

+ Here is the call graph for this function:

Member Data Documentation

◆ _a2

template<typename T >
T olb::EllipticPoiseuille3D< T >::_a2
protected

Definition at line 302 of file frameChangeF3D.h.

◆ _b2

template<typename T >
T olb::EllipticPoiseuille3D< T >::_b2
protected

Definition at line 302 of file frameChangeF3D.h.

◆ _center

template<typename T >
std::vector<T> olb::EllipticPoiseuille3D< T >::_center
protected

Definition at line 301 of file frameChangeF3D.h.

◆ _maxVel

template<typename T >
T olb::EllipticPoiseuille3D< T >::_maxVel
protected

Definition at line 303 of file frameChangeF3D.h.

◆ clout

template<typename T >
OstreamManager olb::EllipticPoiseuille3D< T >::clout
protected

Definition at line 300 of file frameChangeF3D.h.


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