<div>Hi Nek's,<br></div><div><br></div><div>I would like to impose noise localized in time and space in my stenotic pipe, pretty much like an impulse.</div><div>I would be tempted to use the userf subroutine like this:<br>
</div><div><br></div><div style="margin-left: 40px"><div>subroutine userf (ix,iy,iz,eg)<br> include 'SIZE'<br> include 'TOTAL'<br> include 'NEKUSE'<br><br> integer e,f,eg</div>
<div>real z_0, sigma_z, istep_0, istep_min, istep_max, Amplitude, Theta</div><div><br>z_0 = 0.</div><div>sigma_z = 1.</div><div><br></div><div>istept_0 = 100.</div><div>istep_min = 90.</div><div>istep_max = 110.</div><div>
sigma_t = 1.</div><div><br></div><div>if(istep.GE.istep_min.AND.istep.LE.istep_max)</div><div><br></div><div>Theta = atan2(y,x) ! I would like my forcing to be on u_theta only</div>
<div>Amplitude = exp(-((z-z_0)/sigma_z)**2 - ((istep-istep_0)/sigma_t)**2)</div><div><br>ffx = - sin(Theta) * Amplitude * Random Noise<br>ffy = cos(Theta) * Amplitude * Random Noise<br> ffz = 0.0<br><br> return<br>
end<br><br></div></div><div>The thing is I don't know how I could impose some random noise on the whole domain. Using " call random_number(Random_Noise) " would only give me one single random number. I assume the solution is not to hard but I am however missing the point. Any idea?</div>
<div><br></div><div>Kind regards,</div><div>JC</div>