22 #include <LbmLib/include/solver/FluidSolver/GuoZhengShi2002ForceModel.hpp>
23 #include <LbmLib/include/Direction.hpp>
33 std::vector<double>& forcecontribution)
39 forcecontribution.clear();
40 forcecontribution.resize(9);
42 const double W0 = (1.0-0.5/tau) * 4.0/9.0;
43 const double W1 = (1.0-0.5/tau) / 9.0;
44 const double W2 = (1.0-0.5/tau) / 36.0;
46 forcecontribution[T] = W0 * (- 3.0*u.
x*f.
x - 3.0*u.
y*f.
y);
47 forcecontribution[E] = W1 * ((6.0*u.
x + 3.0)*f.
x - 3.0*u.
y*f.
y);
48 forcecontribution[N] = W1 * (- 3.0*u.
x*f.
x + (6.0*u.
y + 3.0)*f.
y);
49 forcecontribution[W] = W1 * ((6.0*u.
x - 3.0)*f.
x - 3.0*u.
y*f.
y);
50 forcecontribution[S] = W1 * (- 3.0*u.
x*f.
x + (6.0*u.
y - 3.0)*f.
y);
51 forcecontribution[NE] = W2 * ((6.0*u.
x + 9.0*u.
y + 3.0)*f.
x + (9.0*u.
x - 3.0*u.
y + 3.0)*f.
y);
52 forcecontribution[NW] = W2 * ((6.0*u.
x - 9.0*u.
y - 3.0)*f.
x + (-9.0*u.
x + 6.0*u.
y + 3.0)*f.
y);
53 forcecontribution[SW] = W2 * ((6.0*u.
x + 9.0*u.
y - 3.0)*f.
x + (9.0*u.
x + 6.0*u.
y - 3.0)*f.
y);
54 forcecontribution[SE] = W2 * ((6.0*u.
x - 9.0*u.
y + 3.0)*f.
x + (-9.0*u.
x + 6.0*u.
y - 3.0)*f.
y);
58 const std::array<double, 9> &fi,
62 const double rhoI = 1.0/rho;
T x
x the value in x direction
virtual void computeVelocity(const double rho, const std::array< double, 9 > &fi, const Field< double > f, Field< double > &u)
computeVelocity since this operation depends on the force model.
virtual void computeForce(const double tau, const double rho, const Field< double > u, const Field< double > f, std::vector< double > &forcecontribution)
computeForce
T y
y the value in y direction