Skip to content

Abnormal LocalPressure outlet velocity and crash with Shan–Chen

Due to recent bot attacks we have changed the sign-up process. If you want to participate in our forum, first register on this website and then send a message via our contact form.

Forums OpenLB General Topics Abnormal LocalPressure outlet velocity and crash with Shan–Chen

Viewing 3 posts - 1 through 3 (of 3 total)
  • Author
    Posts
  • #10687
    Wenyuan
    Participant

    Dear community,

    I am running an immiscible two‑component flow simulation using the Shan–Chen model, with the outlet boundary condition set to ‘boundary::LocalPressure’.

    The simulation starts normally but crashes after a few time steps. Upon inspection, I found that the crash is triggered by the velocity of LocalPressure outlet becoming abnormally large, originating from the center of the outlet.

    Digging into the implementation of LocalPressure, I noticed that the velocity is computed in:

    
    template<int direction, int orientation>
    struct olb::momenta::FixedPressureMomentum<direction, orientation> {
        ...
        void computeU(CELL &cell, U &u) {
            u[direction] = orientation * ((V{2} * rhoNormal + rhoOnWall + V{1}) / rho - V{1});
        }
    };
    

    I am puzzled by the additional + V{1} term in the numerator. In Krüger’s book, the velocity is calculated as:

    u_(w,y)=-c+c/ρ_w [2×ρ_Normal+ρ_OnWall].

    This seems to differ from the above implementation. What makes this difference?

    Additionally, any insights on why the outlet boundary might crash, and possible strategies to prevent it, would be greatly appreciated.

    Best regards,
    Wenyuan

    #10690
    Wenyuan
    Participant

    Additionally, the density of fluid 2 (on latticeTwo) is set to 1 at the LocalPressrue outlet, while that of fluid 1 (on latticeOne) is set to 1e-6. It is the velocity of fluid 1 (on latticeOne) that becomes abnormally large first.

    #10762
    TimBingert
    Participant

    Hi Wenyuan,

    the best advice I can give is to switch the model to incompressible conservative phase field for your immiscible two-phase flow case as the boundary conditions are not tested for the mentioned Shan-Chen model (which is bad anyways). You can find an example in multicomponent/bubbleChannel2d, this example has properly working boundary conditions.

    Hope this helps, kind regards
    Tim

Viewing 3 posts - 1 through 3 (of 3 total)
  • You must be logged in to reply to this topic.