Microflow 3D  v1.0
MF::Solver_CPU::FluidFunctions Class Reference

The FluidFunctions class collects calculation algorithms of rho and velocity LB for fluid nodes. More...

#include <FluidFunctions.h>

Public Member Functions

 FluidFunctions ()=default
 
 ~FluidFunctions ()=default
 

Static Public Member Functions

static void Initialize (const std::shared_ptr< MF::Solver_CPU::CaseParameters > &CaseParameters_Ptr, const std::shared_ptr< MF::GU::LatticeParametersD3Q19 > &LatticeParameters_Ptr)
 
static void SetFluidSolidNodePointerToFunc (const std::shared_ptr< MF::Database::ThreadArray > &ThreadArray_Ptr)
 Sets pointers to fluid functions of MFThread. More...
 

Static Public Attributes

static std::shared_ptr< MF::Solver_CPU::CaseParametersits_CaseParameters_Ptr = nullptr
 
static std::shared_ptr< MF::GU::LatticeParametersD3Q19its_LatticeParameters_Ptr = nullptr
 

Detailed Description

The FluidFunctions class collects calculation algorithms of rho and velocity LB for fluid nodes.

Definition at line 26 of file FluidFunctions.h.

Constructor & Destructor Documentation

◆ FluidFunctions()

MF::Solver_CPU::FluidFunctions::FluidFunctions ( )
default

◆ ~FluidFunctions()

MF::Solver_CPU::FluidFunctions::~FluidFunctions ( )
default

Member Function Documentation

◆ Initialize()

static void MF::Solver_CPU::FluidFunctions::Initialize ( const std::shared_ptr< MF::Solver_CPU::CaseParameters > &  CaseParameters_Ptr,
const std::shared_ptr< MF::GU::LatticeParametersD3Q19 > &  LatticeParameters_Ptr 
)
inlinestatic

Definition at line 34 of file FluidFunctions.h.

References SetFluidSolidNodePointerToFunc().

Referenced by main().

34  {
35  its_CaseParameters_Ptr = CaseParameters_Ptr;
36  its_LatticeParameters_Ptr = LatticeParameters_Ptr;
37  };
static std::shared_ptr< MF::Solver_CPU::CaseParameters > its_CaseParameters_Ptr
static std::shared_ptr< MF::GU::LatticeParametersD3Q19 > its_LatticeParameters_Ptr

◆ SetFluidSolidNodePointerToFunc()

void MF::Solver_CPU::FluidFunctions::SetFluidSolidNodePointerToFunc ( const std::shared_ptr< MF::Database::ThreadArray > &  ThreadArray_Ptr)
static

Sets pointers to fluid functions of MFThread.

Definition at line 15 of file FluidFunctions.cpp.

References DirectionVectorComponent_Cx, DirectionVectorComponent_Cy, DirectionVectorComponent_Cz, f, MF::Solver_CPU::FBGK, MF::Solver_CPU::Incompressible, its_CaseParameters_Ptr, its_LatticeParameters_Ptr, MFQ19, MF::Database::Vec4< T >::rho, MF::Database::Vec4< T >::x, MF::Database::Vec4< T >::y, and MF::Database::Vec4< T >::z.

Referenced by Initialize(), and main().

15  {
16 
17  for (auto & Thread_Ptr : *ThreadArray_Ptr->m_ThreadsTable_Ptr) {
18  switch (Thread_Ptr->m_NodeType) {
19  case 4: //Periodic boundary
20  case 1: { //Fluid node
21  if (its_CaseParameters_Ptr->FluidFlowModel_MT == MF::Solver_CPU::FlowTypeClass::Incompressible) { //Incompressible flow
22  if (its_CaseParameters_Ptr->CollisionModel_KT == MF::Solver_CPU::ModelTypeClass::FBGK) { //FBGK
23  Thread_Ptr->m_pVRLBFunction = MF::Solver_CPU::FluidFunctions::VRFluidLB_FBGKIncompr;
24  }
25  else { //BGK, MRT, MRT2 incompressible
26  Thread_Ptr->m_pVRLBFunction = MF::Solver_CPU::FluidFunctions::VRFluidLB_Incompr;
27  }
28  }
29  else { //Quasi compressible flow
30  if (its_CaseParameters_Ptr->CollisionModel_KT == MF::Solver_CPU::ModelTypeClass::FBGK) { //FBGK
31  Thread_Ptr->m_pVRLBFunction = MF::Solver_CPU::FluidFunctions::VRFluidLB_FBGKQuasiCompr;
32  }
33  else {//BGK, MRT, MRT2 quasi compressible
34  Thread_Ptr->m_pVRLBFunction = MF::Solver_CPU::FluidFunctions::VRFluidLB_QuasiCompr;
35  }
36  }
37  break;
38  }
39  case 0: {
40  Thread_Ptr->m_pVRLBFunction = MF::Solver_CPU::FluidFunctions::DoNothing;
41  Thread_Ptr->m_DoPropagation = false;
42  Thread_Ptr->m_DoCollision = false;
43  Thread_Ptr->m_DoPreCollision = false;
44  break;} // Solid node
45 
46  default: {break;} // All other nodes
47  }
48  }
49 }
static std::shared_ptr< MF::Solver_CPU::CaseParameters > its_CaseParameters_Ptr

Field Documentation

◆ its_CaseParameters_Ptr

std::shared_ptr<MF::Solver_CPU::CaseParameters> MF::Solver_CPU::FluidFunctions::its_CaseParameters_Ptr = nullptr
inlinestatic

Definition at line 31 of file FluidFunctions.h.

Referenced by SetFluidSolidNodePointerToFunc().

◆ its_LatticeParameters_Ptr

std::shared_ptr<MF::GU::LatticeParametersD3Q19> MF::Solver_CPU::FluidFunctions::its_LatticeParameters_Ptr = nullptr
inlinestatic

Definition at line 32 of file FluidFunctions.h.

Referenced by SetFluidSolidNodePointerToFunc().


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