OpenLB 1.8.1
Loading...
Searching...
No Matches
olb::AnalyticalPorousVelocity3D< 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 <frameChangeF3D.h>

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

Public Member Functions

 AnalyticalPorousVelocity3D (SuperGeometry< T, 3 > &superGeometry, int material, 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

olb::Vector< T, 3 > center
 
olb::Vector< T, 3 > normal
 
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::AnalyticalPorousVelocity3D< T >

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

Definition at line 353 of file frameChangeF3D.h.

Constructor & Destructor Documentation

◆ AnalyticalPorousVelocity3D()

template<typename T >
olb::AnalyticalPorousVelocity3D< T >::AnalyticalPorousVelocity3D ( SuperGeometry< T, 3 > & superGeometry,
int material,
T K_,
T mu_,
T gradP_,
T radius_,
T eps_ = T(1) )

Definition at line 734 of file frameChangeF3D.hh.

735 : AnalyticalF3D<T,T>(3), K(K_), mu(mu_), gradP(gradP_), radius(radius_), eps(eps_)
736{
737 this->getName() = "AnalyticalPorousVelocity3D";
738
739 center = superGeometry.getStatistics().getCenterPhysR(material);
740 std::vector<T> normalTmp;
741 normalTmp.push_back(superGeometry.getStatistics().computeDiscreteNormal(material)[0]);
742 normalTmp.push_back(superGeometry.getStatistics().computeDiscreteNormal(material)[1]);
743 normalTmp.push_back(superGeometry.getStatistics().computeDiscreteNormal(material)[2]);
744 normal = util::normalize(normalTmp);
745
746};
std::string & getName()
read and write access to name
Definition genericF.hh:51
Vector< T, D > normalize(const Vector< T, D > &a)
AnalyticalF< 3, T, S > AnalyticalF3D

References olb::AnalyticalPorousVelocity3D< T >::center, olb::GenericF< T, S >::getName(), olb::SuperGeometry< T, D >::getStatistics(), olb::AnalyticalPorousVelocity3D< T >::normal, and olb::util::normalize().

+ Here is the call graph for this function:

Member Function Documentation

◆ getPeakVelocity()

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

Definition at line 750 of file frameChangeF3D.hh.

751{
752 T uMax = K / mu*gradP*(1. - 1./(util::cosh((util::sqrt(1./K))*radius)));
753
754 return uMax/eps;
755};
Expr sqrt(Expr x)
Definition expr.cpp:225
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::AnalyticalPorousVelocity3D< T >::operator() ( T output[],
const T input[] )
override

Definition at line 759 of file frameChangeF3D.hh.

760{
761 T dist[3] = {};
762 dist[0] = normal[0]*util::sqrt((x[1]-center[1])*(x[1]-center[1])+(x[2]-center[2])*(x[2]-center[2]));
763 dist[1] = normal[1]*util::sqrt((x[0]-center[0])*(x[0]-center[0])+(x[2]-center[2])*(x[2]-center[2]));
764 dist[2] = normal[2]*util::sqrt((x[1]-center[1])*(x[1]-center[1])+(x[0]-center[0])*(x[0]-center[0]));
765
766 output[0] = K / mu*gradP*(1. - (util::cosh((util::sqrt(1./K))*(dist[0])))/(util::cosh((util::sqrt(1./K))*radius)));
767 output[1] = K / mu*gradP*(1. - (util::cosh((util::sqrt(1./K))*(dist[1])))/(util::cosh((util::sqrt(1./K))*radius)));
768 output[2] = K / mu*gradP*(1. - (util::cosh((util::sqrt(1./K))*(dist[2])))/(util::cosh((util::sqrt(1./K))*radius)));
769
770 output[0] *= normal[0]/eps;
771 output[1] *= normal[1]/eps;
772 output[2] *= normal[2]/eps;
773
774 return true;
775};

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

+ Here is the call graph for this function:

Member Data Documentation

◆ center

template<typename T >
olb::Vector<T, 3> olb::AnalyticalPorousVelocity3D< T >::center
protected

Definition at line 355 of file frameChangeF3D.h.

◆ eps

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

Definition at line 358 of file frameChangeF3D.h.

◆ gradP

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

Definition at line 357 of file frameChangeF3D.h.

◆ K

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

Definition at line 357 of file frameChangeF3D.h.

◆ mu

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

Definition at line 357 of file frameChangeF3D.h.

◆ normal

template<typename T >
olb::Vector<T, 3> olb::AnalyticalPorousVelocity3D< T >::normal
protected

Definition at line 356 of file frameChangeF3D.h.

◆ radius

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

Definition at line 357 of file frameChangeF3D.h.


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