OpenLB 1.7
Loading...
Searching...
No Matches
Classes | Public Types | Public Member Functions | Static Public Attributes | List of all members
olb::NavierStokesAdvectionDiffusionCoupling Struct Reference

Coupling between a Navier-Stokes and an Advection-Diffusion lattice. More...

#include <navierStokesAdvectionDiffusionCoupling.h>

+ Collaboration diagram for olb::NavierStokesAdvectionDiffusionCoupling:

Classes

struct  FORCE_PREFACTOR
 
struct  T0
 

Public Types

using parameters = meta::list<FORCE_PREFACTOR,T0>
 

Public Member Functions

template<typename CELLS , typename PARAMETERS >
void apply (CELLS &cells, PARAMETERS &parameters) any_platform
 

Static Public Attributes

static constexpr OperatorScope scope = OperatorScope::PerCellWithParameters
 

Detailed Description

Coupling between a Navier-Stokes and an Advection-Diffusion lattice.

Definition at line 88 of file navierStokesAdvectionDiffusionCoupling.h.

Member Typedef Documentation

◆ parameters

Definition at line 94 of file navierStokesAdvectionDiffusionCoupling.h.

Member Function Documentation

◆ apply()

template<typename CELLS , typename PARAMETERS >
void olb::NavierStokesAdvectionDiffusionCoupling::apply ( CELLS & cells,
PARAMETERS & parameters )
inline

Definition at line 97 of file navierStokesAdvectionDiffusionCoupling.h.

98 {
99 using V = typename CELLS::template value_t<names::NavierStokes>::value_t;
100 using DESCRIPTOR = typename CELLS::template value_t<names::NavierStokes>::descriptor_t;
101
102 auto& cellNSE = cells.template get<names::NavierStokes>();
103 auto& cellADE = cells.template get<names::Temperature>();
104
105 // computation of the bousinessq force
106 auto force = cellNSE.template getFieldPointer<descriptors::FORCE>();
107 auto forcePrefactor = parameters.template get<FORCE_PREFACTOR>();
108 V temperatureDifference = cellADE.computeRho() - parameters.template get<T0>();
109 for (unsigned iD = 0; iD < DESCRIPTOR::d; ++iD) {
110 force[iD] = forcePrefactor[iD] * temperatureDifference;
111 }
112
113 // Velocity coupling
114 V u[DESCRIPTOR::d] { };
115 cellNSE.computeU(u);
116 cellADE.template setField<descriptors::VELOCITY>(u);
117 }

Member Data Documentation

◆ scope

constexpr OperatorScope olb::NavierStokesAdvectionDiffusionCoupling::scope = OperatorScope::PerCellWithParameters
staticconstexpr

Definition at line 89 of file navierStokesAdvectionDiffusionCoupling.h.


The documentation for this struct was generated from the following file: