Hi Daniel,
thanks for the insight. I understand what you mean. So basically imposing periodic BCs on a Chebyshev grid.
Here is a snippet of the implementation:
x_basis = de.Fourier('x', nx, interval=(0, Lx), dealias=3/2)
z_basis = de.Chebyshev('z',nz, interval=(-Lz/2, Lz/2), dealias=3/2)
problem = de.IVP(domain, variables=['p','u','w','uz','wz','S','Sz'])
problem.add_equation("dt(u) + dx(p) - 1/Re*(dx(dx(u)) +dz(uz)) = - u*dx(u) -w*uz")
problem.add_equation("dt(w) + dz(p) - 1/Re*(dx(dx(w)) +dz(wz)) = - u*dx(w) -w*wz")
problem.add_equation("dx(u) + wz = 0") #,condition="(nx!=0) or (nz!=0)")
problem.add_equation("dt(S) - 1/(Re*Sc)*(dx(dx(S)) + dz(Sz)) = - u*dx(S) - w*Sz")
problem.add_equation("uz - dz(u) = 0")
problem.add_equation("wz - dz(w) = 0")
problem.add_equation("Sz - dz(S) = 0")
problem.add_bc("left(u)-right(u) = 0")
problem.add_bc("left(w)-right(w)=0")
problem.add_bc("left(S)-right(S)=0 ")
problem.add_bc("left(p)-right(p)=0 ")
Is there a need to impose additional conditional constraints when defining the equations, since the number of equations and boundary conditions don't match?
Kesava