Skip to content

🐛 Negative triangularity + i_plasma_current = 8 -> Error during output #4616

Description

@CoronelBuendia

Description

I encounter a ProcessValueError when running PROCESS with negative triangularity (triang = -0.5) and i_plasma_current = 8.

The optimisation itself appears to converge successfully and PROCESS reports a feasible solution, but the run then fails while writing the output.

Input

The relevant settings are:

triang = -0.5
i_plasma_current = 8

Observed behaviour

PROCESS can find a feasible solution, but during the subsequent output stage, the plasma-current models are evaluated again and the following exception is raised:

process.core.exceptions.ProcessValueError: Triangularity is negative without i_plasma_current = 8 selected: triang=-0.5, i_plasma_current=1

The error indicates that i_plasma_current has a value of 1 when calculate_plasma_current() is called, despite the input specifying:

i_plasma_current = 8

Full traceback

Traceback (most recent call last):
  File "/home/matti/code/PROCESS_PROJECT/PROCESS/env/bin/process", line 8, in <module>
    sys.exit(process_cli())
  ...
  File "/home/matti/code/PROCESS_PROJECT/PROCESS/process/models/physics/plasma_current.py", line 115, in output
    self.output_plasma_current_models()
  File "/home/matti/code/PROCESS_PROJECT/PROCESS/process/models/physics/plasma_current.py", line 487, in output_plasma_current_models
    plasma_currents = self.calculate_all_plasma_current_models(
                      ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/matti/code/PROCESS_PROJECT/PROCESS/process/models/physics/plasma_current.py", line 464, in calculate_all_plasma_current_models
    results[model] = self.calculate_plasma_current(
                     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/matti/code/PROCESS_PROJECT/PROCESS/process/models/physics/plasma_current.py", line 308, in calculate_plasma_current
    raise ProcessValueError(
process.core.exceptions.ProcessValueError: Triangularity is negative without i_plasma_current = 8 selected: triang=-0.5, i_plasma_current=1

Version

PROCESS version: 3.4.3.dev53+g2ae0ef2dc
Git tag: v3.4.2-53-g2ae0ef2d
Git branch: main

Expected behaviour

If triang < 0 requires i_plasma_current = 8, then the value of i_plasma_current used during the output calculation should remain consistent with the input/optimised solution.

Alternatively, if i_plasma_current = 8 is only valid during the optimisation and the output stage intentionally evaluates the other plasma-current models, the output routine should presumably handle this case without raising an exception.

Steps to reproduce

I have taken the ST regression test (converges) and the EUDEMO LAR regression test (does not converge) changing the below and getting the same error

triang = -0.5
i_plasma_current = 8

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

Type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions