Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

norm_var in eigenproblem.plot_mode() rework #15

Open
afraser3 opened this issue Jan 27, 2023 · 0 comments
Open

norm_var in eigenproblem.plot_mode() rework #15

afraser3 opened this issue Jan 27, 2023 · 0 comments

Comments

@afraser3
Copy link
Collaborator

The kwarg norm_var in eigenproblem.plot_mode() isn't quite appropriate as currently formulated. Rotating eigenmodes by multiplying them by a scalar can be helpful when comparing different eigenmodes, but this multiplies them by a function. Happy to fix it but I don't think there's an obvious best choice for what to replace this with (and it's a valuable feature so I certainly wouldn't want to toss it out!). Some ideas:

  • Divide the eigenvector by the value in 'g' space at some point in the domain, either a boundary or the center or something (possible issue: what if an eigenmode is zero there?)
  • Divide the eigenvector by the lowest (nonzero?) 'c' space coefficient
  • Normalize using the same kinds of norms calc_ps() works with, then do a complex rotation by doing what's described in the above two ideas, but just divide by the complex phase, not the amplitude -- this is what I've often done in the past (e.g., L71-77 here, corresponding to Fig 3 of this paper, where TE1 is total energy of the mode, and norm1_phi is the complex rotation based on a 'c' space coefficient)

First two are quickest to implement and for a user to use, since they don't need to define a norm. But I don't think there's any obvious right choice here. Could go with third option and default to the L2 norm or something in the event that a better norm isn't provided.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant