IndicatorLayer2D usage
› Forums › OpenLB › General Topics › IndicatorLayer2D usage
- This topic has 2 replies, 2 voices, and was last updated 5 years, 2 months ago by Julius.
-
AuthorPosts
-
October 30, 2020 at 2:37 pm #5259JuliusParticipant
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 inindicatorF2D.hwhich makes it seem possible to generate an indicator for the fluid nodes next to the walls.Using this indicator in the
defineRhoUandiniEquilibriumfunctions directly does not work since they require aSuperIndicatorF2D. Is it possible to get aSuperIndicatorF2Dfrom a normalIndicatorF2D?As an alternative, I had hoped on using this indicator to create an
AnalyticalIdentitymuch like theSmoothIndicatorCircle2D, but it seems that theSmoothIndicatorCircle2Dis derived fromAnalyticalF2DandIndicatorLayer2DfromIndicatorF2D, 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
SuperIndicatorF2Dneeded fordefineRhoUandiniEquilibriumfunctions. TheIndicatorLayer2Dconstructor requires aIndicatorF2D, but I’m unsure how to get an indicator of the wall itself withIndicatorF2Das a base class. ThesuperGeometry.getMaterialIndicatorreturns aSuperIndicatorF2Dwhich is derived fromSuperF2D.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 WeinmillerOctober 30, 2020 at 8:12 pm #5260mathiasKeymasterDear 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 1Best
MathiasNovember 2, 2020 at 11:51 am #5262JuliusParticipantDear 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 -
AuthorPosts
- You must be logged in to reply to this topic.
