Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
20 changes: 13 additions & 7 deletions process/pfcoil.py
Original file line number Diff line number Diff line change
Expand Up @@ -547,7 +547,7 @@ def pfcoil(self):
dz = 0.5e0 * (
bv.hmax * (1.0e0 - pfv.ohhghf) + bv.tfcth + 0.1e0
) # ???
area = 4.0e0 * dx * dz
area = 4.0e0 * dx * dz * pfv.pf_current_safety_factor

# Number of turns
# CPTDIN[i] is the current per turn (input)
Expand Down Expand Up @@ -576,7 +576,10 @@ def pfcoil(self):
else:
# Other coils. N.B. Current density RJCONPF[i] is defined in
# routine INITIAL for these coils.
area = abs(pfv.ric[i] * 1.0e6 / pfv.rjconpf[i])
area = (
abs(pfv.ric[i] * 1.0e6 / pfv.rjconpf[i])
* pfv.pf_current_safety_factor
)

pfv.turns[i] = abs((pfv.ric[i] * 1.0e6) / pfv.cptdin[i])
aturn[i] = area / pfv.turns[i]
Expand Down Expand Up @@ -675,12 +678,15 @@ def pfcoil(self):

if pfv.ipfres == 0:
# Superconducting coil
# Previous assumptions: 500 MPa stress limit with 2/3 of the force
# supported in the outer (steel) case.
# Now, 500 MPa replaced by sigpfcalw, 2/3 factor replaced by sigpfcf
# Updated assumptions: 500 MPa stress limit with all of the force
# supported in the conduit (steel) case.
# Now, 500 MPa replaced by sigpfcalw, sigpfcf now defaultly set to 1

areaspf = pfv.sigpfcf * forcepf / (pfv.sigpfcalw * 1.0e6)

# Thickness of hypothetical steel casing assumed to encase the PF
# winding pack; in reality, the steel is distributed
# throughout the conductor. Issue #152
# Assume a case of uniform thickness around coil cross-section
# Thickness found via a simple quadratic equation

Expand Down Expand Up @@ -2314,15 +2320,15 @@ def outpf(self):
op.osubhd(self.outfile, "Geometry of PF coils, central solenoid and plasma:")
op.write(
self.outfile,
"coil\t\t\tR(m)\t\tZ(m)\t\tdR(m)\t\tdZ(m)\t\tturns\t\tsteel thickness(m)",
"coil\t\t\tR(m)\t\tZ(m)\t\tdR(m)\t\tdZ(m)\t\tturns",
)
op.oblnkl(self.outfile)

# PF coils
for k in range(pf.nef):
op.write(
self.outfile,
f"PF {k}\t\t\t{pfv.rpf[k]:.2e}\t{pfv.zpf[k]:.2e}\t{pfv.rb[k]-pfv.ra[k]:.2e}\t{abs(pfv.zh[k]-pfv.zl[k]):.2e}\t{pfv.turns[k]:.2e}\t{pfv.pfcaseth[k]:.2e}",
f"PF {k}\t\t\t{pfv.rpf[k]:.2e}\t{pfv.zpf[k]:.2e}\t{pfv.rb[k]-pfv.ra[k]:.2e}\t{abs(pfv.zh[k]-pfv.zl[k]):.2e}\t{pfv.turns[k]:.2e}",
)

for k in range(pf.nef):
Expand Down
6 changes: 3 additions & 3 deletions source/fortran/iteration_variables.f90
Original file line number Diff line number Diff line change
Expand Up @@ -2230,7 +2230,7 @@ end subroutine set_itv_98

!---------------------------------



!---------------------------------

Expand Down Expand Up @@ -4060,7 +4060,7 @@ subroutine loadxc
case (99);
case (100);
case (101);
case (102);
case (102);
case (103); xcm(i) = itv_103()
case (104); xcm(i) = itv_104()
case (105); xcm(i) = itv_105()
Expand Down Expand Up @@ -4327,7 +4327,7 @@ subroutine convxc(xc,nn)
case (99);
case (100);
case (101);
case (102);
case (102);
case (103); call set_itv_103(ratio)
case (104); call set_itv_104(ratio)
case (105); call set_itv_105(ratio)
Expand Down
7 changes: 6 additions & 1 deletion source/fortran/pfcoil_variables.f90
Original file line number Diff line number Diff line change
Expand Up @@ -213,6 +213,10 @@ module pfcoil_variables
real(dp) :: oh_steel_frac
!! central solenoid steel fraction (`iteration variable 122`)

real(dp) :: pf_current_safety_factor
!! Ratio of permissible PF coil conductor current density to critical conductor
!! current density based on short-sample DC measurements

real(dp), dimension(ngc2) :: pfcaseth
!! steel case thickness for PF coil i (m)

Expand Down Expand Up @@ -443,6 +447,7 @@ subroutine init_pfcoil_variables
nohc = 0
ohhghf = 0.71D0
oh_steel_frac = 0.5D0
pf_current_safety_factor = 1.0D0
pfcaseth = 0.0D0
pfclres = 2.5D-8
pfmmax = 0.0D0
Expand All @@ -466,7 +471,7 @@ subroutine init_pfcoil_variables
7.0D0, 7.0D0, 7.0D0, 7.0D0, 7.0D0, 7.0D0, 7.0D0/)
s_tresca_oh = 0.0D0
sigpfcalw = 500.0D0
sigpfcf = 0.666D0
sigpfcf = 1.0D0
sxlg = 0.0D0
tmargoh = 0.0D0
turns = 0.0D0
Expand Down
3 changes: 3 additions & 0 deletions tests/regression/scenarios/large-tokamak/IN.DAT
Original file line number Diff line number Diff line change
Expand Up @@ -581,6 +581,9 @@ fcuohsu = 0.70
* ITER Nb3Sn parameterisation
isumatoh = 1

* Fraction of JxB force supported by PF coil case
sigpfcf = 0.666

* TF Coil *
***********

Expand Down