--
You received this message because you are subscribed to the Google Groups "Dedalus Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to dedalus-user...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/dedalus-users/3fbf550a-c3b7-4eca-888e-92d0b831b305o%40googlegroups.com.
Hi,Currently in Dedalus you can only use a single Chebyshev direction.Daniel
On Wed, Jul 29, 2020 at 11:47 AM ruirui wang <ruiru...@gmail.com> wrote:
--Hello!I want to solve a poisson equation (N*dx(dx(w))+dz(dz(w))=F), which has non-constant parameters . this parameters, such as N and F, change both with x axis and z axis. How should I set my equation and boundary . When I set my basis in x and z axis as 'Chebyshev', left and right boundary are set as 'w=0', it will be wrong and tell me : ' Boundary condition must be constant along 'x''.the following is my code:# Create bases and domainx_basis = de.Chebyshev('x', int(nx), interval=(x_in, x_out))
z_basis = de.Chebyshev('z',int(nz), interval=(z_in, z_out))
domain = de.Domain([x_basis, z_basis],grid_dtype=np.float64)
problem.add_equation("N2*dx(wx) +dz(wz) = F")
problem.add_equation("wx - dx(w) = 0")
problem.add_equation("wz - dz(w) = 0")
problem.add_bc("left(w)-right(w)= 0", condition="(nx != 0)and (ny != 0)")
problem.add_bc("right(wz) = 0", condition="(nx != 0)and (ny != 0)")
Thank you for your reply
You received this message because you are subscribed to the Google Groups "Dedalus Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to dedalu...@googlegroups.com.
# Create bases and domain
x_basis = de.Fourier('x', int(nx), interval=(x_in, x_out)) #Make this fourier
z_basis = de.Chebyshev('z',int(nz), interval=(z_in, z_out))
domain = de.Domain([x_basis, z_basis],grid_dtype=np.float64)
F = domain.new_field()
N2 = domain.new_field()
problem.parameters['F'] = F
problem.parameters['N2'] = N2
problem.add_equation("dz(wz) = F - N2*dx(wx)") #N2 is now a field which can vary in x- and z- directions
problem.add_equation("wz - dz(w) = 0")
To unsubscribe from this group and stop receiving emails from it, send an email to dedalus-user...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/dedalus-users/d3798f60-bd11-4d4b-adc3-b0ed3bf0fe77o%40googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/dedalus-users/CALW8q5Out9D356dj_guB3Tjro6negm%3D9hgi9%2BdoydPJULkbXfQ%40mail.gmail.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/dedalus-users/8ef2363d-0e2f-4b4c-b6fe-294606a9499an%40googlegroups.com.