OpenLB – Open Source Lattice Boltzmann Code Forums on OpenLB General Topics Example “MulticomponentXD”- Noise Calculation

Viewing 3 posts - 1 through 3 (of 3 total)
• Author
Posts
• #1848
ivan
Member

Hello, everybody,rnrnFor a while now I have been focusing my attention on the understanding of the example “”MulticomponentXD”” (in which X stands for the dimension) and am a bit lost concerning the “”random noise””, used to disturb the fluids and cause instability between them, which is slightly described between lines 110 and 113, as below:rnrn

Code:
rn // The setup is: periodicity along horizontal direction, bounce-back on toprn // and bottom. The upper half is initially filled with fluid 1 + random noise,rn // and the lower half with fluid 2. Only fluid 1 experiences a forces,rn // directed downwards.rn

rnrnIn between the lines 140 and 153, in turn, there isrnrn

Code:
rnrnif(iT==0) {rnrn [b]AnalyticalConst2D<T,T> noise(4.e-2);[/b]rn std::vector<T> v(2,T());rn AnalyticalConst2D<T,T> zeroV(v);rn AnalyticalConst2D<T,T> zero(0.);rn AnalyticalLinear2D<T,T> one(0.,-force*DESCRIPTOR<T>::invCs2,0.98+force*ny*DESCRIPTOR<T>::invCs2);rn AnalyticalConst2D<T,T> onePlus(0.98+force*ny/2.*DESCRIPTOR<T>::invCs2);rn AnalyticalRandom2D<T,T> random;rn AnalyticalIdentity2D<T,T> randomOne(random*noise+one);rn AnalyticalIdentity2D<T,T> randomPlus(random*noise+onePlus);rn std::vector<T> F(2,T());rn F = -force;rn AnalyticalConst2D<T,T> f(F);rnrn

rnrnAnd I would like to know how the noise intensity is actually calculated. Also I would like to ask about the constant 0.98. Is it somehow related to gravity?rnrnrnBest regards.rnrnIvan

#2424
mathias
Keymaster

Hi Ivan,rnrn1/ For details on the “”Random”” function, please, check out the source code http://optilb.com/DoxyGen/html/d8/d3a/classolb_1_1AnalyticalRandom1D.html rnrn2/ No, 0.98 is not related to gravity. I guess it comes from a benchmark paper.rnrnBestrnMathias

#2429
ivan
Member

Thank you so much, Mathias 🙂

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