29#ifndef ADVECTION_DIFFUSION_DYNAMICS_H
30#define ADVECTION_DIFFUSION_DYNAMICS_H
39namespace TotalEnthalpy {
51 return "AdvectionDifffusionExternalVelocityCollision";
54 template <
typename DESCRIPTOR,
typename MOMENTA>
57 template <
typename DESCRIPTOR,
typename MOMENTA,
typename EQUILIBRIUM>
60 template <
typename DESCRIPTOR,
typename MOMENTA,
typename EQUILIBRIUM,
typename COLLISION>
64 typename MOMENTA::density,
66 typename MOMENTA::stress,
67 typename MOMENTA::definition
72 template <
typename DESCRIPTOR,
typename MOMENTA,
typename EQUILIBRIUM,
typename COLLISION>
76template<
typename T,
typename DESCRIPTOR,
typename MOMENTA=momenta::AdvectionDiffusionBulkTuple>
85template <
typename T,
typename DESCRIPTOR,
typename DYNAMICS,
typename MOMENTA=momenta::AdvectionDiffusionBulkTuple>
88 using MomentaF =
typename MOMENTA::template type<DESCRIPTOR>;
95 std::type_index
id()
override {
100 return block.template getData<OperatorParameters<CombinedAdvectionDiffusionRLBdynamics>>();
103 template <
typename CELL,
typename PARAMETERS,
typename V=
typename CELL::value_t>
105 V jNeq[DESCRIPTOR::d] { };
107 const V rho =
MomentaF().computeRho(cell);
108 const auto u = cell.template getField<descriptors::VELOCITY>();
111 for (
int iD = 0; iD < DESCRIPTOR::d; ++iD) {
112 jNeq[iD] -= u[iD] * rho;
115 for (
int iPop = 0; iPop < DESCRIPTOR::q; ++iPop) {
116 cell[iPop] =
typename DYNAMICS::EquilibriumF().compute(iPop, rho, u)
120 return typename DYNAMICS::CollisionO().apply(cell,
parameters);
128 return "CombinedAdvectionDiffusionRLBdynamics<" +
MomentaF().getName() +
">";
135template<
typename T,
typename DESCRIPTOR,
typename MOMENTA=momenta::AdvectionDiffusionBulkTuple>
147template<
typename T,
typename DESCRIPTOR,
typename MOMENTA=momenta::AdvectionDiffusionBulkTuple>
161template<
typename T,
typename DESCRIPTOR,
typename MOMENTA=momenta::AdvectionDiffusionBulkTuple>
165 momenta::SourcedDensity<typename MOMENTA::density>,
166 typename MOMENTA::momentum,
167 typename MOMENTA::stress,
168 typename MOMENTA::definition
173 typename MOMENTA::momentum,
174 typename MOMENTA::stress,
175 typename MOMENTA::definition
176 >::template type<DESCRIPTOR>;
183 std::type_index
id()
override {
188 return block.template getData<OperatorParameters<SourcedAdvectionDiffusionBGKdynamics>>();
191 template <
typename CELL,
typename PARAMETERS,
typename V=
typename CELL::value_t>
193 const auto u = cell.template getField<descriptors::VELOCITY>();
194 const V temperature =
MomentaF().computeRho(cell);
195 const V omega =
parameters.template get<descriptors::OMEGA>();
198 const V sourceMod = cell.template getField<descriptors::SOURCE>() * (V{1} - V{0.5} * omega);
200 for (
int iPop = 0; iPop < DESCRIPTOR::q; iPop++ ) {
201 cell[iPop] += sourceMod * descriptors::t<T,DESCRIPTOR>(iPop);
204 return {temperature, uSqr};
212 return "SourcedAdvectionDiffusionBGKdynamics<" +
MomentaF().getName() +
">";
221template<
typename T,
typename DESCRIPTOR,
typename MOMENTA=momenta::AdvectionDiffusionBulkTuple>
225 momenta::SourcedDensity<typename MOMENTA::density>,
226 typename MOMENTA::momentum,
227 typename MOMENTA::stress,
228 typename MOMENTA::definition
233 typename MOMENTA::momentum,
234 typename MOMENTA::stress,
235 typename MOMENTA::definition
236 >::template type<DESCRIPTOR>;
243 std::type_index
id()
override {
248 return block.template getData<OperatorParameters<SourcedLimitedAdvectionDiffusionBGKdynamics>>();
251 template <
typename CELL,
typename PARAMETERS,
typename V=
typename CELL::value_t>
253 const auto u = cell.template getField<descriptors::VELOCITY>();
254 V temperature =
MomentaF().computeRho(cell);
255 if (temperature < V{1.e-8}) temperature = V{1.e-8};
256 const V omega = cell.template getField<descriptors::OMEGA>();
259 const V sourceMod = cell.template getField<descriptors::SOURCE>() * (V{1} - V{0.5} * omega);
261 for (
int iPop = 0; iPop < DESCRIPTOR::q; iPop++ ) {
262 cell[iPop] += sourceMod * descriptors::t<T,DESCRIPTOR>(iPop);
265 return {temperature, uSqr};
273 return "SourcedLimitedAdvectionDiffusionBGKdynamics<" +
MomentaF().getName() +
">";
281template<
typename T,
typename DESCRIPTOR,
typename MOMENTA=momenta::AdvectionDiffusionBulkTuple>
285 using MomentaF =
typename MOMENTA::template type<DESCRIPTOR>;
301 std::type_index
id()
override {
306 return block.template getData<OperatorParameters<TotalEnthalpyAdvectionDiffusionBGKdynamics>>();
309 template<
typename V,
typename PARAMETERS,
typename ENTHALPY>
312 using namespace TotalEnthalpy;
314 const V cp_s =
parameters.template get<CP_S>();
315 const V cp_l =
parameters.template get<CP_L>();
319 const V H_s = cp_s * T_s;
320 const V H_l = cp_l * T_l + l;
323 if (enthalpy <= H_s) {
324 temperature = T_s - (H_s - enthalpy) / cp_s;
326 else if (enthalpy >= H_l) {
327 temperature = T_l + (enthalpy - H_l) / cp_l;
330 temperature = (H_l - enthalpy) / (H_l - H_s) * T_s + (enthalpy - H_s) / (H_l - H_s) * T_l;
335 template<
typename V,
typename PARAMETERS,
typename ENTHALPY>
338 using namespace TotalEnthalpy;
340 const V cp_s =
parameters.template get<CP_S>();
341 const V cp_l =
parameters.template get<CP_L>();
345 const V H_s = cp_s * T_s;
346 const V H_l = cp_l * T_l + l;
349 if (enthalpy <= H_s) {
350 liquid_fraction = 0.;
352 else if (enthalpy >= H_l) {
353 liquid_fraction = 1.;
356 liquid_fraction = (enthalpy - H_s) / l;
358 return liquid_fraction;
366 template <
typename CELL,
typename PARAMETERS,
typename V=
typename CELL::value_t>
368 using namespace TotalEnthalpy;
370 const V lambda_s =
parameters.template get<LAMBDA_S>();
371 const V lambda_l =
parameters.template get<LAMBDA_L>();
372 const V cp_s =
parameters.template get<CP_S>();
373 const V cp_l =
parameters.template get<CP_L>();
374 const V cp_ref = V{2} * cp_s * cp_l / (cp_s + cp_l);
376 const V enthalpy =
MomentaF().computeRho( cell );
377 const V temperature = computeTemperature<V>(
parameters, enthalpy );
378 const V liquid_fraction = computeLiquidFraction<V>(
parameters, enthalpy );
379 const V lambda = (V{1} - liquid_fraction) * lambda_s + liquid_fraction * lambda_l;
380 const V cp = (V{1} - liquid_fraction) * cp_s + liquid_fraction * cp_l;
381 const V omega = V{1} / ( lambda / cp_ref * descriptors::invCs2<T,DESCRIPTOR>() + V{0.5} );
383 const auto u = cell.template getFieldPointer<descriptors::VELOCITY>();
385 const V uSqr = util::normSqr<V,DESCRIPTOR::d>(u);
387 const V f_eq = enthalpy - cp_ref * temperature
388 + cp * temperature * descriptors::t<T,DESCRIPTOR>(0) * ( cp_ref / cp
389 - descriptors::invCs2<T,DESCRIPTOR>() * V{0.5} * uSqr )
390 - descriptors::t<T,DESCRIPTOR>(0);
391 cell[0] *= V{1} - omega;
392 cell[0] += omega * f_eq;
393 for (
int iPop=1; iPop < DESCRIPTOR::q; ++iPop) {
395 for (
int iD=0; iD < DESCRIPTOR::d; ++iD) {
396 c_u += descriptors::c<DESCRIPTOR>(iPop,iD)*u[iD];
398 const V f_eq = cp * temperature * descriptors::t<T,DESCRIPTOR>(iPop) * ( cp_ref / cp + descriptors::invCs2<T,DESCRIPTOR>() * c_u
399 + descriptors::invCs2<T,DESCRIPTOR>() * descriptors::invCs2<T,DESCRIPTOR>() * V{0.5} * c_u *c_u
400 - descriptors::invCs2<T,DESCRIPTOR>() * V{0.5} * uSqr )
401 - descriptors::t<T,DESCRIPTOR>(iPop);
402 cell[iPop] *= V{1} - omega;
403 cell[iPop] += omega * f_eq;
405 return {enthalpy, uSqr};
409 return "TotalEnthalpyAdvectionDiffusionBGKdynamics<" +
MomentaF().getName() +
">";
417template<
typename T,
typename DESCRIPTOR,
typename MOMENTA=momenta::AdvectionDiffusionBulkTuple>
421 using MomentaF =
typename MOMENTA::template type<DESCRIPTOR>;
438 std::type_index
id()
override {
443 return block.template getData<OperatorParameters<TotalEnthalpyAdvectionDiffusionTRTdynamics>>();
446 template<
typename V,
typename PARAMETERS,
typename ENTHALPY>
449 using namespace TotalEnthalpy;
451 const V cp_s =
parameters.template get<CP_S>();
452 const V cp_l =
parameters.template get<CP_L>();
456 const V H_s = cp_s * T_s;
457 const V H_l = cp_l * T_l + l;
460 if (enthalpy <= H_s) {
461 temperature = T_s - (H_s - enthalpy) / cp_s;
463 else if (enthalpy >= H_l) {
464 temperature = T_l + (enthalpy - H_l) / cp_l;
467 temperature = (H_l - enthalpy) / (H_l - H_s) * T_s + (enthalpy - H_s) / (H_l - H_s) * T_l;
472 template<
typename V,
typename PARAMETERS,
typename ENTHALPY>
475 using namespace TotalEnthalpy;
477 const V cp_s =
parameters.template get<CP_S>();
478 const V cp_l =
parameters.template get<CP_L>();
482 const V H_s = cp_s * T_s;
483 const V H_l = cp_l * T_l + l;
486 if (enthalpy <= H_s) {
487 liquid_fraction = 0.;
489 else if (enthalpy >= H_l) {
490 liquid_fraction = 1.;
493 liquid_fraction = (enthalpy - H_s) / l;
495 return liquid_fraction;
498 template<
typename V,
typename PARAMETERS,
typename RHO,
typename U>
501 using namespace TotalEnthalpy;
503 const V temperature = computeTemperature<V>(
parameters, rho);
504 const V liquid_fraction = computeLiquidFraction<V>(
parameters, rho);
506 const V uSqr = util::normSqr<V,DESCRIPTOR::d>(u);
507 const V cp_s =
parameters.template get<CP_S>();
508 const V cp_l =
parameters.template get<CP_L>();
509 const V cp = (V{1} - liquid_fraction) * cp_s + liquid_fraction * cp_l;
510 const V cp_ref = V{2} * cp_s * cp_l / (cp_s + cp_l);
513 for (
int iD=0; iD < DESCRIPTOR::d; ++iD) {
514 c_u += descriptors::c<DESCRIPTOR>(iPop,iD)*u[iD];
519 f_eq = rho - cp_ref * temperature
520 + cp * temperature * descriptors::t<T,DESCRIPTOR>(0) * ( cp_ref / cp
521 - descriptors::invCs2<T,DESCRIPTOR>() * V{0.5} * uSqr )
522 - descriptors::t<T,DESCRIPTOR>(0);
525 f_eq = cp * temperature * descriptors::t<T,DESCRIPTOR>(iPop) * ( cp_ref / cp + descriptors::invCs2<T,DESCRIPTOR>() * c_u
526 + descriptors::invCs2<T,DESCRIPTOR>() * descriptors::invCs2<T,DESCRIPTOR>() * V{0.5} * c_u *c_u
527 - descriptors::invCs2<T,DESCRIPTOR>() * V{0.5} * uSqr )
528 - descriptors::t<T,DESCRIPTOR>(iPop);
534 template <
typename CELL,
typename PARAMETERS,
typename V=
typename CELL::value_t>
536 using namespace TotalEnthalpy;
538 const V lambda_s =
parameters.template get<LAMBDA_S>();
539 const V lambda_l =
parameters.template get<LAMBDA_L>();
540 const V cp_s =
parameters.template get<CP_S>();
541 const V cp_l =
parameters.template get<CP_L>();
542 const V cp_ref = V{2} * cp_s * cp_l / (cp_s + cp_l);
544 const V enthalpy =
MomentaF().computeRho( cell );
545 const V liquid_fraction = computeLiquidFraction<V>(
parameters, enthalpy );
546 const V lambda = (V{1} - liquid_fraction) * lambda_s + liquid_fraction * lambda_l;
547 const V omega = V{1} / ( lambda / cp_ref * descriptors::invCs2<T,DESCRIPTOR>() + V{0.5} );
548 const V magic_parameter =
parameters.template get<collision::TRT::MAGIC>();
549 const V omega2 = V{1} / (magic_parameter/(V{1}/omega-V{0.5})+V{0.5});
551 const auto u = cell.template getField<descriptors::VELOCITY>();
553 const V uSqr = util::normSqr<V,DESCRIPTOR::d>(u);
555 V fPlus[DESCRIPTOR::q], fMinus[DESCRIPTOR::q] { };
556 V fEq[DESCRIPTOR::q], fEqPlus[DESCRIPTOR::q], fEqMinus[DESCRIPTOR::q] { };
558 for (
int iPop=0; iPop < DESCRIPTOR::q; ++iPop) {
559 fPlus[iPop] = 0.5 * ( cell[iPop] + cell[descriptors::opposite<DESCRIPTOR>(iPop)] );
560 fMinus[iPop] = 0.5 * ( cell[iPop] - cell[descriptors::opposite<DESCRIPTOR>(iPop)] );
561 fEq[iPop] = computeEquilibrium<V>(iPop,
parameters, enthalpy, u);
564 for (
int iPop=0; iPop < DESCRIPTOR::q; ++iPop) {
565 fEqPlus[iPop] = 0.5 * ( fEq[iPop] + fEq[descriptors::opposite<DESCRIPTOR>(iPop)] );
566 fEqMinus[iPop] = 0.5 * ( fEq[iPop] - fEq[descriptors::opposite<DESCRIPTOR>(iPop)] );
569 for (
int iPop=0; iPop < DESCRIPTOR::q; ++iPop) {
570 cell[iPop] -= omega2 * (fPlus[iPop] - fEqPlus[iPop]) + omega * (fMinus[iPop] - fEqMinus[iPop]);
573 return {enthalpy, uSqr};
582 return "TotalEnthalpyAdvectionDiffusionTRTdynamics<" +
MomentaF().getName() +
">";
586namespace descriptors {
596template<
typename T,
typename DESCRIPTOR,
typename MOMENTA=momenta::AdvectionDiffusionBulkTuple>
598 using MomentaF =
typename MOMENTA::template type<DESCRIPTOR>;
605 std::type_index
id()
override {
610 return block.template getData<OperatorParameters<PhaseFieldAdvectionDiffusionBGKdynamics>>();
613 template <
typename CELL,
typename PARAMETERS,
typename V=
typename CELL::value_t>
615 const V omega =
parameters.template get<descriptors::OMEGA>();
616 const V interface_thickness =
parameters.template get<descriptors::INTERFACE_THICKNESS>();
618 const V phi =
MomentaF().computeRho( cell );
619 const auto u = cell.template getField<descriptors::VELOCITY>();
620 const V uSqr = util::normSqr<V,DESCRIPTOR::d>(u);
621 const auto mobility = (V{1} / omega - V{0.5}) / descriptors::invCs2<V,DESCRIPTOR>();
623 const auto n = cell.template getFieldPointer<descriptors::INTERPHASE_NORMAL>();
624 for (
int iPop=0; iPop < DESCRIPTOR::q; ++iPop) {
627 for (
int iD=0; iD < DESCRIPTOR::d; ++iD) {
628 c_u += descriptors::c<DESCRIPTOR>(iPop,iD)*u[iD];
629 c_n += descriptors::c<DESCRIPTOR>(iPop,iD)*n[iD];
632 f_eq += descriptors::t<V,DESCRIPTOR>(iPop) * mobility * descriptors::invCs2<V,DESCRIPTOR>()
633 * (V{4} * phi * (V{1} - phi) / interface_thickness) * c_n;
635 cell[iPop] *= V{1} - omega;
636 cell[iPop] += omega * f_eq;
648 return "PhaseFieldAdvectionDiffusionBGKdynamics<" +
MomentaF().getName() +
">";
654template<
typename T,
typename DESCRIPTOR,
typename MOMENTA=momenta::AdvectionDiffusionBulkTuple>
658 typename MOMENTA::density,
660 typename MOMENTA::stress,
661 typename MOMENTA::definition
662 >::template type<DESCRIPTOR>;
666 template <
typename M>
669 std::type_index
id()
override {
674 return block.template getData<OperatorParameters<ParticleAdvectionDiffusionBGKdynamics>>();
677 template <
typename CELL,
typename PARAMETERS,
typename V=
typename CELL::value_t>
679 const V omega =
parameters.template get<descriptors::OMEGA>();
680 const std::size_t time =
parameters.template get<descriptors::LATTICE_TIME>();
681 const auto u = (time % 2 == 0) ? cell.template getField<descriptors::VELOCITY>()
682 : cell.template getField<descriptors::VELOCITY2>();
683 V rho =
MomentaF().computeRho(cell);
693 return "ParticleAdvectionDiffusionBGKdynamics<" +
MomentaF().getName() +
">";
703template<
typename T,
typename DESCRIPTOR,
typename MOMENTA=momenta::AdvectionDiffusionBulkTuple>
712template <
typename T,
typename DESCRIPTOR>
Platform-abstracted block lattice for external access and inter-block interaction.
std::type_index id() override
Expose unique type-identifier for RTTI.
typename MOMENTA::template type< DESCRIPTOR > MomentaF
CellStatistic< V > apply(CELL &cell, PARAMETERS ¶meters) any_platform
typename DYNAMICS::parameters parameters
T computeEquilibrium(int iPop, T rho, const T u[DESCRIPTOR::d]) const override any_platform
Return iPop equilibrium for given first and second momenta.
AbstractParameters< T, DESCRIPTOR > & getParameters(BlockLattice< T, DESCRIPTOR > &block) override
Parameters access for legacy post processors.
std::string getName() const override
Return human-readable name.
Descriptor for all types of 2D and 3D lattices.
Tuple< BulkDensity, BulkMomentum, BulkStress, DefineToNEq > BulkTuple
Standard computation of momenta from the populations in the bulk.
Top level namespace for all of OpenLB.
Dynamic access interface for FIELD-valued parameters.
typename COLLISION::parameters combined_parameters
typename MOMENTA::template type< DESCRIPTOR > combined_momenta
typename COLLISION::template type< DESCRIPTOR, momenta::Tuple< typename MOMENTA::density, momenta::FixedVelocityMomentum, typename MOMENTA::stress, typename MOMENTA::definition >, EQUILIBRIUM > combined_collision
typename EQUILIBRIUM::template type< DESCRIPTOR, MOMENTA > combined_equilibrium
static std::string getName()
Return value of any collision.
This approach contains a slight error in the diffusion term.
std::type_index id() override
Expose unique type-identifier for RTTI.
CellStatistic< V > apply(CELL &cell, PARAMETERS ¶meters)
AbstractParameters< T, DESCRIPTOR > & getParameters(BlockLattice< T, DESCRIPTOR > &block) override
Parameters access for legacy post processors.
typename momenta::Tuple< typename MOMENTA::density, momenta::FixedVelocityMomentum, typename MOMENTA::stress, typename MOMENTA::definition >::template type< DESCRIPTOR > MomentaF
T computeEquilibrium(int iPop, T rho, const T u[DESCRIPTOR::d]) const override
Return iPop equilibrium for given first and second momenta.
std::string getName() const override
Return human-readable name.
typename MOMENTA::template type< DESCRIPTOR > MomentaF
CellStatistic< V > apply(CELL &cell, PARAMETERS ¶meters)
T computeEquilibrium(int iPop, T rho, const T u[DESCRIPTOR::d]) const override
Return iPop equilibrium for given first and second momenta.
AbstractParameters< T, DESCRIPTOR > & getParameters(BlockLattice< T, DESCRIPTOR > &block) override
Parameters access for legacy post processors.
std::type_index id() override
Expose unique type-identifier for RTTI.
std::string getName() const override
Return human-readable name.
CellStatistic< V > apply(CELL &cell, PARAMETERS ¶meters) any_platform
T computeEquilibrium(int iPop, T rho, const T u[DESCRIPTOR::d]) const override any_platform
Return iPop equilibrium for given first and second momenta.
typename momenta::Tuple< momenta::SourcedDensity< typename MOMENTA::density >, typename MOMENTA::momentum, typename MOMENTA::stress, typename MOMENTA::definition >::template type< DESCRIPTOR > MomentaF
AbstractParameters< T, DESCRIPTOR > & getParameters(BlockLattice< T, DESCRIPTOR > &block) override
Parameters access for legacy post processors.
std::string getName() const override
Return human-readable name.
std::type_index id() override
Expose unique type-identifier for RTTI.
std::string getName() const override
Return human-readable name.
T computeEquilibrium(int iPop, T rho, const T u[DESCRIPTOR::d]) const any_platform override
Return iPop equilibrium for given first and second momenta.
AbstractParameters< T, DESCRIPTOR > & getParameters(BlockLattice< T, DESCRIPTOR > &block) override
Parameters access for legacy post processors.
std::type_index id() override
Expose unique type-identifier for RTTI.
CellStatistic< V > apply(CELL &cell, PARAMETERS ¶meters) any_platform
typename momenta::Tuple< momenta::SourcedDensity< typename MOMENTA::density >, typename MOMENTA::momentum, typename MOMENTA::stress, typename MOMENTA::definition >::template type< DESCRIPTOR > MomentaF
V computeLiquidFraction(const PARAMETERS ¶meters, const ENTHALPY &enthalpy) const any_platform
typename MOMENTA::template type< DESCRIPTOR > MomentaF
T computeEquilibrium(int iPop, T rho, const T u[DESCRIPTOR::d]) const override any_platform
Return iPop equilibrium for given first and second momenta.
std::string getName() const override
Return human-readable name.
V computeTemperature(const PARAMETERS ¶meters, const ENTHALPY &enthalpy) const any_platform
static constexpr bool is_vectorizable
CellStatistic< V > apply(CELL &cell, PARAMETERS ¶meters) any_platform
AbstractParameters< T, DESCRIPTOR > & getParameters(BlockLattice< T, DESCRIPTOR > &block) override
Parameters access for legacy post processors.
std::type_index id() override
Expose unique type-identifier for RTTI.
T computeEquilibrium(int iPop, T rho, const T u[DESCRIPTOR::d]) const override
Return iPop equilibrium for given first and second momenta.
typename MOMENTA::template type< DESCRIPTOR > MomentaF
V computeLiquidFraction(const PARAMETERS ¶meters, const ENTHALPY &enthalpy) const
V computeEquilibrium(int iPop, const PARAMETERS ¶meters, RHO &rho, U &u) const
static constexpr bool is_vectorizable
V computeTemperature(const PARAMETERS ¶meters, const ENTHALPY &enthalpy) const
std::string getName() const override
Return human-readable name.
CellStatistic< V > apply(CELL &cell, PARAMETERS ¶meters)
AbstractParameters< T, DESCRIPTOR > & getParameters(BlockLattice< T, DESCRIPTOR > &block) override
Parameters access for legacy post processors.
std::type_index id() override
Expose unique type-identifier for RTTI.
Base of a field whose size is defined by [C,U_1,...,U_N]^T * [1,V_1,...V_N].
Dynamics constructed as a tuple of momenta, equilibrium and collision.
static V firstOrder(int iPop, const RHO &rho, const U &u) any_platform
Computation of equilibrium distribution, first order in u.
static V adeBgkCollision(CELL &cell, const RHO &rho, const VELOCITY &u, const OMEGA &omega) any_platform
Advection diffusion BGK collision step.
static V bgkCollision(CELL &cell, const RHO &rho, const VELOCITY &u, const OMEGA &omega) any_platform
BGK collision step.
The velocity is stored in the external field descriptors::VELOCITY.
Unit conversion handling – header file.