Skip to content

Addition of an evaluation regression file to test running of nbi model and secondary current drive - #4725

Open
kj5248 wants to merge 1 commit into
mainfrom
jmatthews/4062-testing-of-nbi-models
Open

kj5248 wants to merge 1 commit into
mainfrom
jmatthews/4062-testing-of-nbi-models

Conversation

@kj5248

@kj5248 kj5248 commented Nov 3, 2026 •

Copy link
Copy Markdown
Collaborator

Closes #4062

Description

Added in a eval regression file that will use secondary current drive and an nbi model as those are both currently untested.

Checklist

I confirm that I have completed the following checks:

  • My changes follow the PROCESS style guide
  • I have justified any large differences in the regression tests caused by this pull request in the comments.
  • I have added new tests where appropriate for the changes I have made.
  • If I have had to change any existing unit or integration tests, I have justified this change in the pull request comments.
  • If I have made documentation changes, I have checked they render correctly.
  • I have added documentation for my change, if appropriate.

@kj5248
kj5248 requested a review from a team as a code owner November 3, 2026 09:27
@kj5248 kj5248 linked an issue Nov 3, 2026 that may be closed by this pull request
@codecov-commenter

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 50.26%. Comparing base (4cebb38) to head (79780de).

Additional details and impacted files
@@           Coverage Diff           @@
##             main    #4725   +/-   ##
=======================================
  Coverage   50.26%   50.26%           
=======================================
  Files         181      181           
  Lines       30633    30633           
=======================================
  Hits        15397    15397           
  Misses      15236    15236           

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@timothy-nunn timothy-nunn self-assigned this Nov 5, 2026
@timothy-nunn
timothy-nunn requested a review from a team November 5, 2026 09:53
alphan = 0.9 * Plasma density profile index (⍺ₙ)
alphat = 1.4 * Plasma temperature profile index (⍺ₜ)
aspect = 1.8 * Plasma aspect ratio (A) (`iteration variable 1`)
beta_total_vol_avg = 0.12207750374856029 * Volume averaged total plasma beta (⟨β⟩) (`iteration variable 5`) (calculated if stellarator)

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
beta_total_vol_avg = 0.12207750374856029 * Volume averaged total plasma beta (⟨β⟩) (`iteration variable 5`) (calculated if stellarator)

Comment on lines +177 to +182
*---------------------Numerics---------------------*

i_process_run_mode = -2 * Evaluation mode
i_figure_merit = -5 *
n_equality_constraints = 3 * number of equality constraints to be satisfied
epsvmc = 1e-9 * Error tolerance for optimiser

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can you move this section to the top?

Comment on lines +7 to +9
icc = 1 *
icc = 2 *
icc = 11 *

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Probably worth commenting that the constraints below here are not enforced but are kept "on" so that they get reported in the OUT.DAT

dx_tf_hts_tape_hastelloy = 1e-5 * thickness of Hastelloy layer in tape (m)
dx_tf_croco_strand_copper = 2.0e-3 * Thickness of CroCo strand copper tube (m) (`iteration variable 158`)

*-----------------Tfcoil Variables-----------------*

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

How easy would it be to have this file use a different TF coil model? E.g. a resistive TF. This is another huge area of the code that is untested

p_hcd_injected_max = 225.0 * maximum allowable value for injected power (MW) (`constraint equation 30`)
p_hcd_secondary_injected_mw = 10 * secondary total fixed auxiliary injected power (MW)

*------------------Dcll Variables------------------*

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Could this file also maybe use the DCLL instead of another blanket model? Again, this untested and would be useful!

@chris-ashe chris-ashe left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I have noticed aswell that the beam outline for the top down toroidal cross-section does not show when the NBI is secondary here

@ajpearcey

Copy link
Copy Markdown
Collaborator

We can absolutely add DCLL blankets and resistive magnets to this file. But I know users do sometimes uses the files in the regression tests as starting points or examples input files, and this will create an odd frankentechnology machine. I think that is fine, but is worth highlighting.

@timothy-nunn

Copy link
Copy Markdown
Collaborator

We can absolutely add DCLL blankets and resistive magnets to this file. But I know users do sometimes uses the files in the regression tests as starting points or examples input files, and this will create an odd frankentechnology machine. I think that is fine, but is worth highlighting.

@ajpearcey thanks for pointing this out. Maybe we keep this file as is and make some more eval files which have more realistic configurations that use these models?

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.

Testing of NBI models

5 participants