Skip to content

norm_var in eigenproblem.plot_mode() rework #15

@afraser3

Description

@afraser3

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions