Skip to content

🐛 ZeroDivisionError in stresscl with i_tf_bucking in {2, 3} #4635

Closed

Description

@CoronelBuendia

Describe the bug

A ZeroDivisionError occurs in stresscl with i_tf_bucking in {2, 3}.

Steps to reproduce

Change st_regression.IN.DAT i_tf_bucking = 2 and observe.

Expected behaviour

Evidence

    self.models.croco_sctfcoil.run()
  File "/home/matti/code/PROCESS_PROJECT/PROCESS/process/models/tfcoil/superconducting.py", line 4077, in run
    ) = self.stresscl(
        ^^^^^^^^^^^^^^
ZeroDivisionError: division by zero

Environment

  • OS: Ubuntu 24
  • Version: main

Additional context

This is in a jitted function, and this error goes away when you remove the JIT compilation. This is because a numpy error is raised instead. The problem, however, persists.

I believe it is because a_cs_poloidal is used prior to be being calculated and so it takes a default value of 0.0

Activity

  1. mkovari commented on Oct 1, 2026

    @mkovari
    Collaborator

    Are you saying that i_tf_bucking = 2 or 3 always fails?

  2. CoronelBuendia commented on Oct 2, 2026

    @CoronelBuendia
    ContributorAuthor

    Yes.

    I have just tried setting a_cs_poloidal = 0.001 in the IN.DAT, but it doesn't work (it's not an input, it's "calculated" by the code). This issue is related to #4638

  3. self-assigned this
    on Oct 5, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

BugSomething isnt workingTF CoilToroidal field coil

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions