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:
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
Description
I encounter a
ProcessValueErrorwhen running PROCESS with negative triangularity (triang = -0.5) andi_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:
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:
The error indicates that
i_plasma_currenthas a value of1whencalculate_plasma_current()is called, despite the input specifying:Full traceback
Version
Expected behaviour
If
triang < 0requiresi_plasma_current = 8, then the value ofi_plasma_currentused during the output calculation should remain consistent with the input/optimised solution.Alternatively, if
i_plasma_current = 8is 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