Skip to content

Setting both Density and Velocity at Boundary

OpenLB – Open Source Lattice Boltzmann Code Forums on OpenLB General Topics Setting both Density and Velocity at Boundary

Viewing 3 posts - 1 through 3 (of 3 total)
  • Author
    Posts
  • #4897
    Julius
    Participant

    Dear all,

    I’ve been working with Shan-Chen two-phase flow in OpenLB. I am interested in simulating droplets, and am using a convection outlet boundary to not distort the droplet.

    For the inlet I would like to set both velocity and density (aka phase) of the fluid. However, that seems to be impossible. The boundary momenta created via addVelocityBoundary does not allow to set the density, while the addPressureBoundary does not allow setting velocity.

    What would be a possible way to set both velocity and density at the inlet boundary?

    Kind Regards,
    Julius

    #4898
    mathias
    Keymaster

    Hi Julius,

    in LBM, desity is like pressure. If you fix it on both side and fix the velocity on one side, the simulation the be unstable.

    I would do it (I have done it that way actually) in the following way: Fix the desity at all inlets and set a pressure condition at the outlet OR fix velociyt + desity (by iniEquilibrium) at one side and use a convection BC at the other side.

    Best
    Mathias

    #4903
    Julius
    Participant

    Hello Mathias,

    Thank you! It didn’t occur to me that I can just set the velocity and density at the inlet with iniEquilibrium and simply not use a boundary manager.

    For all other users who want to do the same, do not forget to exclude the inlet material from the shan-chen coupling, since there are now no ghost nodes to grab density from. (or make your own ghost nodes)

    Regards,
    Julius

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