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

Make atomic rates return zero if plasma and/or beam parameters <= 0 #450

Closed
vsnever opened this issue Jul 20, 2024 · 1 comment
Closed
Assignees

Comments

@vsnever
Copy link
Member

vsnever commented Jul 20, 2024

As suggested in #386 (comment), there is no need to set near-zero thresholds for plasma and beam parameters in atomic rates. Instead of this:

# need to handle zeros, also density and temperature can become negative due to cubic interpolation
if density < 1.e-300:
density = 1.e-300
if temperature < 1.e-300:
temperature = 1.e-300

atomic rates should return zero if the parameters are less than or equal to zero:

    if density <= 0 or temperature <= 0:
         return 0
@vsnever
Copy link
Member Author

vsnever commented Aug 1, 2024

Fixed in #451.

@vsnever vsnever closed this as completed Aug 1, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant