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

Analytical solution of porous media channel flow with low Reynolds number See Spaid and Phelan (doi:10.1063/1.869392) More...

#include <frameChangeF2D.h>

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

Public Member Functions

 AnalyticalPorousVelocity2D (std::vector< T > axisDirection_, T K_, T mu_, T gradP_, T radius_, T eps_=T(1))
 
getPeakVelocity ()
 
bool operator() (T output[], const T input[]) 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

std::vector< T > axisDirection
 
K
 
mu
 
gradP
 
radius
 
eps
 

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

Analytical solution of porous media channel flow with low Reynolds number See Spaid and Phelan (doi:10.1063/1.869392)

Definition at line 104 of file frameChangeF2D.h.

Constructor & Destructor Documentation

◆ AnalyticalPorousVelocity2D()

template<typename T >
olb::AnalyticalPorousVelocity2D< T >::AnalyticalPorousVelocity2D ( std::vector< T > axisDirection_,
T K_,
T mu_,
T gradP_,
T radius_,
T eps_ = T(1) )

Definition at line 136 of file frameChangeF2D.hh.

137 : AnalyticalF2D<T,T>(2), axisDirection(axisDirection_), K(K_), mu(mu_), gradP(gradP_),radius(radius_), eps(eps_)
138{
139 this->getName() = "AnalyticalPorousVelocity2D";
140};
std::string & getName()
read and write access to name
Definition genericF.hh:51

References olb::GenericF< T, S >::getName().

+ Here is the call graph for this function:

Member Function Documentation

◆ getPeakVelocity()

template<typename T >
T olb::AnalyticalPorousVelocity2D< T >::getPeakVelocity ( )

Definition at line 144 of file frameChangeF2D.hh.

145{
146 T uMax = K / mu*gradP*(1. - 1./(util::cosh((util::sqrt(1./K))*radius)));
147
148 return uMax/eps;
149};
cpu::simd::Pack< T > sqrt(cpu::simd::Pack< T > value)
Definition pack.h:100
ADf< T, DIM > cosh(const ADf< T, DIM > &a)
Definition aDiff.h:657

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

+ Here is the call graph for this function:

◆ operator()()

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

Definition at line 153 of file frameChangeF2D.hh.

154{
155 output[0] = K / mu*gradP*(1. - (util::cosh((util::sqrt(1./K))*(input[1] - radius)))/(util::cosh((util::sqrt(1./K))*radius)));
156 output[1] = K / mu*gradP*(1. - (util::cosh((util::sqrt(1./K))*(input[0] - radius)))/(util::cosh((util::sqrt(1./K))*radius)));
157
158 output[0] *= axisDirection[0]/eps;
159 output[1] *= axisDirection[1]/eps;
160
161 return true;
162};

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

+ Here is the call graph for this function:

Member Data Documentation

◆ axisDirection

template<typename T >
std::vector<T> olb::AnalyticalPorousVelocity2D< T >::axisDirection
protected

Definition at line 106 of file frameChangeF2D.h.

◆ eps

template<typename T >
T olb::AnalyticalPorousVelocity2D< T >::eps
protected

Definition at line 108 of file frameChangeF2D.h.

◆ gradP

template<typename T >
T olb::AnalyticalPorousVelocity2D< T >::gradP
protected

Definition at line 107 of file frameChangeF2D.h.

◆ K

template<typename T >
T olb::AnalyticalPorousVelocity2D< T >::K
protected

Definition at line 107 of file frameChangeF2D.h.

◆ mu

template<typename T >
T olb::AnalyticalPorousVelocity2D< T >::mu
protected

Definition at line 107 of file frameChangeF2D.h.

◆ radius

template<typename T >
T olb::AnalyticalPorousVelocity2D< T >::radius
protected

Definition at line 107 of file frameChangeF2D.h.


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