ukaea / ukaea/PROCESS

Divide by zero warnings in fusion_reactions.py

Open
#4,029 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Python
Stars
71
Forks
27
Avg merge
2d 18h
Merged PRs (30d)
33

Description

Occurs when running integration or regression tests.

process/fusion_reactions.py:769: RuntimeWarning: divide by zero encountered in divide
    xi = ((reaction_constants.bg**2) / (4.0 * theta)) ** (1 / 3)
process/fusion_reactions.py:774: RuntimeWarning: invalid value encountered in multiply
    1.0e-6

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by reproducing the warnings in the integration or regression tests and inspect process/fusion_reactions.py around lines 769 and 774. Determine which inputs produce the zero divisor and invalid multiplication, then verify the warnings no longer occur while the affected tests still pass.

Written by the indexing model from the issue text.

Assessment

Tech stack
python
Domain
backend
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
50/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.