From 890e0f32e298bad211ecbc7bb250bc1bd1c09b19 Mon Sep 17 00:00:00 2001 From: apearce Date: Mon, 29 Jan 2024 11:30:56 +0000 Subject: [PATCH 1/6] =?UTF-8?q?=E2=9C=A8=20add=20pf=20current=20safety=20f?= =?UTF-8?q?actor?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- process/pfcoil.py | 17 ++++++++++------- source/fortran/pfcoil_variables.f90 | 6 +++++- 2 files changed, 15 insertions(+), 8 deletions(-) diff --git a/process/pfcoil.py b/process/pfcoil.py index 598385e1dd..1fd967a474 100644 --- a/process/pfcoil.py +++ b/process/pfcoil.py @@ -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) @@ -576,7 +576,7 @@ 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] @@ -675,12 +675,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 @@ -2314,7 +2317,7 @@ 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) @@ -2322,7 +2325,7 @@ def outpf(self): 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): diff --git a/source/fortran/pfcoil_variables.f90 b/source/fortran/pfcoil_variables.f90 index b35eb548ca..d19d5c08f4 100644 --- a/source/fortran/pfcoil_variables.f90 +++ b/source/fortran/pfcoil_variables.f90 @@ -213,6 +213,9 @@ module pfcoil_variables real(dp) :: oh_steel_frac !! central solenoid steel fraction (`iteration variable 122`) + real(dp) :: pf_current_safety_factor + !! Safety factor for current within the PF coil winding pack + real(dp), dimension(ngc2) :: pfcaseth !! steel case thickness for PF coil i (m) @@ -443,6 +446,7 @@ subroutine init_pfcoil_variables nohc = 0 ohhghf = 0.71D0 oh_steel_frac = 0.5D0 + pf_current_safety_factor = 2.0D0 pfcaseth = 0.0D0 pfclres = 2.5D-8 pfmmax = 0.0D0 @@ -466,7 +470,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 From a33e0a39b2d9de99bc38c4e8aa864b8bdecc9c7f Mon Sep 17 00:00:00 2001 From: apearce Date: Mon, 29 Jan 2024 14:29:57 +0000 Subject: [PATCH 2/6] =?UTF-8?q?=F0=9F=8E=A8=20black=20formatting?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- process/pfcoil.py | 5 ++++- source/fortran/iteration_variables.f90 | 2 +- source/fortran/pfcoil_variables.f90 | 2 +- 3 files changed, 6 insertions(+), 3 deletions(-) diff --git a/process/pfcoil.py b/process/pfcoil.py index 1fd967a474..a7edefee93 100644 --- a/process/pfcoil.py +++ b/process/pfcoil.py @@ -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]) * pfv.pf_current_safety_factor + 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] diff --git a/source/fortran/iteration_variables.f90 b/source/fortran/iteration_variables.f90 index ed65fd83f8..84ca8a9c3a 100755 --- a/source/fortran/iteration_variables.f90 +++ b/source/fortran/iteration_variables.f90 @@ -221,7 +221,7 @@ subroutine init_itv_9 implicit none lablxc(9) = 'fdene ' boundl(9) = 0.001D0 - boundu(9) = 1.000D0 + boundu(9) = 10.000D0 end subroutine init_itv_9 real(kind(1.d0)) function itv_9() diff --git a/source/fortran/pfcoil_variables.f90 b/source/fortran/pfcoil_variables.f90 index d19d5c08f4..58d8e419f2 100644 --- a/source/fortran/pfcoil_variables.f90 +++ b/source/fortran/pfcoil_variables.f90 @@ -213,7 +213,7 @@ module pfcoil_variables real(dp) :: oh_steel_frac !! central solenoid steel fraction (`iteration variable 122`) - real(dp) :: pf_current_safety_factor + real(dp) :: pf_current_safety_factor !! Safety factor for current within the PF coil winding pack real(dp), dimension(ngc2) :: pfcaseth From 4321cb6c2825903f2f5011042937c8988f0d45f2 Mon Sep 17 00:00:00 2001 From: apearce Date: Mon, 29 Jan 2024 14:42:28 +0000 Subject: [PATCH 3/6] =?UTF-8?q?=E2=9C=8F=EF=B8=8F=20update=20varialbe=20de?= =?UTF-8?q?scription?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- source/fortran/pfcoil_variables.f90 | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/source/fortran/pfcoil_variables.f90 b/source/fortran/pfcoil_variables.f90 index 58d8e419f2..f5c9940cca 100644 --- a/source/fortran/pfcoil_variables.f90 +++ b/source/fortran/pfcoil_variables.f90 @@ -214,7 +214,8 @@ module pfcoil_variables !! central solenoid steel fraction (`iteration variable 122`) real(dp) :: pf_current_safety_factor - !! Safety factor for current within the PF coil winding pack + !! 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) From 7071f8e19a9cb41e0fea36d9edb88b17c20473bc Mon Sep 17 00:00:00 2001 From: apearce Date: Mon, 29 Jan 2024 14:57:15 +0000 Subject: [PATCH 4/6] =?UTF-8?q?=F0=9F=8E=A8=20remove=20change=20to=20fdene?= =?UTF-8?q?=20bound?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- source/fortran/iteration_variables.f90 | 8 ++++---- source/fortran/pfcoil_variables.f90 | 4 ++-- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/source/fortran/iteration_variables.f90 b/source/fortran/iteration_variables.f90 index 84ca8a9c3a..72df52766f 100755 --- a/source/fortran/iteration_variables.f90 +++ b/source/fortran/iteration_variables.f90 @@ -221,7 +221,7 @@ subroutine init_itv_9 implicit none lablxc(9) = 'fdene ' boundl(9) = 0.001D0 - boundu(9) = 10.000D0 + boundu(9) = 1.000D0 end subroutine init_itv_9 real(kind(1.d0)) function itv_9() @@ -2230,7 +2230,7 @@ end subroutine set_itv_98 !--------------------------------- - + !--------------------------------- @@ -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() @@ -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) diff --git a/source/fortran/pfcoil_variables.f90 b/source/fortran/pfcoil_variables.f90 index f5c9940cca..f167d00382 100644 --- a/source/fortran/pfcoil_variables.f90 +++ b/source/fortran/pfcoil_variables.f90 @@ -213,8 +213,8 @@ 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 + 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 From 48da8264500053f6ff16ced13c115825e0cdf529 Mon Sep 17 00:00:00 2001 From: apearce Date: Mon, 29 Jan 2024 15:32:03 +0000 Subject: [PATCH 5/6] =?UTF-8?q?=F0=9F=90=9B=20fix=20default=20SF=20value?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- source/fortran/pfcoil_variables.f90 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/source/fortran/pfcoil_variables.f90 b/source/fortran/pfcoil_variables.f90 index f167d00382..06d464e731 100644 --- a/source/fortran/pfcoil_variables.f90 +++ b/source/fortran/pfcoil_variables.f90 @@ -447,7 +447,7 @@ subroutine init_pfcoil_variables nohc = 0 ohhghf = 0.71D0 oh_steel_frac = 0.5D0 - pf_current_safety_factor = 2.0D0 + pf_current_safety_factor = 1.0D0 pfcaseth = 0.0D0 pfclres = 2.5D-8 pfmmax = 0.0D0 From a0fb5686f9365762441789ade2d25ed66b5c5705 Mon Sep 17 00:00:00 2001 From: apearce Date: Fri, 2 Feb 2024 14:58:03 +0000 Subject: [PATCH 6/6] =?UTF-8?q?=E2=9C=85=20update=20large=20tokamak=20to?= =?UTF-8?q?=20pass=20regression=20test?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- tests/regression/scenarios/large-tokamak/IN.DAT | 3 +++ 1 file changed, 3 insertions(+) diff --git a/tests/regression/scenarios/large-tokamak/IN.DAT b/tests/regression/scenarios/large-tokamak/IN.DAT index 65094ff6ec..15437e6566 100644 --- a/tests/regression/scenarios/large-tokamak/IN.DAT +++ b/tests/regression/scenarios/large-tokamak/IN.DAT @@ -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 * ***********