#include #include #include #include #include "channelflow/flowfield.h" #include "channelflow/dns.h" //#include "helperfuncs.h" using namespace std; int main() { const int Nx=64; const int Ny=65; const int Nz=32; const Real Lx=4*pi/3; const Real a= -1.0; const Real b= 1.0; const Real Lz=2*pi/3; const Real Reynolds = 4000.0; const Real nu = 1.0/Reynolds; const Real CFLmin = 0.50; const Real CFLmax = 0.70; const Real dtmin = 0.002; const Real dtmax = 0.02; const Real T0 = 0; // start time const Real T1 = 100; // end time const Real dT = 1.0; // plotting and statistics interval DNSFlags flags; flags.timestepping = SBDF3; flags.dealiasing = DealiasXZ; const Real perturbMag = 0.10; const Real decay = 0.7; // cheb spectral decay of perturb profiles const int kxmax=3; // maximum Fourier mode for perturbations const int kzmax=3; const char sp= ' '; const char nl= '\n'; cout << setprecision(4); Vector x = periodicpoints(Nx, Lx); Vector y = chebypoints(Ny,a,b); Vector z = periodicpoints(Nz, Lz); x.save("x"); y.save("y"); z.save("z"); ChebyTransform trans(Ny); ChebyCoeff Ubase(Ny,a,b,Physical); for (int ny=0; ny