In channelflow the total velocity field is broken into a fixed base flow U(y) and a fluctuating part u(x,y,z,t)
In previous versions of channelflow you had to explicitly construct a function U(y) and give it to DNS as a parameter. Whether or not u(x,y,z,t) was a fluctuation or the total flow dependend on whether you set U(y) to a nonzero or zero value.
In the new version there is a simplified syntax for the most common cases:
1. and , for a channel flow
DNSFlags flags; flags.baseflow = Zero; flags.constraint = PressureGradient; flags.dPdx = some real number; ... FlowField u(Nx,Ny,Nz,Lx,Lz,a,b); ... DNS dns(u, nu, dt, flags, T0);
2. , a parabolic base flow, and u is the fluctuation, for a channel flow
DNSFlags flags; flags.baseflow = Parabola; flags.constraint = PressureGradient; flags.dPdx = some real number; etc.
3. and is the fluctuation, for plane Couette flow
DNSFlags flags; flags.baseflow = PlaneCouette; flags.constraint = PressureGradient; flags.dPdx = 0.0;
Another possibility is to set the mean constraint to be BulkVelocity and give a value for flags.Ubulk.
The old syntax
ChebyCoeff Ubase(Ny,a,b,Physical); for (int ny=0; ny<Ny; ++ny){ Ubase[ny] = 4*(1.0 - square(y[ny])); // or some other prescribed function ... DNS dns(u, Ubase, nu, dt, flags, T0);
Is still available in case you want to set U(y) to something like the mean velocity profile of a turbulent flow.