From c0e7a37058db2bcd533d80a206071408cb14fc3b Mon Sep 17 00:00:00 2001 From: Michael Kovari Date: Wed, 17 Apr 2024 16:05:33 +0100 Subject: [PATCH 1/3] New variable for resistivity of PF coil bus bars --- process/power.py | 7 ++++--- source/fortran/pfcoil_variables.f90 | 5 +++++ 2 files changed, 9 insertions(+), 3 deletions(-) diff --git a/process/power.py b/process/power.py index 92bc76d895..bf0e518751 100644 --- a/process/power.py +++ b/process/power.py @@ -103,9 +103,9 @@ def pfpwr(self, output: bool): albusa[ig] = abs(pfcoil_variables.cptdin[ic]) / 100.0e0 # Resistance of bussing for circuit (ohm) - # Include 50% enhancement for welds, joints etc, (G. Gorker, ORNL) # pfbusl : bus length for each PF circuit (m) - pfbusr[ig] = 1.5e0 * 2.62e-4 * pfbusl / albusa[ig] + # pfbusr[ig] = 1.5e0 * 2.62e-4 * pfbusl / albusa[ig] + pfbusr[ig] = pfcoil_variables.rhopfbus * pfbusl / (albusa[ig] / 10000) # Total PF coil resistance (during burn) # pfcoil_variables.ric : maximum current in coil (A) @@ -2712,7 +2712,8 @@ def tfcpwr(self, output: bool, itfka, rmajor, ntfc, vtfskv, ettfmj, rptfc): albuswt = 2.7e0 * albusa * tfbusl / 1.0e4 # Total resistance of TF bus, ohms - rtfbus = 2.62e-4 * tfbusl / albusa + # rtfbus = 2.62e-4 * tfbusl / albusa + rtfbus = tfcoil_variables.rhotfbus * tfbusl / (albusa / 10000) # Total voltage drop across TF bus, volts vtfbus = 1000.0e0 * itfka * rtfbus diff --git a/source/fortran/pfcoil_variables.f90 b/source/fortran/pfcoil_variables.f90 index 06d464e731..73874173dc 100644 --- a/source/fortran/pfcoil_variables.f90 +++ b/source/fortran/pfcoil_variables.f90 @@ -223,6 +223,10 @@ module pfcoil_variables real(dp) :: pfclres !! PF coil resistivity (if ipfres=1) (Ohm-m) + real(dp) :: rhopfbus + !! Resistivity of the PF coil bus bars (irrespective of + !! whether the coils themselves are superconducting or resistive) (Ohm-m) + real(dp) :: pfmmax !! mass of heaviest PF coil (tonnes) @@ -450,6 +454,7 @@ subroutine init_pfcoil_variables pf_current_safety_factor = 1.0D0 pfcaseth = 0.0D0 pfclres = 2.5D-8 + rhopfbus = 2.5D-8 pfmmax = 0.0D0 pfrmax = 0.0D0 pfwpmw = 0.0D0 From 42fb6d6562e965eeee525514fd867034949552d2 Mon Sep 17 00:00:00 2001 From: Michael Kovari Date: Wed, 17 Apr 2024 16:18:36 +0100 Subject: [PATCH 2/3] Removed code to set TF coil bus resistivity - TF leg resistivity --- process/power.py | 9 +-------- source/fortran/pfcoil_variables.f90 | 2 +- source/fortran/tfcoil_variables.f90 | 2 +- 3 files changed, 3 insertions(+), 10 deletions(-) diff --git a/process/power.py b/process/power.py index bf0e518751..9cc39b593d 100644 --- a/process/power.py +++ b/process/power.py @@ -2474,14 +2474,7 @@ def tfpwr(self, output: bool): abus = tfcoil_variables.cpttf / tfcoil_variables.jbus # Bus resistance [ohm] - # Bus resistivity (tfcoil_variables.rhotfbus) default value : -1.0e0 - # If this value is chosen, the bus resistivity is the same as the leg one - if ( - abs(tfcoil_variables.rhotfbus + 1.0e0) - < numpy.finfo(float(tfcoil_variables.rhotfbus)).eps - ): - tfcoil_variables.rhotfbus = tfcoil_variables.rhotfleg - + # Bus resistivity (tfcoil_variables.rhotfbus) tfbusres = tfcoil_variables.rhotfbus * tfcoil_variables.tfbusl / abus # Bus mass (kg) diff --git a/source/fortran/pfcoil_variables.f90 b/source/fortran/pfcoil_variables.f90 index 73874173dc..66243eea96 100644 --- a/source/fortran/pfcoil_variables.f90 +++ b/source/fortran/pfcoil_variables.f90 @@ -454,7 +454,7 @@ subroutine init_pfcoil_variables pf_current_safety_factor = 1.0D0 pfcaseth = 0.0D0 pfclres = 2.5D-8 - rhopfbus = 2.5D-8 + rhopfbus = 2.62D-8 pfmmax = 0.0D0 pfrmax = 0.0D0 pfwpmw = 0.0D0 diff --git a/source/fortran/tfcoil_variables.f90 b/source/fortran/tfcoil_variables.f90 index c0b07933a9..7fd249051a 100644 --- a/source/fortran/tfcoil_variables.f90 +++ b/source/fortran/tfcoil_variables.f90 @@ -955,7 +955,7 @@ subroutine init_tfcoil_variables tflegmw = 0.0D0 rhocp = 0.0D0 rhotfleg = 0.0D0 - rhotfbus = -1.0D0 ! 2.5D-8 + rhotfbus = 2.62D-8 !-1.0D0 ! 2.5D-8 frhocp = 1.0D0 frholeg = 1.0D0 rho_tf_joints = 2.5D-10 From 660fab2bee869e499476f27b07954a11210c6f2c Mon Sep 17 00:00:00 2001 From: Michael Kovari Date: Thu, 18 Apr 2024 10:08:23 +0100 Subject: [PATCH 3/3] New variable rhopfbus and changes to use of rhotfbus --- process/power.py | 3 +++ process/pulse.py | 4 +++- source/fortran/input.f90 | 5 ++++- source/fortran/pfcoil_variables.f90 | 4 ++-- tests/integration/data/test_solver.conf | 2 +- 5 files changed, 13 insertions(+), 5 deletions(-) diff --git a/process/power.py b/process/power.py index 9cc39b593d..856ce97ecd 100644 --- a/process/power.py +++ b/process/power.py @@ -105,6 +105,7 @@ def pfpwr(self, output: bool): # Resistance of bussing for circuit (ohm) # pfbusl : bus length for each PF circuit (m) # pfbusr[ig] = 1.5e0 * 2.62e-4 * pfbusl / albusa[ig] + # I have removed the fudge factor of 1.5 but included it in the value of rhopfbus pfbusr[ig] = pfcoil_variables.rhopfbus * pfbusl / (albusa[ig] / 10000) # Total PF coil resistance (during burn) @@ -2475,6 +2476,8 @@ def tfpwr(self, output: bool): # Bus resistance [ohm] # Bus resistivity (tfcoil_variables.rhotfbus) + # Issue #1253: there was a fudge here to set the bus bar resistivity equal + # to the TF conductor resistivity. I have removed this. tfbusres = tfcoil_variables.rhotfbus * tfcoil_variables.tfbusl / abus # Bus mass (kg) diff --git a/process/pulse.py b/process/pulse.py index 55ad29826e..e283d88266 100755 --- a/process/pulse.py +++ b/process/pulse.py @@ -73,7 +73,9 @@ def tohswg(self, output: bool) -> None: pfbusl = 8.0e0 * physics_variables.rmajor + 140.0e0 albusa = abs(pfcoil_variables.cptdin[pfcoil_variables.nohc - 1]) / 100.0e0 - rho = 1.5e0 * 2.62e-4 * pfbusl / albusa + # rho = 1.5e0 * 2.62e-4 * pfbusl / albusa + # I have removed the fudge factor of 1.5 but included it in the value of rhopfbus + rho = pfcoil_variables.rhopfbus * pfbusl / (albusa / 10000) # Central Solenoid power source emf (volts) diff --git a/source/fortran/input.f90 b/source/fortran/input.f90 index 1c247b721b..a9385813f3 100644 --- a/source/fortran/input.f90 +++ b/source/fortran/input.f90 @@ -296,7 +296,7 @@ subroutine parse_input_file(in_file,out_file,show_changes) coreradiationfraction, fimp use numerics, only: factor, boundl, minmax, neqns, nvar, epsfcn, ixc, & epsvmc, ftol, ipnvars, ioptimz, nineqns, ipeqns, boundu, icc, ipnfoms, name_xc - use pfcoil_variables, only: rjconpf, zref, fcuohsu, oh_steel_frac, vf, & + use pfcoil_variables, only: rhopfbus, rjconpf, zref, fcuohsu, oh_steel_frac, vf, & coheof, sigpfcalw, alstroh, ipfres, fcupfsu, fvssu, etapsu, i_cs_stress, & fbmaxcs, ngc, rpf2, fcohbop, ohhghf, vfohc, isumatoh, ngrpmx, ngc2, rpf1, & ngrp, isumatpf, nfxfh, alfapf, routr, sigpfcf, pfclres, bmaxcs_lim, & @@ -1814,6 +1814,9 @@ subroutine parse_input_file(in_file,out_file,show_changes) ! PF coil settings + case ('rhopfbus') + call parse_real_variable('rhopfbus', rhopfbus, 0.0D0, 1.0D-5, & + 'CS and PF coil bus (feeders) resistivity (ohm-m)') case ('bmaxcs_lim') call parse_real_variable('bmaxcs_lim', bmaxcs_lim, 0.01D0, 100.0D0, & 'Maximum allowed peak field on central solenoid') diff --git a/source/fortran/pfcoil_variables.f90 b/source/fortran/pfcoil_variables.f90 index 66243eea96..d5fee46854 100644 --- a/source/fortran/pfcoil_variables.f90 +++ b/source/fortran/pfcoil_variables.f90 @@ -224,7 +224,7 @@ module pfcoil_variables !! PF coil resistivity (if ipfres=1) (Ohm-m) real(dp) :: rhopfbus - !! Resistivity of the PF coil bus bars (irrespective of + !! Resistivity of CS and PF coil bus bars (irrespective of !! whether the coils themselves are superconducting or resistive) (Ohm-m) real(dp) :: pfmmax @@ -454,7 +454,7 @@ subroutine init_pfcoil_variables pf_current_safety_factor = 1.0D0 pfcaseth = 0.0D0 pfclres = 2.5D-8 - rhopfbus = 2.62D-8 + rhopfbus = 3.93D-8 pfmmax = 0.0D0 pfrmax = 0.0D0 pfwpmw = 0.0D0 diff --git a/tests/integration/data/test_solver.conf b/tests/integration/data/test_solver.conf index b358b86a23..a3acd009c7 100644 --- a/tests/integration/data/test_solver.conf +++ b/tests/integration/data/test_solver.conf @@ -2,7 +2,7 @@ * * No iterations -NITER = 10 +NITER = 1 * sets flag of same name in IN.DAT: * None - keeps original value