From 7ab451782783929745de9af1cbde51744d194357 Mon Sep 17 00:00:00 2001
From: Michael Kuron <mkuron@icp.uni-stuttgart.de>
Date: Sat, 5 Sep 2020 12:43:38 +0200
Subject: [PATCH] Bugfix: Guo force model for 2D non-SRT

---
 src/lbm/lattice_model/ForceModel.h | 6 ++----
 1 file changed, 2 insertions(+), 4 deletions(-)

diff --git a/src/lbm/lattice_model/ForceModel.h b/src/lbm/lattice_model/ForceModel.h
index fdb1d83e9..928cf7073 100644
--- a/src/lbm/lattice_model/ForceModel.h
+++ b/src/lbm/lattice_model/ForceModel.h
@@ -498,14 +498,13 @@ public:
    {
       if (!std::is_same< typename LatticeModel_T::CollisionModel::tag, collision_model::SRT_tag >::value)
       {
-         const real_t one_third  = real_t(1) / real_t(3);
          const real_t one_over_d  = real_t(1) / real_t(LatticeModel_T::Stencil::D);
       
          const auto common = Matrix3<real_t>::makeDiagonalMatrix( velocity * bodyForce_ );
          return (tensorProduct( velocity, bodyForce_ ) +
                  tensorProduct( bodyForce_, velocity ) -
                  common * (real_t(2)*one_over_d) ) * real_t(0.5) * ( real_t(2) + omega )
-                + common * ( one_third * ( real_t(2) + omega_bulk ) );
+                + common * ( one_over_d * ( real_t(2) + omega_bulk ) );
       }
       else
       {
@@ -585,14 +584,13 @@ public:
    {
       if (!std::is_same< typename LatticeModel_T::CollisionModel::tag, collision_model::SRT_tag >::value)
       {
-         const real_t one_third  = real_t(1) / real_t(3);
          const real_t one_over_d  = real_t(1) / real_t(LatticeModel_T::Stencil::D);
       
          const auto common = Matrix3<real_t>::makeDiagonalMatrix( velocity * force(x,y,z) );
          return (tensorProduct( velocity, force(x,y,z) ) +
                  tensorProduct( force(x,y,z), velocity ) -
                  common * (real_t(2)*one_over_d) ) * real_t(0.5) * ( real_t(2) + omega )
-                + common * ( one_third * ( real_t(2) + omega_bulk ) );
+                + common * ( one_over_d * ( real_t(2) + omega_bulk ) );
       }
       else
       {
-- 
GitLab