Hi all!
I am attempting to model some higher density ratio simulations using ShanChen and was looking for a way to test some different solutions for it using e.g. different force models for solid-fluid interaction in the velocity shift equilibrium equation. Although I have seen that the velocity shift was already implemented, I am having trouble understanding where the force comes from and where I could for example write a function to implement these other different force equations.
So far, what I was able to gather was that the velocity shift is implemented in “forcing.h” through
CellStatistic<V> compute(CELL& cell, PARAMETERS& parameters, FEQ& fEq) any_platform {
V rho, u[DESCRIPTOR::d], uSqr{};
MomentaF().computeRhoU(cell, rho, u);
const auto force = cell.template getFieldPointer<descriptors::FORCE>();
for (int iVel=0; iVel<DESCRIPTOR::d; ++iVel) {
u[iVel] += force[iVel] / parameters.template get<descriptors::OMEGA>();
uSqr += u[iVel] * u[iVel];
}
for (unsigned iPop=0; iPop < DESCRIPTOR::q; ++iPop) {
fEq[iPop] = EquilibriumF().compute(iPop, rho, u);
}
return {rho, uSqr};
};
but when I try to follow the rabbit hole of finding where the force is specifically defined, I only find it defined as a generic FIELD_BASE, not having quite understood where the actual equation comes in.
Thank you,
Lucas