Skip to content

Commit cfb09ce

Browse files
committed
📖 Add guidelines for impedance naming conventions in style guide
1 parent a684d99 commit cfb09ce

File tree

4 files changed

+22
-17
lines changed

4 files changed

+22
-17
lines changed

documentation/development/standards.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -278,6 +278,12 @@ This should be used for units of $\text{kg} \cdot \text{m}^{-2}\text{s}^{-1}$
278278

279279
---------------------
280280

281+
##### Impedances
282+
283+
- Impedances should start with the `imp_` prefix
284+
285+
---------------------
286+
281287
##### Resistivity
282288

283289
- Resistivity variables should start with the `rho_` prefix

documentation/eng-models/power-requirements.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,10 +5,10 @@ The main power flow is controlled by `power.py`. The main class `Power` controls
55

66
### TF Coils
77

8-
Generall the newt power consumption of one magnet in $\text{VA}$ is given by:
8+
Generall the net power consumption of one magnet in $\text{VA}$ is given by:
99

1010
$$
11-
P_{\text{TF,electric}} = \left(R_{\text{TF,coil}}+R_{\text{joints}}+R_{\text{feeder}}\right) \times I_{\text{TF,coil}}^2
11+
P_{\text{TF,electric}} = \left(\Omega_{\text{TF,coil}}+\Omega_{\text{joints}}+\Omega_{\text{feeder}}\right) \times I_{\text{TF,coil}}^2
1212
\\ +\left(L_{\text{TF,coil-self}}+L_{\text{feeder}}\right)\frac{dI}{dt}
1313
$$
1414

process/power.py

Lines changed: 14 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -1781,7 +1781,7 @@ def tfpwr(self, output: bool):
17811781
v_tf_coil_dump_quench_kv=tfcoil_variables.v_tf_coil_dump_quench_kv,
17821782
e_tf_magnetic_stored_total_mj=superconducting_tf_coil_variables.e_tf_magnetic_stored_total
17831783
/ 1e6,
1784-
ind_tf_total=superconducting_tf_coil_variables.ind_tf_total,
1784+
ind_tf_total=tfcoil_variables.ind_tf_total,
17851785
ind_tf_coil=superconducting_tf_coil_variables.ind_tf_coil,
17861786
t_tf_charge=tfcoil_variables.t_tf_charge,
17871787
)
@@ -1961,34 +1961,34 @@ def superconducting_tf_power_iter_1988(
19611961
v_tf_bus = 1000.0e0 * c_tf_turn_ka * res_tf_bus
19621962

19631963
# Total resistance of the TF coils, ohms
1964-
rcoils = 0.0
1964+
res_tf_coils = 0.0
19651965

19661966
# Total impedance, ohms
1967-
ztotal = res_tf_bus + rcoils + ind_tf_total / t_tf_charge
1967+
imp_tf_total = res_tf_bus + res_tf_coils + ind_tf_total / t_tf_charge
19681968

19691969
# Charging voltage for the TF coils, volts
1970-
tfcv = 1000.0e0 * c_tf_turn_ka * ztotal
1970+
v_tf_charge = 1000.0e0 * c_tf_turn_ka * imp_tf_total
19711971

19721972
# Number of TF power modules
1973-
ntfpm = (c_tf_turn_ka * (1.0e0 + nsptfc)) / 5.0e0
1973+
n_tf_power_modules = (c_tf_turn_ka * (1.0e0 + nsptfc)) / 5.0e0
19741974

19751975
# TF coil power module voltage, volts
1976-
tfpmv = rtfps * tfcv / (1.0e0 + nsptfc)
1976+
v_tf_power_module = rtfps * v_tf_charge / (1.0e0 + nsptfc)
19771977

19781978
# TF coil power supply voltage, volts
1979-
tfpsv = rtfps * tfcv
1979+
tfpsv = rtfps * v_tf_charge
19801980

19811981
# Power supply current, kA
19821982
tfpska = rtfps * c_tf_turn_ka
19831983

19841984
# TF power module current, kA
1985-
tfpmka = rtfps * c_tf_turn_ka / (ntfpm / (1.0e0 + nsptfc))
1985+
tfpmka = rtfps * c_tf_turn_ka / (n_tf_power_modules / (1.0e0 + nsptfc))
19861986

19871987
# TF power module power, kW
1988-
tfpmkw = tfpmv * tfpmka
1988+
tfpmkw = v_tf_power_module * tfpmka
19891989

19901990
# Available DC power for charging the TF coils, kW
1991-
tfckw = tfpmkw * ntfpm
1991+
tfckw = tfpmkw * n_tf_power_modules
19921992

19931993
# Peak AC power needed to charge coils, kW
19941994
tfackw = tfckw / 0.9e0
@@ -2022,7 +2022,7 @@ def superconducting_tf_power_iter_1988(
20222022

20232023
# Building space:
20242024
# Power modules floor space, m2
2025-
part1 = fspc1 * ntfpm * tfpmkw**0.667e0
2025+
part1 = fspc1 * n_tf_power_modules * tfpmkw**0.667e0
20262026

20272027
# Circuit breakers floor space, m2
20282028
part2 = (
@@ -2091,14 +2091,14 @@ def superconducting_tf_power_iter_1988(
20912091
po.ovarre(
20922092
self.outfile,
20932093
"Total resistance of TF coils (ohm)",
2094-
"(rcoils)",
2095-
rcoils,
2094+
"(res_tf_coils)",
2095+
res_tf_coils,
20962096
"OP ",
20972097
)
20982098
# MDK Remove this as it leads to confusion between (a) total inductance/n_tf_coils, or (b)
20992099
# self-inductance of one single coil
21002100
# po.ovarre(outfile,'Inductance per TF coil (H)','(ind_tf_coil)',ind_tf_coil, 'OP ')
2101-
po.ovarre(self.outfile, "TF coil charging voltage (V)", "(tfcv)", tfcv)
2101+
po.ovarre(self.outfile, "TF coil charging voltage (V)", "(v_tf_charge)", v_tf_charge)
21022102
po.ovarre(
21032103
self.outfile,
21042104
"Number of DC circuit breakers",

tests/unit/test_tfcoil.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -714,7 +714,6 @@ class TfcindParam(NamedTuple):
714714
z_tf_arc=np.zeros(3),
715715
r_tf_arc=np.zeros(3),
716716
ind_tf_coil=0.0,
717-
expected_ind_tf_coil=6.26806810007207e-06,
718717
),
719718
),
720719
)

0 commit comments

Comments
 (0)