diff --git a/documentation/proc-pages/development/standards.md b/documentation/proc-pages/development/standards.md index c6021d706b..2468eafc18 100644 --- a/documentation/proc-pages/development/standards.md +++ b/documentation/proc-pages/development/standards.md @@ -4,7 +4,7 @@ -------------------- -## Line Length +##  Line Length For optimal readability, a limit of 79 characters for maximum line length has been encouraged, as recommended in [PEP8](https://peps.python.org/pep-0008/). This is below the maximum line length of 132 characters for Fortran (to prevent compilation errors) and prevents long lines that run on past the edge of the screen wasting programmers time with scrolling. @@ -13,7 +13,7 @@ For optimal readability, a limit of 79 characters for maximum line length has be ## Double declarations PROCESS uses the Fortran 2008+ intrinsic precision module as shown in the example below. The -use statement will need to be at the module level. See the +use statement will need to be at the module level. See the [fortran wiki](http://fortranwiki.org/fortran/show/Real+precision) for more information. ```fortran @@ -102,7 +102,6 @@ $$ This means the variable represents the fraction of the TF coil area taken up by the winding pack. - -------------- #### System designations @@ -118,10 +117,10 @@ Below are a few shorthand designations for different systems that should be used - Shield: `_shld_` - Central Solenoid: `_cs_` - Heating & Current Drive: `_hcd_` - - Electron cyclotron current drive: `_eccd_` - - Ion cyclotron current drive: `_iccd_` - - Electron Bernstein Wave: `_ebw_` - - Neutral Beam: `_nb_` + - Electron cyclotron current drive: `_eccd_` + - Ion cyclotron current drive: `_iccd_` + - Electron Bernstein Wave: `_ebw_` + - Neutral Beam: `_nb_` - Centre post: `_cp_` Should only be used for ST's If the variables are physics variables and do not belong to a system then: @@ -221,7 +220,6 @@ This should be used for units of $\text{kg} \cdot \text{m}^{-2}\text{s}^{-1}$ --------------------- - ##### Densities - Densities should start with the `den_` prefix @@ -348,6 +346,11 @@ The unit declaration `_fpy` can be used to specify that it is the full-power yea --------------------- +##### Stress + +- Stresses should start with the `s_` prefix followed by the type of stress, for example `s_shear_`. + +--------------------- ##### Variables representing fractions @@ -365,12 +368,13 @@ Variables used within constraint equations to scale iteration variables (f-value --------------------- -### Length +### Variable Length Try to keep names to a sensible length while also keeping the name explicit and descriptive. --------------------- + ### Physical Type The physical type of the variable should form the first part of the variable name, e.g. for plasma resistance the variable should be named: @@ -408,7 +412,7 @@ fusion_power_MW = 1000.0d0 With `f2py` you may encounter a Fortran error where the variable with units at the end in capital letters is not recognised. If so for the meantime put the units in their lowercase form. This problem will be solved in the future by full Pythonisation. ---------------------- +--------------------- ### Coordinates and dimensions @@ -471,7 +475,7 @@ ii | `a_plasma` | Plasma area | m2 | | `rad_div_target` | Divertor target angle | radians | | `deg_div_target` | Divertor target angle | deg | -| `sig_tf_r` | TF radial stress | Pa | +| `s_shear_tf` | TF shear stress | Pa | | `` | | | Please see issue [#940](https://github.com/ukaea/PROCESS/issues/940) to discuss new conventions. @@ -557,15 +561,14 @@ class ExampleClass: - Comments above apply to code below. - ## Code Documentation Using FORD -PROCESS uses FORD (FORtran Documentation) to automatically generate documentation from comments -in the FORTRAN code. FORD parses FORTRAN source to understand the structure of the project as well +PROCESS uses FORD (FORtran Documentation) to automatically generate documentation from comments +in the FORTRAN code. FORD parses FORTRAN source to understand the structure of the project as well as picking up "docmarked" comments in the source to create the documentation. -Regular Fortran comments are prefixed with a "!"; these are ignored by FORD and don't go into -the documentation. FORD comments are prefixed by a "!!", called a docmark; these are picked up +Regular Fortran comments are prefixed with a "!"; these are ignored by FORD and don't go into +the documentation. FORD comments are prefixed by a "!!", called a docmark; these are picked up by FORD and go into the documentation. The "!!" docmark goes after the statement it documents. For example, to document variables: @@ -582,6 +585,7 @@ real(kind(1.0D0)) :: alpha_rate_density = 0.0D0 ``` ...and to document modules: + ```fortran module global_variables !! Module containing miscellaneous global variables @@ -589,13 +593,13 @@ module global_variables !! well-suited to any of the other 'variables' modules. ``` -This documentation will appear in the -[FORD docs](http://process.gitpages.ccfe.ac.uk/process/ford_site/index.html) section in the -left-hand navigation bar. Within this site, the "Variables" section in the top navigation bar -provides variable descriptions in the same manner as the original "vardes" page. +This documentation will appear in the +[FORD docs](http://process.gitpages.ccfe.ac.uk/process/ford_site/index.html) section in the +left-hand navigation bar. Within this site, the "Variables" section in the top navigation bar +provides variable descriptions in the same manner as the original "vardes" page. -To document a statement before it occurs in the source, use "!>". However, it is encouraged to -use "!!" for consistency. The rationale behind this and further information is included on the +To document a statement before it occurs in the source, use "!>". However, it is encouraged to +use "!!" for consistency. The rationale behind this and further information is included on the [FORD wiki](https://github.com/Fortran-FOSS-Programmers/ford/wiki/Writing-Documentation). The FORD project on github can be found [here](https://github.com/Fortran-FOSS-Programmers/ford). diff --git a/process/io/obsolete_vars.py b/process/io/obsolete_vars.py index af3ae9fea3..4745d0e2b6 100644 --- a/process/io/obsolete_vars.py +++ b/process/io/obsolete_vars.py @@ -214,6 +214,10 @@ "tfwmatmax": "temp_fw_max", "fw_channel_length": "len_fw_channel", "denw": None, + "s_tresca_oh": "s_shear_cs_peak", + "sig_tf_tresca_max": "s_shear_tf_peak", + "s_tresca_cond_cear": "s_shear_cea_tf_cond", + "sig_tf_tresca": "s_shear_tf", "rjconpf": "j_pf_coil_wp_peak", "oh_steel_frac": "f_a_cs_steel", "vf": "f_a_pf_coil_void", diff --git a/process/io/plot_proc.py b/process/io/plot_proc.py index 085b14e1a2..098ae4d6ec 100644 --- a/process/io/plot_proc.py +++ b/process/io/plot_proc.py @@ -2625,11 +2625,11 @@ def plot_magnetics_info(axis, mfile_data, scan): "vs_plasma_ind_ramp" ].get_scan(scan) - sig_case = 1.0e-6 * mfile_data.data[f"sig_tf_tresca_max({i_tf_bucking})"].get_scan( + sig_case = 1.0e-6 * mfile_data.data[f"s_shear_tf_peak({i_tf_bucking})"].get_scan( scan ) sig_cond = 1.0e-6 * mfile_data.data[ - f"sig_tf_tresca_max({i_tf_bucking + 1})" + f"s_shear_tf_peak({i_tf_bucking + 1})" ].get_scan(scan) if i_tf_sup == 1: diff --git a/process/pfcoil.py b/process/pfcoil.py index 1f6e676135..4a91b843a9 100644 --- a/process/pfcoil.py +++ b/process/pfcoil.py @@ -1216,13 +1216,13 @@ def ohcalc(self): areaspf = pfv.f_a_cs_steel * pfv.a_cs_poloidal if pfv.i_cs_stress == 1: - pfv.s_tresca_oh = max( + pfv.s_shear_cs_peak = max( abs(pf.sig_hoop - pf.sig_axial), abs(pf.sig_axial - 0.0e0), abs(0.0e0 - pf.sig_hoop), ) else: - pfv.s_tresca_oh = max( + pfv.s_shear_cs_peak = max( abs(pf.sig_hoop - 0.0e0), abs(0.0e0 - 0.0e0), abs(0.0e0 - pf.sig_hoop), @@ -2245,8 +2245,8 @@ def outpf(self): op.ovarre( self.outfile, "Maximum shear stress in CS steel for the Tresca criterion (Pa)", - "(s_tresca_oh)", - pfv.s_tresca_oh, + "(s_shear_cs_peak)", + pfv.s_shear_cs_peak, "OP ", ) op.ovarre( diff --git a/process/sctfcoil.py b/process/sctfcoil.py index ede2f40984..22d59c9483 100644 --- a/process/sctfcoil.py +++ b/process/sctfcoil.py @@ -1228,7 +1228,7 @@ def sctfcoil(self, output: bool): sig_tf_t_max, sig_tf_z_max, sig_tf_vmises_max, - sig_tf_tresca_max, + s_shear_tf_peak, deflect, eyoung_axial, eyoung_trans, @@ -1236,14 +1236,14 @@ def sctfcoil(self, output: bool): eyoung_wp_trans, poisson_wp_trans, radial_array, - s_tresca_cond_cea, + s_shear_cea_tf_cond, poisson_wp_axial, sig_tf_r, sig_tf_smeared_r, sig_tf_smeared_t, sig_tf_smeared_z, sig_tf_t, - sig_tf_tresca, + s_shear_tf, sig_tf_vmises, sig_tf_z, str_tf_r, @@ -1362,7 +1362,7 @@ def sctfcoil(self, output: bool): sig_tf_t_max, sig_tf_z_max, sig_tf_vmises_max, - sig_tf_tresca_max, + s_shear_tf_peak, deflect, eyoung_axial, eyoung_trans, @@ -1370,14 +1370,14 @@ def sctfcoil(self, output: bool): eyoung_wp_trans, poisson_wp_trans, radial_array, - s_tresca_cond_cea, + s_shear_cea_tf_cond, poisson_wp_axial, sig_tf_r, sig_tf_smeared_r, sig_tf_smeared_t, sig_tf_smeared_z, sig_tf_t, - sig_tf_tresca, + s_shear_tf, sig_tf_vmises, sig_tf_z, str_tf_r, @@ -3711,7 +3711,7 @@ def stresscl( sig_tf_vmises_max = np.zeros((n_tf_layer,)) # Von-Mises stress of the point of maximum shear stress of each layer [Pa] - sig_tf_tresca_max = np.zeros((n_tf_layer,)) + s_shear_tf_peak = np.zeros((n_tf_layer,)) # Maximum shear stress, for the Tresca yield criterion of each layer [Pa] # If the CEA correction is addopted, the CEA corrected value is used @@ -4331,7 +4331,7 @@ def stresscl( # Tresca / Von Mises yield criteria calculations # ----------------------------- # Array equation - sig_tf_tresca = np.maximum( + s_shear_tf = np.maximum( np.absolute(sig_tf_r - sig_tf_z), np.absolute(sig_tf_z - sig_tf_t) ) @@ -4347,7 +4347,7 @@ def stresscl( ) # Array equation - s_tresca_cond_cea = sig_tf_tresca.copy() + s_shear_cea_tf_cond = s_shear_tf.copy() # SC conducting layer stress distribution corrections # --- @@ -4365,7 +4365,7 @@ def stresscl( sig_tf_vmises[ii] = max(svmxz, svmyz) # Maximum shear stress for the Tresca yield criterion using CEA calculation [Pa] - s_tresca_cond_cea[ii] = ( + s_shear_cea_tf_cond[ii] = ( 1.02e0 * abs(sig_tf_r[ii]) + 1.6e0 * sig_tf_z[ii] ) @@ -4381,14 +4381,14 @@ def stresscl( for jj in range(ii * n_radial_array, (ii + 1) * n_radial_array): # CEA out of plane approximation if i_tf_tresca == 1 and i_tf_sup == 1 and ii >= i_tf_bucking + 1: - if sig_max < s_tresca_cond_cea[jj]: - sig_max = s_tresca_cond_cea[jj] + if sig_max < s_shear_cea_tf_cond[jj]: + sig_max = s_shear_cea_tf_cond[jj] ii_max = jj # Conventional Tresca else: - if sig_max < sig_tf_tresca[jj]: - sig_max = sig_tf_tresca[jj] + if sig_max < s_shear_tf[jj]: + sig_max = s_shear_tf[jj] ii_max = jj # OUT.DAT output @@ -4401,19 +4401,19 @@ def stresscl( # Maximum shear stress for the Tresca yield criterion (or CEA OOP correction) if i_tf_tresca == 1 and i_tf_sup == 1 and ii >= i_tf_bucking + 1: - sig_tf_tresca_max[ii] = s_tresca_cond_cea[ii_max] + s_shear_tf_peak[ii] = s_shear_cea_tf_cond[ii_max] else: - sig_tf_tresca_max[ii] = sig_tf_tresca[ii_max] + s_shear_tf_peak[ii] = s_shear_tf[ii_max] # Constraint equation for the Tresca yield criterion - sig_tf_wp = sig_tf_tresca_max[n_tf_bucking] + sig_tf_wp = s_shear_tf_peak[n_tf_bucking] # Maximum assumed in the first graded layer if i_tf_bucking >= 1: - sig_tf_case = sig_tf_tresca_max[n_tf_bucking - 1] + sig_tf_case = s_shear_tf_peak[n_tf_bucking - 1] if i_tf_bucking >= 2: - sig_tf_cs_bucked = sig_tf_tresca_max[0] + sig_tf_cs_bucked = s_shear_tf_peak[0] # ---------------- return ( @@ -4421,7 +4421,7 @@ def stresscl( sig_tf_t_max, sig_tf_z_max, sig_tf_vmises_max, - sig_tf_tresca_max, + s_shear_tf_peak, deflect, eyoung_axial, eyoung_trans, @@ -4429,14 +4429,14 @@ def stresscl( eyoung_wp_trans, poisson_wp_trans, radial_array, - s_tresca_cond_cea, + s_shear_cea_tf_cond, poisson_wp_axial, sig_tf_r, sig_tf_smeared_r, sig_tf_smeared_t, sig_tf_smeared_z, sig_tf_t, - sig_tf_tresca, + s_shear_tf, sig_tf_vmises, sig_tf_z, str_tf_r, @@ -5843,7 +5843,7 @@ def out_stress( sig_tf_t_max, sig_tf_z_max, sig_tf_vmises_max, - sig_tf_tresca_max, + s_shear_tf_peak, deflect, eyoung_axial, eyoung_trans, @@ -5851,14 +5851,14 @@ def out_stress( eyoung_wp_trans, poisson_wp_trans, radial_array, - s_tresca_cond_cea, + s_shear_cea_tf_cond, poisson_wp_axial, sig_tf_r, sig_tf_smeared_r, sig_tf_smeared_t, sig_tf_smeared_z, sig_tf_t, - sig_tf_tresca, + s_shear_tf, sig_tf_vmises, sig_tf_z, str_tf_r, @@ -5984,12 +5984,12 @@ def table_format_arrays(a, mult=1, delim="\t\t"): if tfcoil_variables.i_tf_tresca == 1 and tfcoil_variables.i_tf_sup == 1: po.write( self.outfile, - f" Shear (CEA Tresca) \t\t\t (MPa) \t\t {table_format_arrays(sig_tf_tresca_max, 1e-6)}", + f" Shear (CEA Tresca) \t\t\t (MPa) \t\t {table_format_arrays(s_shear_tf_peak, 1e-6)}", ) else: po.write( self.outfile, - f" Shear (Tresca) \t\t\t (MPa) \t\t {table_format_arrays(sig_tf_tresca_max, 1e-6)}", + f" Shear (Tresca) \t\t\t (MPa) \t\t {table_format_arrays(s_shear_tf_peak, 1e-6)}", ) po.write(self.outfile, "") @@ -6061,15 +6061,15 @@ def table_format_arrays(a, mult=1, delim="\t\t"): po.ovarre( constants.mfile, f"Maximum shear stress for CEA Tresca yield criterion {ii + 1} (Pa)", - f"(sig_tf_tresca_max({ii + 1}))", - sig_tf_tresca_max[ii], + f"(s_shear_tf_peak({ii + 1}))", + s_shear_tf_peak[ii], ) else: po.ovarre( constants.mfile, f"Maximum shear stress for the Tresca yield criterion {ii + 1} (Pa)", - f"(sig_tf_tresca_max({ii + 1}))", - sig_tf_tresca_max[ii], + f"(s_shear_tf_peak({ii + 1}))", + s_shear_tf_peak[ii], ) # SIG_TF.json storage @@ -6084,9 +6084,9 @@ def table_format_arrays(a, mult=1, delim="\t\t"): "Vertical smear stress (MPa)": sig_tf_smeared_z * 1e-6, "Von-Mises stress (MPa)": sig_tf_vmises * 1e-6, "CEA Tresca stress (MPa)": ( - s_tresca_cond_cea * 1e-6 + s_shear_cea_tf_cond * 1e-6 if tfcoil_variables.i_tf_sup == 1 - else sig_tf_tresca * 1e-6 + else s_shear_tf * 1e-6 ), "rad. displacement (mm)": deflect * 1e3, } diff --git a/source/fortran/constraint_equations.f90 b/source/fortran/constraint_equations.f90 index a473ae3f0d..e4759fa7f1 100755 --- a/source/fortran/constraint_equations.f90 +++ b/source/fortran/constraint_equations.f90 @@ -2755,12 +2755,12 @@ subroutine constraint_eqn_072(tmp_cc, tmp_con, tmp_err, tmp_symbol, tmp_units) !! Logic change during pre-factoring: err, symbol, units will be assigned only if present. !! foh_stress : input real : f-value for Tresca yield criterion in Central Solenoid !! alstroh : input real : allowable hoop stress in Central Solenoid structural material (Pa) - !! s_tresca_oh : input real : Maximum shear stress coils/central solenoid (Pa) + !! s_shear_cs_peak : input real : Maximum shear stress coils/central solenoid (Pa) !! sig_tf_cs_bucked : input real : Maximum shear stress in CS case at flux swing (no current in CS) !! can be significant for the bucked and weged design !! i_tf_bucking : input integer : switch for TF structure design use constraint_variables, only: foh_stress - use pfcoil_variables, only: alstroh, s_tresca_oh + use pfcoil_variables, only: alstroh, s_shear_cs_peak use tfcoil_variables, only: sig_tf_cs_bucked, i_tf_bucking use build_variables, only: tf_in_cs implicit none @@ -2772,12 +2772,12 @@ subroutine constraint_eqn_072(tmp_cc, tmp_con, tmp_err, tmp_symbol, tmp_units) ! bucked and wedged desing (see subroutine comment) if ( i_tf_bucking >= 2 .and. tf_in_cs == 0 ) then - tmp_cc = 1.0d0 - foh_stress * alstroh / max(s_tresca_oh, sig_tf_cs_bucked) - tmp_err = alstroh - max(s_tresca_oh, sig_tf_cs_bucked) + tmp_cc = 1.0d0 - foh_stress * alstroh / max(s_shear_cs_peak, sig_tf_cs_bucked) + tmp_err = alstroh - max(s_shear_cs_peak, sig_tf_cs_bucked) ! Free standing CS else - tmp_cc = 1.0d0 - foh_stress * alstroh / s_tresca_oh - tmp_err = alstroh - s_tresca_oh + tmp_cc = 1.0d0 - foh_stress * alstroh / s_shear_cs_peak + tmp_err = alstroh - s_shear_cs_peak end if tmp_con = alstroh diff --git a/source/fortran/pfcoil_variables.f90 b/source/fortran/pfcoil_variables.f90 index 01312fc6e1..4847cdd7e6 100644 --- a/source/fortran/pfcoil_variables.f90 +++ b/source/fortran/pfcoil_variables.f90 @@ -298,7 +298,7 @@ module pfcoil_variables !! the coil in units of minor radii from the major radius !! (r = rmajor + rref*rminor) - real(dp) :: s_tresca_oh + real(dp) :: s_shear_cs_peak !! Maximum shear stress (Tresca criterion) coils/central solenoid [MPa] real(dp) :: sigpfcalw @@ -489,7 +489,7 @@ subroutine init_pfcoil_variables rpf2 = -1.63D0 rref = (/7.0D0, 7.0D0, 7.0D0, & 7.0D0, 7.0D0, 7.0D0, 7.0D0, 7.0D0, 7.0D0, 7.0D0/) - s_tresca_oh = 0.0D0 + s_shear_cs_peak = 0.0D0 sigpfcalw = 500.0D0 sigpfcf = 1.0D0 ind_pf_cs_plasma_mutual = 0.0D0 diff --git a/source/fortran/tfcoil_variables.f90 b/source/fortran/tfcoil_variables.f90 index bd967508ab..26bb0e5969 100644 --- a/source/fortran/tfcoil_variables.f90 +++ b/source/fortran/tfcoil_variables.f90 @@ -421,7 +421,7 @@ module tfcoil_variables real(dp), dimension(2*n_radial_array) :: sig_tf_vmises !! TF Inboard leg Von-Mises stress in steel r distribution at mid-plane [Pa] - real(dp), dimension(2*n_radial_array) :: sig_tf_tresca + real(dp), dimension(2*n_radial_array) :: s_shear_tf !! TF Inboard leg maximum shear stress (Tresca criterion) in steel r distribution at mid-plane [Pa] real(dp) :: sig_tf_cs_bucked @@ -941,7 +941,7 @@ subroutine init_tfcoil_variables deflect = 0.0D0 sig_tf_z = 0.0D0 sig_tf_vmises = 0.0D0 - sig_tf_tresca = 0.0D0 + s_shear_tf = 0.0D0 sig_tf_cs_bucked = 0.0D0 sig_tf_case = 0.0D0 sig_tf_wp = 0.0D0 diff --git a/tests/integration/ref_dicts.json b/tests/integration/ref_dicts.json index d75d109281..e8d1fb3b72 100644 --- a/tests/integration/ref_dicts.json +++ b/tests/integration/ref_dicts.json @@ -4897,7 +4897,7 @@ "'not used'", "'not used'" ], - "s_tresca_oh": 0.0, + "s_shear_cs_peak": 0.0, "a_plasma_surface": 0.0, "a_plasma_surface_outboard": 0.0, "scafc": [ @@ -5327,7 +5327,7 @@ "sig_tf_cs_bucked": 0.0, "sig_tf_r": 0.0, "sig_tf_t": 0.0, - "sig_tf_tresca": 0.0, + "s_shear_tf": 0.0, "sig_tf_vmises": 0.0, "sig_tf_wp": 0.0, "sig_tf_wp_max": 600000000.0, @@ -10587,7 +10587,7 @@ "s_k": "", "s_kref": "", "s_label": "", - "s_tresca_oh": "Maximum shear stress (Tresca criterion) coils/central solenoid [MPa]", + "s_shear_cs_peak": "Maximum shear stress (Tresca criterion) coils/central solenoid [MPa]", "a_plasma_surface": "plasma surface area", "a_plasma_surface_outboard": "outboard plasma surface area", "scafc": "", @@ -10633,7 +10633,7 @@ "sig_tf_cs_bucked": "Maximum shear stress (Tresca criterion) in CS structures at CS flux swing [Pa]:\n\nQuantity only computed for bucked and wedged design (`i_tf_bucking >= 2`)\n Def : CS Flux swing, instant when the current changes sign in CS (null current)", "sig_tf_r": "TF Inboard leg radial stress in steel r distribution at mid-plane [Pa]", "sig_tf_t": "TF Inboard leg tangential stress in steel r distribution at mid-plane [Pa]", - "sig_tf_tresca": "TF Inboard leg maximum shear stress (Tresca criterion) in steel r distribution at mid-plane [Pa]", + "s_shear_tf": "TF Inboard leg maximum shear stress (Tresca criterion) in steel r distribution at mid-plane [Pa]", "sig_tf_vmises": "TF Inboard leg Von-Mises stress in steel r distribution at mid-plane [Pa]", "sig_tf_wp": "", "sig_tf_wp_max": "Allowable maximum shear stress (Tresca criterion) in TF coil conduit (Pa)\nAllowable Tresca stress in TF coil structural material (Pa)", @@ -18986,7 +18986,7 @@ "rpf1", "rpf2", "rref", - "s_tresca_oh", + "s_shear_cs_peak", "sigpfcalw", "sigpfcf", "ind_pf_cs_plasma_mutual", @@ -19152,7 +19152,6 @@ "iwalld", "kappa", "kappa95", - "kappa_ipb", "ne0", "ni0", @@ -19603,7 +19602,7 @@ "deflect", "sig_tf_z", "sig_tf_vmises", - "sig_tf_tresca", + "s_shear_tf", "sig_tf_cs_bucked", "sig_tf_case", "sig_tf_wp", diff --git a/tests/integration/test_pfcoil_int.py b/tests/integration/test_pfcoil_int.py index 80bbc9a58f..fe023c6e97 100644 --- a/tests/integration/test_pfcoil_int.py +++ b/tests/integration/test_pfcoil_int.py @@ -206,7 +206,7 @@ def test_ohcalc(monkeypatch, reinitialise_error_module, pfcoil): monkeypatch.setattr(pfv, "jcableoh_eof", 1.427e8) monkeypatch.setattr(pfv, "p_cs_resistive_flat_top", 0.0) monkeypatch.setattr(pfv, "j_cs_critical_pulse_start", 3.048e7) - monkeypatch.setattr(pfv, "s_tresca_oh", 5.718e8) + monkeypatch.setattr(pfv, "s_shear_cs_peak", 5.718e8) monkeypatch.setattr(pfv, "awpoh", 4.232) monkeypatch.setattr(pfv, "f_a_cs_steel", 5.926e-1) monkeypatch.setattr(pfv, "b_cs_peak_pulse_start", 1.4e1)