Reina Krause
unread,Aug 8, 2022, 1:01:30 PM8/8/22Sign in to reply to author
Sign in to forward
You do not have permission to delete messages in this group
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to Dedalus Users
Hi all,
I'm trying to solve the following "coupled" eigenvalue system.
4 * d(d(f)) = -omega^2 * f
9 * d(d(g)) = -omega^2 * g
Quite obviously, the above equations are _not_ coupled, but I'm using them to see if I'm doing the right thing so that I can extend the code to handle more complicated cases.
Both f and g are scalar fields that depend on the 1D spatial coordinate x. I'm solving them in the interval [0, pi] with the condition that f(0) = f(pi) = 0 and g(0) = g(pi) = 0. The eigenvalues, omega, are then integer multiples of 6, i.e, 6, 12, 18, etc.
To solve the system in Dedalus, I create two _separate_ fields f and g in a Chebyshev basis.
f = dist.Field(name='f', bases=basis)
g = dist.Field(name='g', bases=basis)
I then solve the EVP using
problem = d3.EVP([f, g, tau_f1, tau_f2, tau_g1, tau_g2], eigenvalue=omega2, namespace=locals())
problem.add_equation("4*f2 + omega2*f = 0")
problem.add_equation("9*g2 + omega2*g = 0")
This gives me omega as
2, 3, 4, 6, 6, 8, 9, 10, 12, 12, 14, 15, 16, 18, 18, 20, ...
Clearly, something is going wrong, and what I'm getting are the eigenvalues of the individual equations: the first equation in my system has eigenvalues 2, 4, 6, ... and the second one has the eigenvalues 3, 6, 9, ...
The repeated eigenvalues are the eigenvalues that we seek. I have attached the code I wrote with this email. Am I formulating the problem correctly? If so, how do I avoid the "wrong" eigenvalues? I could just pick the repeated eigenvalues, but that seems less elegant.
Thanks,
Reina