Stokes drag dynamics
OpenLB – Open Source Lattice Boltzmann Code › Forums › on OpenLB › General Topics › Stokes drag dynamics
- This topic has 2 replies, 2 voices, and was last updated 3 months, 2 weeks ago by liu.
-
AuthorPosts
-
October 24, 2024 at 4:14 am #9426liuParticipant
Dear Community,
I would like to ask if in this dynamic model(BGK advection diffusion Stokes drag dynamics), the Stokes drag is an additional force source term added to the standard convection-diffusion equation. I saw that this force is defined according to the following code.
Thank you.
template<typename T, typename DESCRIPTOR,
typename ADLattice>
AdvDiffDragForce3D<T,DESCRIPTOR,ADLattice>::AdvDiffDragForce3D(UnitConverter<T,DESCRIPTOR> const& converter_, T pRadius_, T pRho_)
{
initArg = 8;
dragCoeff = (9.*converter_.getPhysViscosity()*converter_.getPhysDensity()*converter_.getConversionFactorTime()) / (2.*pRho_*pRadius_*pRadius_);
}// ========= the BGK advection diffusion Stokes drag dynamics ========//
/// This approach contains a slight error in the diffusion term.
template<typename T, typename DESCRIPTOR, typename MOMENTA=momenta::AdvectionDiffusionBulkTuple>
struct ParticleAdvectionDiffusionBGKdynamics final : public dynamics::CustomCollision<T,DESCRIPTOR,MOMENTA> {
public:
using MomentaF = typename momenta::Tuple<
typename MOMENTA::density,
momenta::FixedVelocityMomentum,
typename MOMENTA::stress,
typename MOMENTA::definition
>::template type<DESCRIPTOR>;using parameters = meta::list<descriptors::OMEGA,descriptors::LATTICE_TIME>;
template <typename M>
using exchange_momenta = ParticleAdvectionDiffusionBGKdynamics<T,DESCRIPTOR,M>;std::type_index id() override {
return typeid(ParticleAdvectionDiffusionBGKdynamics);
};AbstractParameters<T,DESCRIPTOR>& getParameters(BlockLattice<T,DESCRIPTOR>& block) override {
return block.template getData<OperatorParameters<ParticleAdvectionDiffusionBGKdynamics>>();
}template <typename CELL, typename PARAMETERS, typename V=typename CELL::value_t>
CellStatistic<V> apply(CELL& cell, PARAMETERS& parameters) {
const V omega = parameters.template get<descriptors::OMEGA>();
const std::size_t time = parameters.template get<descriptors::LATTICE_TIME>();
const auto u = (time % 2 == 0) ? cell.template getField<descriptors::VELOCITY>()
: cell.template getField<descriptors::VELOCITY2>();
V rho = MomentaF().computeRho(cell);
V uSqr = lbm<DESCRIPTOR>::bgkCollision(cell, rho, u, omega);
return {rho, uSqr};
};T computeEquilibrium(int iPop, T rho, const T u[DESCRIPTOR::d]) const override {
return equilibrium<DESCRIPTOR>::template firstOrder(iPop, rho, u);
};std::string getName() const override {
return “ParticleAdvectionDiffusionBGKdynamics<” + MomentaF().getName() + “>”;
};};
October 24, 2024 at 10:18 am #9433mathiasKeymasterDont ask twice the some thing in our forum! You can see that as a force, yes. Here it is implemented as a shift of the velocities (fluid to particle). See the paper of Trunk https://www.sciencedirect.com/science/article/abs/pii/S1877750316300345
October 24, 2024 at 12:38 pm #9435liuParticipantthank you
-
AuthorPosts
- You must be logged in to reply to this topic.