Skip to content

🐛 Avoid eta_cd_dimensionless_hcd_primary = NaN when p_hcd_primary_injected_mw = 0 #4692

Closed

Description

@grmtrkngtn

Issue

PROCESS calculates three current-drive efficiency quantities for the primary H&CD system:

  • eta_cd_hcd_primary: absolute current-drive efficiency in A/W.
  • eta_cd_norm_hcd_primary: normalised current-drive efficiency, which scales eta_cd_hcd_primary by plasma density and major radius.
  • eta_cd_dimensionless_hcd_primary: dimensionless current-drive efficiency, which additionally normalises the efficiency using the plasma electron temperature.

Currently, eta_cd_dimensionless_hcd_primary is calculated using:

c_hcd_primary_driven / p_hcd_primary_injected_mw

However, when no auxiliary current drive is required, PROCESS can produce:

p_hcd_primary_injected_mw = 0
c_hcd_primary_driven = 0

This causes 0 / 0, giving:

eta_cd_dimensionless_hcd_primary = NaN

eta_cd_hcd_primary is already calculated from the selected i_hcd_primary model, so eta_cd_dimensionless_hcd_primary should use eta_cd_hcd_primary directly rather than recalculating the same efficiency from realised current and power.

Proposed fix

Refactor calculate_dimensionless_current_drive_efficiency() to take eta_cd_hcd instead of c_hcd_driven and p_hcd_injected

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

Metadata

Metadata

Assignees

Labels

BugSomething isnt workingHCDRelating to heating and current drive systemsPlasma currentpapercut

Type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions