symmetryop
: apply a symmetry operation to a given field
options : -sn --sn <int> default == 0 apply s1, s2, or s3 symmetry (0 => use sx,sy,sz,ax,az,a) -sx --x-sign change u,x sign -sy --y-sign change v,y sign -sz --z-sign change w,z sign -ax --axshift <real> default == 0 translate x by ax*Lx -az --azshift <real> default == 0 translate z by az*Lz -anti --anti antisymmetry instead of symmetry -v --verbose print out some diagnostics <flowfield> (trailing arg 2) input field <flowfield> (trailing arg 1) output field
The symmetries of 3D fields on x,z periodic, y bounded domains with Dirichlet or Neumann conditions at the walls can be parameterized as
where s,sx,sy,sz, and are +/-1 and ax,az are real. The options to symmetryop set the values of these parameters, and the resulting symmetry is applied to the input field and saved to disk as the output field. The -sx,-sy,-sz options work as flags: using -sx sets sx = -1; otherwise sx = 1. Likewise the -anti option sets s = -1.
For convenience the -sn option allows application of a few predefined symmetries that figure prominently in our research, namely
Translate the field g.ff by Lx/2 in x and save it in h.ff
symmetryop -ax 0.5 g h
Apply s1 = [u,v,w] -> [-u, -v, w](-x + L_x/2 , -y, z+L_z/2) to g.ff and save it in h.ff
symmetryop -sx -sy -ax 0.5 -az 0.5 g h
Apply s1 to g.ff and save it in h.ff, using the convenience -sn option
symmetryop -sn 1 g h