Velocity-dependent force field

Hello all,
I am trying to study the flow around a porous cylinder by adding an external force field, which is velocity-dependent. It seems to be getting meaningful results with small force, as shown in the following figure. However, the large fore lead to strange results.
I am not sure there’s something wrong with the code. because I am not good at C++ and palabos.

  • The code involved is as follows:

    Box2D AllBox(111,130,15,25);
    Array<T,2> force ;
    Array<T,2> velocity;
    for (plint iT=0; iTparameters.getDeltaT()<maxT; ++iT) {
    Array<T,2> velocity;
    for (plint iX=AllBox.x0; iX<=AllBox.x1; ++iX)
    for (plint iY=AllBox.y0; iY<=AllBox.y1; ++iY)
    // Computation of the force
    lattice.get(iX, iY).computeVelocity(velocity);
    for (plint iD = 0; iD < 2; ++iD)
    force[iD] = - (nu
    (velocity[iD]/(dx/dt))/klb - cflb/std::sqrt(klb)std::abs((velocity[iD]/(dx/dt)))(velocity[iD]/(dx/dt)));


    setExternalVector(lattice, AllBox, DESCRIPTOR::ExternalField::forceBeginsAt,force);
    Could you comment something ?

Thank you,

1 Like