Coupling between a Navier-Stokes and an Advection-Diffusion lattice.
More...
#include <navierStokesAdvectionDiffusionCoupling.h>
Coupling between a Navier-Stokes and an Advection-Diffusion lattice.
Definition at line 88 of file navierStokesAdvectionDiffusionCoupling.h.
◆ parameters
◆ 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
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
114 V u[DESCRIPTOR::d] { };
115 cellNSE.computeU(u);
116 cellADE.template setField<descriptors::VELOCITY>(u);
117 }
meta::list< FORCE_PREFACTOR, T0 > parameters
◆ scope
The documentation for this struct was generated from the following file: