Skip to content

IndicatorLayer2D usage

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

    Dear all,

    I am currently using the ShanChen single component multiphase flow in combination with a bounce back wall. The wall has an artifical density to incorporate wettability. I run into instability issues during the first few steps when the fluid just beyond the wall is too far off from the wall density. I.e. a more hydrophilic wall starting off with vapour adjacency. The instablity can be avoided by increasing the vapour density, but that results in droplets forming elsewhere which gives not very accurate initial conditions.

    My first thought was to ramp up the density of the wall to avoid this huge denstiy gradient, but looking at the BounceBack class, once a fake density is set, it cannot be changed. (maybe add such a possibility in future OpenLB release? )

    My other thought is to set the fluid density next to the wall to the wall density during the prepareLattice step. I saw the IndicatorLayer2D() function in indicatorF2D.h which makes it seem possible to generate an indicator for the fluid nodes next to the walls.

    Using this indicator in the defineRhoU and iniEquilibrium functions directly does not work since they require a SuperIndicatorF2D. Is it possible to get a SuperIndicatorF2D from a normal IndicatorF2D?

    As an alternative, I had hoped on using this indicator to create an AnalyticalIdentity much like the SmoothIndicatorCircle2D, but it seems that the SmoothIndicatorCircle2D is derived from AnalyticalF2D and IndicatorLayer2D from IndicatorF2D, which makes it incompatible.

    One other method I tried was using the IndicatorLayer to set the fluid right next to the wall to a different material. Then with this material get the SuperIndicatorF2D needed for defineRhoU and iniEquilibrium functions. The IndicatorLayer2D constructor requires a IndicatorF2D, but I’m unsure how to get an indicator of the wall itself with IndicatorF2D as a base class. The superGeometry.getMaterialIndicator returns a SuperIndicatorF2D which is derived from SuperF2D.

    So my question is: How do I use IndicatorLayer2D to set the density the fluid adjacent to the wall to the density of the wall?

    Regards,
    Julius Weinmiller

    #5260
    mathias
    Keymaster

    Dear Julius,

    the idea with the ramp may work. You may implement a set function to change the density at a bounce back node. I would go for that idea. The other one you can use the rename functions from superGeometry to introduce a layer with a new material, lets say 43:
    – rename(1,42,1,1,1) renames the inner 1 to 42
    – rename(1,43) renaes the remainding layer with material 1 to 43
    – rename(42,1) renames the inner 42 back to 1

    Best
    Mathias

    #5262
    Julius
    Participant

    Dear Mathias,

    Thank you for the rename trick.
    I have managed to get my simulations to work with the ramp idea, but the possiblity to set layers is helpful and opens up some other simualtion possibilities.

    Regards,
    Julius Weinmiller

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