Hollweg dispersion solver failing in 90 degree limit
Nobody has claimed this yet.
- Dominant language
- Python
- Stars
- 711
- Forks
- 375
- Avg merge
- 3h 2m
- Merged PRs (30d)
- 8
Description
When plotting values for the Hollweg dispersion solver with theta equals 90 degrees, the alfven and acoustic wave modes have unexpected results. The imports and inputs for the hollweg() function are listed. A screenshot of the plot is included below.
The computed wave frequencies are small in this limit and a cause of the resulting plot may be floating point errors.
import astropy.units as u
import matplotlib.pyplot as plt
import numpy as np
import warnings
from astropy.constants.si import c
from matplotlib.ticker import MultipleLocator
from plasmapy.dispersion.analytical.two_fluid_ import two_fluid
from plasmapy.dispersion.numerical.hollweg_ import hollweg
from plasmapy.formulary import parameters as pfp
from plasmapy.particles import Particle
inputs = {
"k": np.logspace(-7, -2, 300) * u.rad / u.m,
"theta": 90 * u.deg,
"n_i": 5 * u.cm ** -3,
"B": 1.10232e-8 * u.T,
"T_e": 1.6e6 * u.K,
"T_i": 4.0e5 * u.K,
"ion": Particle("p+"),
}

Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by reproducing the 90-degree case with the imports and inputs in the issue, then inspect the hollweg() entry point in plasmapy.dispersion.numerical.hollweg_. Compare the computed Alfven and acoustic frequencies in this limit and determine whether the unexpected plot is caused by floating-point behavior. Done means the modes produce expected results at theta = 90 degrees and the regression is covered by an appropriate test.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- python
- Domain
- backend
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100