Hi,
I am new to Dedalus and am trying to use it to solve my problem. I am trying to solve a second-order PDE given by N*psi_xx + M*psi_xz + Xi*psi_zz = s (where the subscripts denote partial differentiation, N, M, and Xi are functions of x and z and 's' is a source function - a delta function modeled as a Gaussian) using LBVP solver. I went through the tutorials and example codes to implement my problem. A few parts of my code are given below:
.
.
.
xbasis = d3.RealFourier(coords['x'],size=Nx,bounds=(0,Lr))
zbasis = d3.Chebyshev(coords['z'],size=Nz,bounds=(-Lz,0))
#Fields
psi = dist.Field(name='psi',bases=(xbasis,zbasis))
n = dist.Field(name='n',bases=(xbasis,zbasis))
m = dist.Field(name='m',bases=(xbasis,zbasis))
xi = dist.Field(name='xi',bases=(xbasis,zbasis))
tau_1 = dist.Field(name='tau_1', bases=xbasis)
tau_2 = dist.Field(name='tau_2', bases=xbasis)
.
.
#Substitutions
lift_basis = zbasis.derivative_basis(1)
lift = lambda A: d3.Lift(A, lift_basis, -1)
dx = lambda A: d3.Differentiate(A, coords['x'])
dz = lambda A: d3.Differentiate(A, coords['z'])
dzpsi = dz(psi) + lift(tau_1)
dz2psi = dz(dzpsi) + lift(tau_2)
.
.
.
#Problem
problem = d3.LBVP([psi, tau_1, tau_2], namespace=locals())
problem.add_equation("n*dx(dx(psi)) + m*dz(dx(psi)) + xi*dz2psi = s")
problem.add_equation("psi(z=-Lz) = 0")
problem.add_equation("dz(psi)(z=0) = 0")
#Solver
solver = problem.build_solver()
solver.solve()
.
.
I have not given here the expressions for n, m, and xi as they are big. I apologize for that. When I run this code, I get a memory error ('Not enough memory to perform factorization'). I compiled the code without the coefficients in the equation, and the code ran fine. May I know if the implementation above is correct? I have a doubt, especially on the 'RealFourier' basis, as I found (from this Google group) that double Chebyshev (with tau terms) is not supported yet. Should I just run this code on a machine with larger memory?
Please let me know if any more information is needed. Thanks a lot in advance.
-Ramana.