OpenLB 1.8.1
Loading...
Searching...
No Matches
olb::CircleCasson3D< T > Class Template Reference

This functor returns a Casson profile for use with a pipe with util::round cross-section. More...

#include <frameChangeF3D.h>

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

Public Member Functions

 CircleCasson3D (olb::Vector< T, 3 > axisPoint, std::vector< T > axisDirection, T radius, T cassonViscosity, T pressureDrop, T yieldStress, T scale=1.0)
 
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)
 

Protected Attributes

olb::Vector< T, 3 > _center
 
std::vector< T > _normal
 
_radius
 
_cassonViscosity
 
_pressureDrop
 
_yieldStress
 
_scale
 

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::CircleCasson3D< T >

This functor returns a Casson profile for use with a pipe with util::round cross-section.

It uses cylinder coordinates and is valid for the entire length of the pipe.

Definition at line 220 of file frameChangeF3D.h.

Constructor & Destructor Documentation

◆ CircleCasson3D()

template<typename T >
olb::CircleCasson3D< T >::CircleCasson3D ( olb::Vector< T, 3 > axisPoint,
std::vector< T > axisDirection,
T radius,
T cassonViscosity,
T pressureDrop,
T yieldStress,
T scale = 1.0 )

Definition at line 316 of file frameChangeF3D.hh.

318 : AnalyticalF3D<T,T>(3), _center(center), _normal(util::normalize(normal)),
319 _radius(radius), _cassonViscosity(cassonViscosity), _pressureDrop(pressureDrop), _yieldStress(yieldStress), _scale(scale) { }
std::vector< T > _normal
olb::Vector< T, 3 > _center
Vector< T, D > normalize(const Vector< T, D > &a)
AnalyticalF< 3, T, S > AnalyticalF3D

Member Function Documentation

◆ getCenter()

template<typename T >
olb::Vector< T, 3 > olb::CircleCasson3D< T >::getCenter ( )
inline

Returns centerpoint vector.

Definition at line 234 of file frameChangeF3D.h.

235 {
236 return _center;
237 };

References olb::CircleCasson3D< T >::_center.

◆ getNormal()

template<typename T >
std::vector< T > olb::CircleCasson3D< T >::getNormal ( )
inline

Returns normal vector.

Definition at line 239 of file frameChangeF3D.h.

240 {
241 return _normal;
242 };

References olb::CircleCasson3D< T >::_normal.

◆ getRadius()

template<typename T >
T olb::CircleCasson3D< T >::getRadius ( )
inline

Returns radi.

Definition at line 244 of file frameChangeF3D.h.

245 {
246 return _radius;
247 };

References olb::CircleCasson3D< T >::_radius.

◆ operator()()

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

Definition at line 322 of file frameChangeF3D.hh.

323{
324 T r_c = _yieldStress / (_pressureDrop / 2.);
325 T r[3];
326 r[0] = util::sqrt((x[1]-_center[1])*(x[1]-_center[1])+(x[2]-_center[2])*(x[2]-_center[2]));
327 r[1] = util::sqrt((x[0]-_center[0])*(x[0]-_center[0])+(x[2]-_center[2])*(x[2]-_center[2]));
328 r[2] = util::sqrt((x[1]-_center[1])*(x[1]-_center[1])+(x[0]-_center[0])*(x[0]-_center[0]));
329
330 T preFac = 1. / _cassonViscosity;
331 for (std::size_t d = 0; d < 3; ++d) {
332 if (r[d] < r_c) {
333 r[d] = r_c;
334 }
335 output[d] =_scale * _normal[d] * preFac * ((_radius*_radius - r[d]*r[d])*_pressureDrop / 4.0 +
337 - util::sqrt(util::pow(util::abs(r[d]), 3.0))));
338 }
339 return true;
340}
constexpr int d() any_platform
Definition functions.h:127
ADf< T, DIM > abs(const ADf< T, DIM > &a)
Definition aDiff.h:1019
Expr sqrt(Expr x)
Definition expr.cpp:225
Expr pow(Expr base, Expr exp)
Definition expr.cpp:235

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

+ Here is the call graph for this function:

Member Data Documentation

◆ _cassonViscosity

template<typename T >
T olb::CircleCasson3D< T >::_cassonViscosity
protected

Definition at line 225 of file frameChangeF3D.h.

◆ _center

template<typename T >
olb::Vector<T, 3> olb::CircleCasson3D< T >::_center
protected

Definition at line 222 of file frameChangeF3D.h.

◆ _normal

template<typename T >
std::vector<T> olb::CircleCasson3D< T >::_normal
protected

Definition at line 223 of file frameChangeF3D.h.

◆ _pressureDrop

template<typename T >
T olb::CircleCasson3D< T >::_pressureDrop
protected

Definition at line 226 of file frameChangeF3D.h.

◆ _radius

template<typename T >
T olb::CircleCasson3D< T >::_radius
protected

Definition at line 224 of file frameChangeF3D.h.

◆ _scale

template<typename T >
T olb::CircleCasson3D< T >::_scale
protected

Definition at line 228 of file frameChangeF3D.h.

◆ _yieldStress

template<typename T >
T olb::CircleCasson3D< T >::_yieldStress
protected

Definition at line 227 of file frameChangeF3D.h.


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