Skip to content

Issue #1871#3062

Merged
timothy-nunn merged 2 commits intomainfrom
1871-division-by-zero-in-superconductor-calculation
Feb 20, 2024
Merged

Issue #1871#3062
timothy-nunn merged 2 commits intomainfrom
1871-division-by-zero-in-superconductor-calculation

Conversation

@mkovari
Copy link
Copy Markdown
Collaborator

@mkovari mkovari commented Feb 16, 2024

The CS properties were calculated even when they are not required (iohcl=0). On some occasions this led to division by zero since awpoh was initialised to zero. I have taken the calculations out of the isumat option list to eliminate duplicated code, and added an if statement so CS calculations are only done when iohcl /= 0.

The structure of pfcoil.py is confusing and I can't guarantee this problem will never recurr.

I confirm that I have completed the following checks:

  • No changes in test outputs
  • No new tests
  • No change to tests
  • No doc changes
  • No new documentation (other than comments in code)

@mkovari mkovari linked an issue Feb 16, 2024 that may be closed by this pull request
@mkovari mkovari requested a review from timothy-nunn February 19, 2024 08:39
@timothy-nunn timothy-nunn merged commit 7f5949b into main Feb 20, 2024
@timothy-nunn timothy-nunn deleted the 1871-division-by-zero-in-superconductor-calculation branch February 20, 2024 10:06
chris-ashe pushed a commit that referenced this pull request Apr 22, 2024
* Issue #1871

* Update pfcoil.py syntax

---------

Co-authored-by: Michael Kovari <michael.kovari@ukaea.uk>
Co-authored-by: Timothy Nunn <timothy.nunn@ukaea.uk>
chris-ashe pushed a commit that referenced this pull request May 1, 2024
* Issue #1871

* Update pfcoil.py syntax

---------

Co-authored-by: Michael Kovari <michael.kovari@ukaea.uk>
Co-authored-by: Timothy Nunn <timothy.nunn@ukaea.uk>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Division by zero in superconductor calculation

2 participants