Skip to content

Question of SmoothIndicator and AnalyticalIdentity

OpenLB – Open Source Lattice Boltzmann Code Forums on OpenLB General Topics Question of SmoothIndicator and AnalyticalIdentity

Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
    Posts
  • #9258
    Bobbie
    Participant

    Dear community

    When I’m learning multi-phase and multi-component examples, I found SmoothIndicator and AnalyticalIdentity are used together to achieve the distinction of different lattice densities (such as the following codes in the case of microFluidcs2d). How is this achieved?

    AnalyticalConst2D<T,T> zero ( 0. );
    AnalyticalConst2D<T,T> one ( 1. );
    IndicatorCuboid2D<T> ind1(xl1+dx, ny, {xl1/T(2), ny/T(2)});
    SmoothIndicatorCuboid2D<T,T> section1( ind1, 0. );
    IndicatorCuboid2D<T> ind2(xl2 + xl3, ny, {xl1 + (xl2 + xl3)/T(2), ny/T(2)});
    SmoothIndicatorCuboid2D<T,T> section2( ind2, 0. );
    AnalyticalIdentity2D<T,T> c1( section1 );
    AnalyticalIdentity2D<T,T> c2( section2 );
    AnalyticalIdentity2D<T,T> rho( one );
    AnalyticalIdentity2D<T,T> phi( c1 – c2 );
    AnalyticalIdentity2D<T,T> psi( rho – c1 – c2 );

    In openlb src, I have found the detailed description of SmoothIndicatorCuboid2D, which implements a smooth cuboid in 2D with an _epsilon sector. But I’m confused whether this SmoothIndicatorCuboid2D is referring to this cuboid region or something else?

    #9310
    TimBingert
    Participant

    Hi Bobbie,

    all the SmoothIndicator* are (in this particular case) scalar fields that can be used on any lattice to initialize all kinds of variables in your simulation. The AnalyticalIdentity operator is able to perform certain calculations between those fields such as addition, subtraction and multiplication. This is also what you can see in the code of your post.

    Hope this helps
    Kind regards
    Tim

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