Skip to content

chipf(1) is never set #6

Description

@CharlesCNorton

add_fluxes.f90 fills chipf on the interior and at the edge only:

! add_fluxes.f90:66-67
  chipf(2:ns1) = (chips(2:ns1) + chips(3:ns1+1))/2.0_dp
  chipf(ns)    = 2.0_dp*chips(ns)-chips(ns1)

chipf(1) keeps its allocation value and is written as -0.0 (wrout.f90:738), while iotaf(1) and phipf(1) are both extrapolated to the axis (add_fluxes.f90:70, eqfor.f90:148). chipf/phipf reproduces iotaf on every other surface and is 0 at the axis; q = phipf/chipf is infinite there.

Hirshman fixed both ends of this profile in 2016. PARVMEC add_fluxes.f90:153-155:

      chipf(1)     = c1p5*chips(2) - p5*chips(3)                       !SPH ADDED THIS 4-8-16
      chipf(2:ns1) = (chips(2:ns1) + chips(3:ns1+1))/2
      chipf(ns)    = c1p5*chips(ns)- p5*chips(ns1)                     !SPH FIXED THIS 4-8-16

The 2017 STELLOPT copy of VMEC2000 8.52 that this repository started from has neither line (VMEC2000/Sources/General/add_fluxes.f90:62-63 in the history), so the missing axis value and the 2*chips(ns) - chips(ns1) edge rule are both inherited. The 1.5/-0.5 rule already used for iotaf at add_fluxes.f90:70-71 restores iota = chi'/phi' at both ends.

Activity

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions