Skip to content

Implementing compressible flow using improved density method

OpenLB – Open Source Lattice Boltzmann Code Forums on OpenLB General Topics Implementing compressible flow using improved density method

Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
    Posts
  • #7688
    jslacey
    Participant

    I am quite new to OpenLB, so I am still in the process of familiarizing myself with the framework. Eventually, I would like to simulate compressible fluid flow through a nozzle and so I am investigating how that could be implemented in OpenLB using the improved density method of S. Guo et al., Physics of Fluids, 2020. This requires the addition of another term to the second-order expansion of the equilibrium density distribution function that contains density and non-dimensional temperature. Within equilibrium.h and lbm.h, I have added SecondOrderCompressible, using the SecondOrder template as a starting point. Within smagorinskyBGKdynamics.h I added (just as a test):

    /// Smagorinsky BGK collision step with Guo forcing
    template<typename T, typename DESCRIPTOR, typename MOMENTA=momenta::BulkTuple>
    using SmagorinskyCompForcedBGKdynamics = dynamics::Tuple<
    T, DESCRIPTOR,
    MOMENTA,
    equilibria::SecondOrderCompressible,
    collision::SmagorinskyEffectiveOmega<collision::BGK>,
    forcing::Guo<momenta::ForcedWithStress>
    >;

    This allows me to instantiate an NSLattice in the squareCavity2d example with the SecondOrderCompressible calculation of equilibrium. The example with all these modifications compiles and executes without issue. At the level of lbm.h, when I want to implement the improved density correction term I am at a bit of a loss how I should get the temperature from the coupled Advection-Diffusion lattice at the low level…is there some method to achieve this in OpenLB? Is this approach sensible, or should I be looking to implement the density correction term is some other way? I would appreciate any help about implementing this method in the OpenLB code. Thanks in advance.

    #7689
    mathias
    Keymaster

    The topic sound interesting and your first step promising. For the coupling you could look in the OpenLB example section “thermal”. There, a coupled model is used, ADE + NSE with a coupling approach based on Boussinesq-approximation. It should go similar to it.. You can keep me up to date on it by email, it would be good to share your results with then OpenLB community..

    Best
    Mathias

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