ukaea / ukaea/PROCESS

:bug: Currently unable to run a fully Deuterium plasma without ZeroDivisionError

Open
#4,576 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

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

Description

Describe the bug

If in an input file you try to set the fuel fraction to only D:

f_plasma_fuel_deuterium = 1.0
f_plasma_fuel_tritium = 0.0

you end up with ZeroDivisionError in different places such as:

  • cost model for crfcdr = (fefcdr * self.data.costs.discount_rate) / (fefcdr - 1.0e0) in section related to "Costs due to partial current drive system renewal".
  • physics model for self.calculate_electron_ion_collision_time where nd_plasma_ions is 0

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 with an input file setting f_plasma_fuel_deuterium to 1.0 and f_plasma_fuel_tritium to 0.0, then reproduce the ZeroDivisionError in the listed cost-model expression and calculate_electron_ion_collision_time. Trace how the pure-deuterium case reaches each failure and add regression coverage showing that this input completes without division-by-zero errors.

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
Active
Clarity
Mostly clear
Newbie friendliness
68/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.