OpenLB 1.7
Loading...
Searching...
No Matches
Public Member Functions | List of all members
olb::AdvDiffSNDragForce3D< T, DESCRIPTOR, ADLattice > Class Template Reference

#include <advectionDiffusionForces.h>

+ Inheritance diagram for olb::AdvDiffSNDragForce3D< T, DESCRIPTOR, ADLattice >:
+ Collaboration diagram for olb::AdvDiffSNDragForce3D< T, DESCRIPTOR, ADLattice >:

Public Member Functions

 AdvDiffSNDragForce3D (UnitConverter< T, DESCRIPTOR > const &converter_, T pRadius_, T pRho_)
 
 ~AdvDiffSNDragForce3D () override
 
void applyForce (T force[], Cell< T, DESCRIPTOR > *nsCell, Cell< T, ADLattice > *adCell, T vel[], int latticeR[]) override
 
- Public Member Functions inherited from olb::AdvectionDiffusionForce3D< T, DESCRIPTOR, ADLattice >
 AdvectionDiffusionForce3D ()
 
virtual ~AdvectionDiffusionForce3D ()
 
int getInitArg ()
 

Detailed Description

template<typename T, typename DESCRIPTOR, typename ADLattice = descriptors::D3Q7<descriptors::VELOCITY,descriptors::VELOCITY2>>
class olb::AdvDiffSNDragForce3D< T, DESCRIPTOR, ADLattice >

Definition at line 65 of file advectionDiffusionForces.h.

Constructor & Destructor Documentation

◆ AdvDiffSNDragForce3D()

template<typename T , typename DESCRIPTOR , typename ADLattice >
olb::AdvDiffSNDragForce3D< T, DESCRIPTOR, ADLattice >::AdvDiffSNDragForce3D ( UnitConverter< T, DESCRIPTOR > const & converter_,
T pRadius_,
T pRho_ )

Definition at line 60 of file advectionDiffusionForces.hh.

61{
62 initArg = 8;
63 dragCoeff = (9.*converter_.getPhysViscosity()*converter_.getPhysDensity()*converter_.getConversionFactorTime()) / (2.*pRho_*pRadius_*pRadius_);
64 Re_pCoeff = 2.*pRadius_/converter_.getPhysViscosity();
65}

References olb::UnitConverter< T, DESCRIPTOR >::getConversionFactorTime(), olb::UnitConverter< T, DESCRIPTOR >::getPhysDensity(), and olb::UnitConverter< T, DESCRIPTOR >::getPhysViscosity().

+ Here is the call graph for this function:

◆ ~AdvDiffSNDragForce3D()

template<typename T , typename DESCRIPTOR , typename ADLattice = descriptors::D3Q7<descriptors::VELOCITY,descriptors::VELOCITY2>>
olb::AdvDiffSNDragForce3D< T, DESCRIPTOR, ADLattice >::~AdvDiffSNDragForce3D ( )
inlineoverride

Definition at line 68 of file advectionDiffusionForces.h.

68{};

Member Function Documentation

◆ applyForce()

template<typename T , typename DESCRIPTOR , typename ADLattice >
void olb::AdvDiffSNDragForce3D< T, DESCRIPTOR, ADLattice >::applyForce ( T force[],
Cell< T, DESCRIPTOR > * nsCell,
Cell< T, ADLattice > * adCell,
T vel[],
int latticeR[] )
overridevirtual

Implements olb::AdvectionDiffusionForce3D< T, DESCRIPTOR, ADLattice >.

Definition at line 69 of file advectionDiffusionForces.hh.

70{
71 T velF[3] = {0.,0.,0.};
72 nsCell->computeU(velF);
73 T magVelF = pow((pow(velF[0],2.)+pow(velF[1],2.)+pow(velF[2],2.)),0.5);
74 T magVel = pow((pow(vel[0],2.)+pow(vel[1],2.)+pow(vel[2],2.)),0.5);
75 T Re_p = Re_pCoeff*abs(magVelF - magVel);
76 for (int i=0; i < DESCRIPTOR::d; i++) {
77 force[i] += dragCoeff*(1. + 0.15*pow(Re_p,0.687))*(velF[i]-vel[i]);
78 }
79}
Pack< T > pow(Pack< T > base, Pack< T > exp)
Definition 256.h:395
std::enable_if_t< std::is_arithmetic< T >::type::value, T > abs(T x)
Definition util.h:396

References olb::abs(), and olb::ConstCell< T, DESCRIPTOR >::computeU().

+ Here is the call graph for this function:

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