convert a binary flowfield file (.ff) to an ascii data file (.asc)
-p --padding save full Nx x Ny x Nz grid rather eliminating padded modes -g --gridpoints write x.asc, y.asc, z.asc gridpoint files <fieldname> (trailing arg 2) flowfield input file <asciifile> (trailing arg 1) ascii output file
field2ascii u.ff u.asc
ASCII files are stored as physical values of components of the field at the gridpoints (i.e. not spectral coefficients). Fields with 2/3-style padding for dealiasing are saved on reduced grids (Nx,Nz → 2Nx/3, 2Nz/3), unless the -p option is used.
The gzipped ASCII velocity files store gridpoint values of the field in x,y,z,i order using the following C++ code
os << setprecision(16); for (int nx=0; nx<Nx ++nx) for (int ny=0; ny<Ny ++ny) for (int nz=0; nz<Nz ++nz) for (int i=0; i<Nd ++i) os << u(nx,ny,nz,i) << '\n';
The value u(nx,ny,nz,i) is the ith component of the Nd-dimensional field at the gridpoint (nx,ny,nz). The (nx,ny,nz)th gridpoint has spatial coordinates (nx Lx/Nx, cos(ny pi/(Ny-1)), nz Lz/Nz). For 3D velocity fields, the (u,v,w) components are i=0,1,2.
Geometrical and discretization parameters are stored as ASCII in *.geom files as follows
32 %Nx 35 %Ny 32 %Nz 3 %Nd 5.511566058929462 %Lx 2.513274122871834 %Lz 0.8771929824561405 %lx=Lx/(2pi) 0.4 %lz=Lz/(2pi) 1.14 %alpha=2pi/Lx 2.5 %gamma=2pi/Lz
In channelflow, Lx and Lz are the canonical geometry specifications. The .geom files provide lx,lz and alpha,gamma for human convenience.