Coupled eigenvalue system

174 views
Skip to first unread message

Reina Krause

unread,
Aug 8, 2022, 1:01:30 PM8/8/22
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
uncoupled.py

Calum Skene

unread,
Aug 8, 2022, 1:40:15 PM8/8/22
to Dedalus Users
Is it because, as the system is uncoupled, the eigenvectors are of the form (f,0) and (0,g)? So the eigenvalues are just the union of the eigenvalues of the two smaller systems?
Best,
Calum


Reina Krause

unread,
Aug 8, 2022, 1:47:01 PM8/8/22
to Dedalus Users
Hi Calum,

Yes, I too think that the eigenvalues are the union (with repeated values allowed) of the eigenvalues of the two smaller systems.  But it still makes me wonder if there's a better way of formulating this type of problem in Dedalus without having to manually pick the repeated eigenvalues. 

For some problems, maybe one could use a two-component vector field of the form [f, g].  But for a general differential operator that acts on combinations of these components, I wonder if that's possible.

Best,
Reina

Jeffrey S. Oishi

unread,
Aug 8, 2022, 2:02:31 PM8/8/22
to dedalu...@googlegroups.com
Hi Reina,

You and Calum are correct about the nature of the spectrum. However, I'm not sure I understand what you want to do, or what you object to about the way the solver currently works.  Eigenvalues are returned in no guaranteed order because of the way the underlying eigenvalue solvers work. One must sort them post-facto, and make sure to keep track of the sort so as to retrieve the corresponding eigenvector. We provide a set of tools to make this easy in an add-on package for Dedalus called eigentools. It has methods to sort and display eigenvectors, perform stability calculations, eliminate spurious eigenvalues, etc. 

Perhaps if you describe the problem you are trying to solve rather than this example, we could help provide some guidance.

Jeff

--
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/fff25929-04ec-4696-bfa6-d247c3ce6189n%40googlegroups.com.

Reina Krause

unread,
Aug 8, 2022, 2:18:55 PM8/8/22
to Dedalus Users
Hi Jeff,

Thanks for the reply.  The equation I'm trying to solve is of the form

  D u + lambda * u = 0

where D is a differential operator matrix acting on a multicomponent vector field u = [u1, u2, ...].  For my naive example above, D would be

[[4d^2/dx^2,    0],
 [0,    9d^2/dx^2]

But the problem I'm looking at has a D with off-diagonal elements that produces a set of coupled equations.  When faced with a system of this sort, my current strategy is to define a field corresponding to each component of u and then add each equation individually using the add_equation() function.

I understand that the return eigenvalues are not sorted and I don't mind pruning the list to find the correct eigenvalues/eigenfunctions, but I'm wondering if the way I have formulated the problem in Dedalus is the right approach.  In any case, thanks for suggesting eigentools, I'll check it out.

Best,
Reina

Jeffrey S. Oishi

unread,
Aug 8, 2022, 2:33:52 PM8/8/22
to dedalu...@googlegroups.com
Hi Reina,

Great! Those are exactly the types of eigenvalue problems Dedalus is designed to study. Whether or not you create a vector field or a set of scalar fields depends on two things: 

1. are you using dedalus 2? Then a set of scalar fields is your only option.
2. If you are using dedalus 3, then you could choose to create a multi-component vector field or not. Typically one would choose this if there was a coordinate system that relates the components, for example corresponding to the components of velocity in some multi-dimensional space.

Jeff

Reina Krause

unread,
Aug 8, 2022, 2:47:52 PM8/8/22
to Dedalus Users
Hi Jeff,

Thanks for the reply. I'm using Dedalus 3 and I don't mind creating a vector field. I'm working with Cartesian coordinates. In the examples I saw in the documentation, I didn't see anything that picked a specific component of this vector field. Could I just index it, like I would index an array, e.g., v[0] for the first component?  With a vector field formulation, would some of the spurious eigenvalues disappear?

Thanks,
Reina
Reply all
Reply to author
Forward
0 new messages