Open jonmaddock opened 9 years ago
In GitLab by @mkovari on Feb 25, 2015, 15:45
See attached pfcoil_204.f90
I was about to close this issue since it seemed to have been completed, when I realised that the code seems to have jumped back to its previous state for some reason. Item 3 above replaced the peak current densities by the actual current densities for each time point (EOF and BOP). However, the python code now uses the peak current densities again! In other words, the two functions calls use identical arguments except for the field:
if pfv.ipfres == 0:
# Allowable coil overall current density at EOF
# (superconducting coils only)
(jcritwp, pfv.jstrandoh_eof, pfv.jscoh_eof, tmarg1,) = self.superconpf(
pfv.bmaxoh,
pfv.vfohc,
pfv.fcuohsu,
(abs(pfv.ric[pfv.nohc - 1]) / pfv.awpoh) * 1.0e6,
pfv.isumatoh,
tfv.fhts,
tfv.str_cs_con_res,
tfv.tftmp,
tfv.bcritsc,
tfv.tcritsc,
)
pfv.rjohc = jcritwp * pfv.awpoh / pfv.areaoh
# Allowable coil overall current density at BOP
(jcritwp, pfv.jstrandoh_bop, pfv.jscoh_bop, tmarg2,) = self.superconpf(
pfv.bmaxoh0,
pfv.vfohc,
pfv.fcuohsu,
(abs(pfv.ric[pfv.nohc - 1]) / pfv.awpoh) * 1.0e6,
pfv.isumatoh,
tfv.fhts,
tfv.str_cs_con_res,
tfv.tftmp,
tfv.bcritsc,
tfv.tcritsc,
)
For context, the current density is obviously not required to calculate the allowable current density. superconpf
uses it to derive the temperature margins (tmarg1
and tmarg2
).
Can anyone cast any light on this? @ajpearcey @jmorris-uk @timothy-nunn @ym1906 I am a bit worried that the answer will be no.
Item 1 (Diagnostic for poloidal field null) also seems to have disappeared from the code. Obviously someone was very lax about making sure that his/her code actually got incorporated into the reference version.
PF coils to be looked at in WPDES later this year. Reassigned to @ajpearcey
In GitLab by @mkovari on Feb 25, 2015, 10:50
1 Diagnostic for poloidal field null
PROCESS calculates the PF coil currents required to create a poloidal field null on the midplane for plasma initiation. This is a complicated calculation and happens suspiciously quickly! I have added an output to OUT.DAT of the field at all the points on the midplane where it is supposed to be null, active when
verbose = 1
.The code is in pfcoil.f90, following
! Find currents for plasma initiation to null field across plasma
.This sets the field to zero at the 32 test points, and calls
subroutine efc
to determine the currents.I put the actual fields calculated in
subroutine rsid
in module-level arraysbr_actual
andbz_actual
. When the null is calculated these are copied tonull_br
andnull_bz
, and these are only output ifverbose = 1
. I have put the output of the "smoothing parameter" in the same section, and commented out the printing of the very unhelpful normalised sum of squares.I have run one test file, and have reasonable results:
2 Deleted function
pfjalw
as it is no longer used (and delete the commented-out calls to it).3
subroutine ohcalc
lines 919 etcThese two calls refer to different time points, but they use the same current, which doesn't seem right:
ric(ngc2) : peak current in coil i (MA-turns)
I have replaced these current densities (winding area density) by
abs(coheof)*areaoh/awpoh
and
abs(cohbop)*areaoh/awpoh
I am a bit puzzled why this wasn't done in the first place.
Oddly, the temperature margin for the CS drops by about 1 K.