From 8d56bec9f6d4eeffe244b9cdb45b72fbe686a165 Mon Sep 17 00:00:00 2001 From: Michael Kovari Date: Fri, 16 Feb 2024 16:10:45 +0000 Subject: [PATCH 1/2] Issue #1871 --- process/pfcoil.py | 48 +++++++++++++++++++++++++++-------------------- 1 file changed, 28 insertions(+), 20 deletions(-) diff --git a/process/pfcoil.py b/process/pfcoil.py index a31651891d..12fe0dd797 100644 --- a/process/pfcoil.py +++ b/process/pfcoil.py @@ -603,12 +603,12 @@ def pfcoil(self): i = i + 1 # Calculate peak field, allowable current density, resistive - # power losses and volumes and weights for each PF coil + # power losses and volumes and weights for each PF coil, index i i = 0 it = 0 pfv.powpfres = 0.0e0 pfv.pfmmax = 0.0e0 - + for ii in range(pfv.ngrp): iii = ii for ij in range(pfv.ncls[ii]): @@ -620,8 +620,8 @@ def pfcoil(self): i + 1, iii + 1, it ) # returns bpf, bpf2 - # Allowable current density (for superconducting coils) - + #Issue 871. MDK + # Allowable current density (for superconducting coils) for each coil, index i if pfv.ipfres == 0: bmax = max(abs(pfv.bpf[i]), abs(pf.bpf2[i])) pfv.rjpfalw[i], jstrand, jsc, tmarg = self.superconpf( @@ -2904,12 +2904,12 @@ def deltaj_hijc_rebco(temperature): jcritsc, _ = superconductors.jcrit_rebco(thelium, bmax) jcritstr = jcritsc * (1.0e0 - fcu) - # The CS coil current at EOF - ioheof = bv.hmax * pfv.ohhghf * bv.ohcth * 2.0 * pfv.coheof - # The CS coil current/copper area calculation for quench protection - # Copper area = (area of coil - area of steel)*(1- void fraction)* - # (fraction of copper in strands) - rcv.copperaoh_m2 = ioheof / (pfv.awpoh * (1.0 - pfv.vfohc) * pfv.fcuohsu) + # # The CS coil current at EOF + # ioheof = bv.hmax * pfv.ohhghf * bv.ohcth * 2.0 * pfv.coheof + # # The CS coil current/copper area calculation for quench protection + # # Copper area = (area of coil - area of steel)*(1- void fraction)* + # # (fraction of copper in strands) + # rcv.copperaoh_m2 = ioheof / (pfv.awpoh * (1.0 - pfv.vfohc) * pfv.fcuohsu) elif isumat == 7: # Durham Ginzburg-Landau critical surface model for Nb-Ti @@ -2918,8 +2918,8 @@ def deltaj_hijc_rebco(temperature): jcritsc, _, _ = superconductors.gl_nbti(thelium, bmax, strain, bc20m, tc0m) jcritstr = jcritsc * (1.0e0 - fcu) - # The CS coil current at EOF - ioheof = bv.hmax * pfv.ohhghf * bv.ohcth * 2.0 * pfv.coheof + # # The CS coil current at EOF + # ioheof = bv.hmax * pfv.ohhghf * bv.ohcth * 2.0 * pfv.coheof elif isumat == 8: # Durham Ginzburg-Landau critical surface model for REBCO @@ -2929,10 +2929,10 @@ def deltaj_hijc_rebco(temperature): # A0 calculated for tape cross section already jcritstr = jcritsc * (1.0e0 - fcu) - # The CS coil current at EOF - ioheof = bv.hmax * pfv.ohhghf * bv.ohcth * 2.0 * pfv.coheof - # The CS coil current/copper area calculation for quench protection - rcv.copperaoh_m2 = ioheof / (pfv.awpoh * (1.0 - pfv.vfohc) * pfv.fcuohsu) + # # The CS coil current at EOF + # ioheof = bv.hmax * pfv.ohhghf * bv.ohcth * 2.0 * pfv.coheof + # # The CS coil current/copper area calculation for quench protection + # rcv.copperaoh_m2 = ioheof / (pfv.awpoh * (1.0 - pfv.vfohc) * pfv.fcuohsu) elif isumat == 9: # Hazelton experimental data + Zhai conceptual model for REBCO @@ -2944,16 +2944,24 @@ def deltaj_hijc_rebco(temperature): # A0 calculated for tape cross section already jcritstr = jcritsc * (1.0e0 - fcu) - # The CS coil current at EOF - ioheof = bv.hmax * pfv.ohhghf * bv.ohcth * 2.0 * pfv.coheof - # The CS coil current/copper area calculation for quench protection - rcv.copperaoh_m2 = ioheof / (pfv.awpoh * (1.0 - pfv.vfohc) * pfv.fcuohsu) + # # The CS coil current at EOF + # ioheof = bv.hmax * pfv.ohhghf * bv.ohcth * 2.0 * pfv.coheof + # # The CS coil current/copper area calculation for quench protection + # rcv.copperaoh_m2 = ioheof / (pfv.awpoh * (1.0 - pfv.vfohc) * pfv.fcuohsu) else: # Error condition eh.idiag[0] = isumat eh.report_error(156) + # Issue 1871 MDK. The CS calculation has been removed from the isumat option list, + # and only calculated if the CS properties are needed. + if bv.iohcl != 0: + # CS coil current at EOF + ioheof = bv.hmax * pfv.ohhghf * bv.ohcth * 2.0 * pfv.coheof + # CS coil current/copper area calculation for quench protection + rcv.copperaoh_m2 = ioheof / (pfv.awpoh * (1.0 - pfv.vfohc) * pfv.fcuohsu) + # Critical current density in winding pack jcritwp = jcritstr * (1.0e0 - fhe) jstrand = jwp / (1.0e0 - fhe) From db8134e379bd6e9e337ec4043ebfa464548f35c0 Mon Sep 17 00:00:00 2001 From: Timothy Nunn Date: Tue, 20 Feb 2024 09:15:21 +0000 Subject: [PATCH 2/2] Update pfcoil.py syntax --- process/pfcoil.py | 32 +++++++++++++++++--------------- 1 file changed, 17 insertions(+), 15 deletions(-) diff --git a/process/pfcoil.py b/process/pfcoil.py index 12fe0dd797..63451837cb 100644 --- a/process/pfcoil.py +++ b/process/pfcoil.py @@ -608,7 +608,7 @@ def pfcoil(self): it = 0 pfv.powpfres = 0.0e0 pfv.pfmmax = 0.0e0 - + for ii in range(pfv.ngrp): iii = ii for ij in range(pfv.ncls[ii]): @@ -620,7 +620,7 @@ def pfcoil(self): i + 1, iii + 1, it ) # returns bpf, bpf2 - #Issue 871. MDK + # Issue 1871. MDK # Allowable current density (for superconducting coils) for each coil, index i if pfv.ipfres == 0: bmax = max(abs(pfv.bpf[i]), abs(pf.bpf2[i])) @@ -2904,11 +2904,11 @@ def deltaj_hijc_rebco(temperature): jcritsc, _ = superconductors.jcrit_rebco(thelium, bmax) jcritstr = jcritsc * (1.0e0 - fcu) - # # The CS coil current at EOF + # The CS coil current at EOF # ioheof = bv.hmax * pfv.ohhghf * bv.ohcth * 2.0 * pfv.coheof - # # The CS coil current/copper area calculation for quench protection - # # Copper area = (area of coil - area of steel)*(1- void fraction)* - # # (fraction of copper in strands) + # The CS coil current/copper area calculation for quench protection + # Copper area = (area of coil - area of steel)*(1- void fraction)* + # (fraction of copper in strands) # rcv.copperaoh_m2 = ioheof / (pfv.awpoh * (1.0 - pfv.vfohc) * pfv.fcuohsu) elif isumat == 7: @@ -2918,7 +2918,7 @@ def deltaj_hijc_rebco(temperature): jcritsc, _, _ = superconductors.gl_nbti(thelium, bmax, strain, bc20m, tc0m) jcritstr = jcritsc * (1.0e0 - fcu) - # # The CS coil current at EOF + # The CS coil current at EOF # ioheof = bv.hmax * pfv.ohhghf * bv.ohcth * 2.0 * pfv.coheof elif isumat == 8: @@ -2929,9 +2929,9 @@ def deltaj_hijc_rebco(temperature): # A0 calculated for tape cross section already jcritstr = jcritsc * (1.0e0 - fcu) - # # The CS coil current at EOF + # The CS coil current at EOF # ioheof = bv.hmax * pfv.ohhghf * bv.ohcth * 2.0 * pfv.coheof - # # The CS coil current/copper area calculation for quench protection + # The CS coil current/copper area calculation for quench protection # rcv.copperaoh_m2 = ioheof / (pfv.awpoh * (1.0 - pfv.vfohc) * pfv.fcuohsu) elif isumat == 9: @@ -2944,9 +2944,9 @@ def deltaj_hijc_rebco(temperature): # A0 calculated for tape cross section already jcritstr = jcritsc * (1.0e0 - fcu) - # # The CS coil current at EOF + # The CS coil current at EOF # ioheof = bv.hmax * pfv.ohhghf * bv.ohcth * 2.0 * pfv.coheof - # # The CS coil current/copper area calculation for quench protection + # The CS coil current/copper area calculation for quench protection # rcv.copperaoh_m2 = ioheof / (pfv.awpoh * (1.0 - pfv.vfohc) * pfv.fcuohsu) else: @@ -2954,13 +2954,15 @@ def deltaj_hijc_rebco(temperature): eh.idiag[0] = isumat eh.report_error(156) - # Issue 1871 MDK. The CS calculation has been removed from the isumat option list, - # and only calculated if the CS properties are needed. + # Issue 1871 MDK. The CS calculation has been removed from the isumat option list, + # and only calculated if the CS properties are needed. if bv.iohcl != 0: - # CS coil current at EOF + # CS coil current at EOF ioheof = bv.hmax * pfv.ohhghf * bv.ohcth * 2.0 * pfv.coheof # CS coil current/copper area calculation for quench protection - rcv.copperaoh_m2 = ioheof / (pfv.awpoh * (1.0 - pfv.vfohc) * pfv.fcuohsu) + rcv.copperaoh_m2 = ioheof / ( + pfv.awpoh * (1.0 - pfv.vfohc) * pfv.fcuohsu + ) # Critical current density in winding pack jcritwp = jcritstr * (1.0e0 - fhe)