User Tools

Site Tools


docs:utils:randomfield

This is an old revision of the document!


A PCRE internal error occured. This might be caused by a faulty plugin

====== randomfield ====== Create a velocity field with * random spectral coefficients that decay exponentially * zero divergence * Dirichlet boundary conditions at the walls ===== options ===== <code> -Nx --Nx <int> # x gridpoints -Ny --Ny <int> # y gridpoints -Nz --Nz <int> # z gridpoints -a --alpha <real> default == 0 Lx = 2 pi/alpha -g --gamma <real> default == 0 Lz = 2 pi/gamma -lx --lx <real> Lx = 2 pi lx -lz --lz <real> Lz = 2 pi lz -sd --seed <int> default == 1 seed for random number generator -s --smoothnes <real> default == 0.4 smoothness of field, 0 < s < 1 -m --magnitude <real> default == 0.2 magnitude of field, 0 < m < 1 -mf --meanflow perturb the mean -s1 --s1-symmetry satisfy s1 symmetry -s2 --s2-symmetry satisfy s2 symmetry -s3 --s3-symmetry satisfy s3 symmetry <fieldname> (trailing arg 1) output file </code> ===== mathematics ===== The field takes the form <latex> {\bf u}(x,y,z) = \sum_{jklm} u_{jklm} T_l(y) e^{2 \pi \, i (jx/Lx + kz/Lz)} {\bf e}_m </latex> where the spectral coefficients are assigned according to <latex> u_{jklm} = (\text{random # in }[-1, 1]) * \text{(1-smoothness)}^{|l| + |j| + |k|} </latex> with corrections to meet boundary and divergence conditions and rescaling so that L2Norm(u) = magnitude. The form of spectral decay chosen is crude, but normally what is needed in a random field is that it meets the BCs and zero-div, is controllably smooth, and excites modes with all symmetries. It would probably be better to work the length scales Lx,Ly,Lz into the exponent of ''(1-smoothness)'', so that the variations in the random field are roughly spatially isotropic.

docs/utils/randomfield.1247065370.txt.gz · Last modified: 2009/07/08 08:02 by gibson