Dear Deadalus users,
I am testing a working script for
2D Boussinesq equations under streamfunction formulation with double-periodic and Fourier+Chebyshev grid. I am doing this in order to test the effects of rigid boundaries on the flow of my interest.
While in both the formulations I was able to build the solver and run it successfully, the results don't seem to match. I know that the double Fourier grid results are correct but when I run same model equations with the Chebyshev formulation, although running, the model doesn't evolve in the same way.
Here is a code snippet:
1. Double Fourier - Running successful ( attached animation of how the flow evolves)
problem=de.IVP(domain,variables=['psi','theta','u','w'])
problem.substitutions['L(A)'] = 'd(A,x=2) + d(A,z=2)' # Laplacian term
problem.substitutions['H(A)'] = 'd(A,x=4) + d(A,z=4)' # Hyperdiffusion
problem.substitutions['J(A,B)'] = 'dx(A)*dz(B)-dx(B)*dz(A)' # Jacobian
problem.add_equation("dt(L(psi)) + dx(theta)-nu*H(psi) = - J(psi,L(psi))",condition="(nx !=0) or (nz!=0)")
problem.add_equation("dt(theta) = N2*dx(psi)-J(psi,theta)",condition="(nx !=0) or (nz!=0)")
problem.add_equation("u + dz(psi) = 0",condition="(nx !=0) or (nz!=0)")
problem.add_equation("w - dx(psi) = 0",condition="(nx !=0) or (nz!=0)")
problem.add_equation("psi=0",condition="(nx==0) and (nz==0)")
problem.add_equation("u = 0", condition="(nx==0) and (nz==0)")
problem.add_equation("w = 0", condition="(nx==0) and (nz==0)")
problem.add_equation("theta = 0", condition="(nx==0) and (nz==0)")
2. Fourier + Chebshev ( Running, but results not as expected)
problem=de.IVP(domain,variables=['psi','u','theta','Dtheta','zeta','Dzeta'])
problem.meta['psi','theta','zeta']['z']['dirichlet'] = True
problem.substitutions['w'] = "dx(psi)"
problem.add_equation("zeta +dx(w)-dz(u) = 0")
problem.add_equation("dt(zeta) - nu*(dx(dx(zeta)) + dz(Dzeta)) + dx(theta) = -w*Dzeta-u*dx(zeta)")
problem.add_equation("dt(theta) - (dx(dx(theta)) + dz(Dtheta)) - N2*w = -(w*Dtheta +u*dx(theta))")
problem.add_equation("u + dz(psi) = 0")
problem.add_equation("Dtheta - dz(theta) = 0")
problem.add_equation("Dzeta - dz(zeta) = 0")
problem.add_bc("left(theta) = 0")
problem.add_bc("right(theta) = 0")
problem.add_bc("left(psi) = 0")
problem.add_bc("right(psi) = 0")
problem.add_bc("left(zeta) = 0")
problem.add_bc("right(zeta) = 0")
Perhaps I am missing something very obvious here.
Any suggestion is highly appreciated