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

  1. Modify the number of Equations in Problem

    1Base::nbEqs = 3;
    2Base::nbEqs = 4;
    
  2. For functions init_f and update_f, add a new block. For example copy-paste the block of Equation1 and modify EquationTag1 –> EquationTag4 and collisionType1 –> collisionType4

    1if (params.collisionType1 == BGK) {
    2   update1eq<EquationTag4, BGKCollider<dim, npop>>();
    3}
    
  3. In make_boundaries add a new line for periodic BC

    1this->bcPerMgr.make_boundaries(scheme.f4, BOUNDARY_EQUATION_4);
    

File LBMScheme_MPwSLphC.h

  1. In file LBMScheme add tag EquationTag4 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}