IndicatorLayer2D usage
OpenLB – Open Source Lattice Boltzmann Code › Forums › on OpenLB › General Topics › IndicatorLayer2D usage
- This topic has 2 replies, 2 voices, and was last updated 3 years, 10 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.h
which makes it seem possible to generate an indicator for the fluid nodes next to the walls.Using this indicator in the
defineRhoU
andiniEquilibrium
functions directly does not work since they require aSuperIndicatorF2D
. Is it possible to get aSuperIndicatorF2D
from a normalIndicatorF2D
?As an alternative, I had hoped on using this indicator to create an
AnalyticalIdentity
much like theSmoothIndicatorCircle2D
, but it seems that theSmoothIndicatorCircle2D
is derived fromAnalyticalF2D
andIndicatorLayer2D
fromIndicatorF2D
, 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 fordefineRhoU
andiniEquilibrium
functions. TheIndicatorLayer2D
constructor requires aIndicatorF2D
, but I’m unsure how to get an indicator of the wall itself withIndicatorF2D
as a base class. ThesuperGeometry.getMaterialIndicator
returns aSuperIndicatorF2D
which 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.