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[1] = -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