Add a new equation inside the new kernel
In LBM_Saclay 5 equations and distribution functions are already available. If fcount > 5 then modify file src/kernels/LBMSchemeBase.h. Here, we present a case with 4 equations.
File Problem_MPwSLphC.h
Modify the number of Equations in
Problem1Base::nbEqs = 3; 2Base::nbEqs = 4;
For functions
init_fandupdate_f, add a new block. For example copy-paste the block of Equation1 and modifyEquationTag1–>EquationTag4andcollisionType1–>collisionType41if (params.collisionType1 == BGK) { 2 update1eq<EquationTag4, BGKCollider<dim, npop>>(); 3}
In
make_boundariesadd a new line for periodic BC1this->bcPerMgr.make_boundaries(scheme.f4, BOUNDARY_EQUATION_4);
File LBMScheme_MPwSLphC.h
In file
LBMSchemeadd tagEquationTag4 tag.1EquationTag1 tagPHI; 2EquationTag2 tagNS; 3EquationTag3 tagCOMP; 4EquationTag4 tagPSI;
Add new setup collider for new Eq with
1KOKKOS_INLINE_FUNCTION 2void setup_collider(EquationTag4 tag, const IVect<dim> &IJK, 3 BGK_Collider &collider) const { 4 5}