OpenLB 1.7
Loading...
Searching...
No Matches
Public Member Functions | Protected Attributes | List of all members
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 314 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 708 of file frameChangeF3D.hh.

709 : AnalyticalF3D<T,T>(3), K(K_), mu(mu_), gradP(gradP_), radius(radius_), eps(eps_)
710{
711 this->getName() = "AnalyticalPorousVelocity3D";
712
713 center = superGeometry.getStatistics().getCenterPhysR(material);
714 std::vector<T> normalTmp;
715 normalTmp.push_back(superGeometry.getStatistics().computeDiscreteNormal(material)[0]);
716 normalTmp.push_back(superGeometry.getStatistics().computeDiscreteNormal(material)[1]);
717 normalTmp.push_back(superGeometry.getStatistics().computeDiscreteNormal(material)[2]);
718 normal = util::normalize(normalTmp);
719
720};
std::string & getName()
read and write access to name
Definition genericF.hh:51
SuperGeometryStatistics< T, D > & getStatistics()
Returns the statistics object.
Vector< T, D > normalize(const Vector< T, D > &a)

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 724 of file frameChangeF3D.hh.

725{
726 T uMax = K / mu*gradP*(1. - 1./(util::cosh((util::sqrt(1./K))*radius)));
727
728 return uMax/eps;
729};
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::AnalyticalPorousVelocity3D< T >::operator() ( T output[],
const T input[] )
override

Definition at line 733 of file frameChangeF3D.hh.

734{
735 T dist[3] = {};
736 dist[0] = normal[0]*util::sqrt((x[1]-center[1])*(x[1]-center[1])+(x[2]-center[2])*(x[2]-center[2]));
737 dist[1] = normal[1]*util::sqrt((x[0]-center[0])*(x[0]-center[0])+(x[2]-center[2])*(x[2]-center[2]));
738 dist[2] = normal[2]*util::sqrt((x[1]-center[1])*(x[1]-center[1])+(x[0]-center[0])*(x[0]-center[0]));
739
740 output[0] = K / mu*gradP*(1. - (util::cosh((util::sqrt(1./K))*(dist[0])))/(util::cosh((util::sqrt(1./K))*radius)));
741 output[1] = K / mu*gradP*(1. - (util::cosh((util::sqrt(1./K))*(dist[1])))/(util::cosh((util::sqrt(1./K))*radius)));
742 output[2] = K / mu*gradP*(1. - (util::cosh((util::sqrt(1./K))*(dist[2])))/(util::cosh((util::sqrt(1./K))*radius)));
743
744 output[0] *= normal[0]/eps;
745 output[1] *= normal[1]/eps;
746 output[2] *= normal[2]/eps;
747
748 return true;
749};

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 316 of file frameChangeF3D.h.

◆ eps

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

Definition at line 319 of file frameChangeF3D.h.

◆ gradP

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

Definition at line 318 of file frameChangeF3D.h.

◆ K

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

Definition at line 318 of file frameChangeF3D.h.

◆ mu

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

Definition at line 318 of file frameChangeF3D.h.

◆ normal

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

Definition at line 317 of file frameChangeF3D.h.

◆ radius

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

Definition at line 318 of file frameChangeF3D.h.


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