22 #include <LbmLib/include/solver/FluidSolver/Luo1993ForceModel.hpp>
23 #include <LbmLib/include/Direction.hpp>
33 std::vector<double>& forcecontribution)
35 const double W1rho3 = rho * 3.0 / 9.0;
36 const double W2rho3 = rho *3.0 / 36.0;
38 forcecontribution.resize(9);
40 forcecontribution[T] = 0.0;
41 forcecontribution[E] = W1rho3 * f.
x;
42 forcecontribution[N] = W1rho3 * f.
y;
43 forcecontribution[W] = - W1rho3 * f.
x;
44 forcecontribution[S] = - W1rho3 * f.
y;
45 forcecontribution[NE] = W2rho3 * (f.
x + f.
y);
46 forcecontribution[NW] = W2rho3 * (- f.
x + f.
y);
47 forcecontribution[SW] = W2rho3 * (- f.
x - f.
y);
48 forcecontribution[SE] = W2rho3 * (f.
x - f.
y);
52 const std::array<double, 9> &fi,
56 const double rhoI = 1.0/rho;
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.
T x
x the value in x direction
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