Skip to content

correction for tutorial and question

OpenLB – Open Source Lattice Boltzmann Code Forums on OpenLB General Topics correction for tutorial and question

Viewing 8 posts - 1 through 8 (of 8 total)
  • Author
    Posts
  • #1937
    Mamin
    Member

    Hi all,
    first, in page 27 in the tutorial the function used to calculate pressure from density is converter.physPressure(latticeRhoFront)
    and I think it should be physPressureFromRho(latticeRhoFront)

    second, is anyone has an explanation for the conversion relation between the pressure and density used in the physPressureFromRho function?

    T physPressureFromRho(T rho) const
    {
    return ((rho – 1) / 3.)*physForce() / (pow(physLength(),_dim-1)) + _pressureLevel;
    }

    Thank you all.

    #2702
    mgaedtke
    Keymaster

    Hey Mamin,

    thank you for mentioning. Basicly, you are right, we should be more precise here, but as we calculate a pressure drop instead of an absolute pressure in the code example on page 27, it does not make a difference.

    The function phyPressureFromRho() calculates the pressure in SI units as p = c_s^2 * (rho -1) * C_p + p_0, where c_s^2=1/3 is the speed of sound in lattice units, rho is the density in lattice units, C_p = C_F / C_L^3 is the confersion factor for the pressure derived from the conversion factors of the force and length in their SI units respectively and p_0 is the charactistic pressure level in SI units.

    We shift the lattice density by 1 here, to achieve that for rho=1 we get p = p_0.

    #2703
    Mamin
    Member

    Thank you very much. Do you know if openLB model compressible fluid?

    #2704
    mgaedtke
    Keymaster

    No, at the moment we do not have any compressible model.

    #2718
    Mamin
    Member

    Hi mgaedtke,
    I have defined the charRho as the density of helium at 100 Pascal (0.00016). However, what I get at the inlet is a pressure of 10 Pascal instead (U=15 m/s, charNu=0.12). I was expecting to get 100 Pascal at the inlet. Any hint?
    Thanks

    #2719
    Mamin
    Member

    I have 0 pressure at the outlet. Thanks

    #2720
    mgaedtke
    Keymaster

    Hey Mamin,

    0 pressure at the outlet is fine, I think, as this suppose to be your outflow condition. For the inlet to be at 100 Pa, you could set the pressureLevel to 90 Pa to achieve a pressure value of 100 Pa.

    #2721
    Mamin
    Member

    Thanks for answering. Since I can’t set a pressure boundary at the inlet and out let as well. I ran Navier-Stokes on Comsol for the same system and place the pressure boundaries at the inlet and outlet then obtained the velocity at the inlet and add as boundary condition in openLB. However, I obtained much lower pressure at the inlet.
    Maybe it is not a good idea but I know that LBM should converge to NS at the continuum regime. However, there is something missing here.

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