Skip to content

Commit

Permalink
👽️ More variable name changes
Browse files Browse the repository at this point in the history
  • Loading branch information
je-cook committed Dec 6, 2024
1 parent 57e4446 commit d6bd312
Show file tree
Hide file tree
Showing 13 changed files with 83 additions and 95 deletions.
16 changes: 8 additions & 8 deletions bluemira/codes/process/_inputs.py
Original file line number Diff line number Diff line change
Expand Up @@ -48,12 +48,12 @@ class ProcessInputs:
# Top down of PROCESS variables list

# Times
tburn: float | None = None
tdwell: float | None = None
t_burn: float | None = None
t_between_pulse: float | None = None
t_fusion_ramp: float | None = None
tohs: float | None = None
tqnch: float | None = None
tramp: float | None = None
t_current_ramp_up: float | None = None
t_ramp_down: float | None = None
t_precharge: float | None = None

# FWBS
ibkt_life: int | None = None
Expand Down Expand Up @@ -391,11 +391,11 @@ class ProcessInputs:
fstr_wp: float | None = None
fmaxvvstress: float | None = None
ftbr: float | None = None
ftburn: float | None = None
ft_burn: float | None = None
ftcycl: float | None = None
ftmargoh: float | None = None
ftmargtf: float | None = None
ftohs: float | None = None
ft_current_ramp_up: float | None = None
ftpeak: float | None = None
fvdump: float | None = None
fvs: float | None = None
Expand All @@ -415,7 +415,7 @@ class ProcessInputs:
pseprmax: float | None = None
ptfnucmax: float | None = None
tbrmin: float | None = None
tbrnmn: float | None = None
t_burn_min: float | None = None
vvhealw: float | None = None
walalw: float | None = None
taulimit: float | None = None
Expand Down
10 changes: 5 additions & 5 deletions bluemira/codes/process/equation_variable_mapping.py
Original file line number Diff line number Diff line change
Expand Up @@ -351,7 +351,7 @@ class Constraint(ConstraintSelection, Model):
PF_ENERGY_RATE_UPPER_LIMIT = (
66,
(65, 113),
("tohs",),
("t_current_ramp_up",),
"Limit on rate of change of energy in poloidal field",
)
WALL_RADIATION_UPPER_LIMIT = (
Expand Down Expand Up @@ -562,11 +562,11 @@ class Constraint(ConstraintSelection, Model):
"fwalld": 14,
"fvs": 15,
"ohcth": 16,
"tdwell": 17,
"t_between_pulse": 17,
"q": 18,
"beam_energy": 19,
"tcpav": 20,
"ftburn": 21,
"ft_burn": 21,
# 22 NOT USED
"fcoolcp": 23,
# 24 NOT USED
Expand Down Expand Up @@ -610,8 +610,8 @@ class Constraint(ConstraintSelection, Model):
"fdtmp": 62,
"ftpeak": 63,
"fauxmn": 64,
"tohs": 65,
"ftohs": 66,
"t_current_ramp_up": 65,
"ft_current_ramp_up": 66,
"ftcycl": 67,
"fptemp": 68,
"rcool": 69,
Expand Down
2 changes: 1 addition & 1 deletion bluemira/codes/process/mapping.py
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,7 @@

IO_mappings = {
"A": ("aspect", "dimensionless"),
"tau_flattop": (("tbrnmn", "tburn"), "s"),
"tau_flattop": (("t_burn_min", "t_burn"), "s"),
"P_el_net": (("pnetelin", "pnetelmw"), "MW"),
"tk_bb_ib": ("blnkith", "m"),
"tk_bb_ob": ("blnkoth", "m"),
Expand Down
16 changes: 9 additions & 7 deletions data/reactors/EU-DEMO/systems_code/IN.DAT
Original file line number Diff line number Diff line change
Expand Up @@ -110,9 +110,11 @@ shldoth = 0.3 * outboard shield thickness (m) (`iteration variable 94`)
shldtth = 0.3 * upper/lower shield thickness (m); calculated if `blktmodel > 0` (= shldlth if double-null)
tfcth = 1.0500e+00 * inboard TF coil thickness; (centrepost for ST) (m)
tftsgap = 0.05 * Minimum metal-to-metal gap between TF coil and thermal shield (m)
thshield = 0.05 * TF-VV thermal shield thickness (m)
vgap2 = 0.12, * vertical gap between vacuum vessel and thermal shields (m)
vgap = 1.60, * vertical gap between x-point and divertor (m) (if = 0; it is calculated)
thshield_ib = 0.05 * TF-VV thermal shield thickness (m)
thshield_ob = 0.05 * TF-VV thermal shield thickness (m)
thshield_vb = 0.05 * TF-VV thermal shield thickness (m)
vgap_vv_thermalshield = 0.12, * vertical gap between vacuum vessel and thermal shields (m)
vgap_xpoint_divertor = 1.60, * vertical gap between x-point and divertor (m) (if = 0; it is calculated)
vvblgap = 0.02 * gap between vacuum vessel and blanket (m)

*-----------------Buildings Module-----------------*
Expand Down Expand Up @@ -147,7 +149,7 @@ fpinj = 1.0, * f-value for injection power (`constraint equation 30`; `iterat
fpnetel = 1.0, * f-value for net electric power (`constraint equation 16`; `iteration variable 25`)
fstrcase = 1.0000e+00 * f-value for maximum TF coil case TRESCA stress
fstrcond = 8.6890e-01 * f-value for maxiumum TF coil conduit TRESCA stress
ftburn = 1.00e+00 * f-value for minimum burn time (`constraint equation 13`; `iteration variable 21`)
ft_burn = 1.00e+00 * f-value for minimum burn time (`constraint equation 13`; `iteration variable 21`)
fvdump = 6.1211e-01 * f-value for dump voltage (`constraint equation 34`; `iteration variable 51`)
fwalld = 1.3024e-01 * f-value for maximum wall load (`constraint equation 8`; `iteration variable 14`)
pnetelin = 500 * required net electric power (MW) (`constraint equation 16`)
Expand Down Expand Up @@ -411,7 +413,7 @@ gamma = 0.3 * Ejima coefficient for resistive startup V-s formula
hfact = 1.1000e+00 * H factor on energy confinement times; radiation corrected (`iteration variable 10`); If
ibss = 4, * switch for bootstrap current scaling
iculbl = 1, * switch for beta limit scaling (`constraint equation 24`)
icurr = 4, * switch for plasma current scaling to use
i_plasma_current = 4, * switch for plasma current scaling to use
idensl = 7, * switch for density limit to enforce (`constraint equation 5`)
ifalphap = 1, * switch for fast alpha pressure calculation
ifispact = 0, * switch for neutronics calculations;
Expand All @@ -422,7 +424,7 @@ nesep = 0.2e20 * electron density at separatrix [m-3] (`ipedestal=1;2; calcul
rhopedn = 0.94 * r/a of density pedestal (`ipedestal>=1`)
rhopedt = 0.94 * r/a of temperature pedestal (`ipedestal>=1`)
tbeta = 2.0 * temperature profile index beta (`ipedestal=1;2`)
teped = 5.5 * electron temperature of pedestal (keV) (`ipedestal>=1; ieped=0; calculated for ieped=1`)
teped = 5.5 * electron temperature of pedestal (keV) (`ipedestal>=1`)
tesep = 0.1 * electron temperature at separatrix (keV) (`ipedestal>=1`) calculated if reinke
iprofile = 1 * switch for current profile consistency;
isc = 34, * switch for energy confinement time scaling law (see description in `tauscl`)
Expand Down Expand Up @@ -543,7 +545,7 @@ vftf = 0.33, * coolant fraction of TFC 'cable' (`i_tf_sup=1`); or of TFC leg

*-----------------Times Variables------------------*

tburn = 1.0d4, * burn time (s) (calculated if `lpulse=1`)
t_burn = 1.0d4, * burn time (s) (calculated if `lpulse=1`)

*---------------Torga Curgap Module----------------*

Expand Down
4 changes: 2 additions & 2 deletions data/reactors/EU-DEMO/systems_code/MFILE.DAT
Original file line number Diff line number Diff line change
Expand Up @@ -1334,7 +1334,7 @@ fpinj = 1.0, * f-value for injection power (`constraint equation 30`; `iterat
fpnetel = 1.0, * f-value for net electric power (`constraint equation 16`; `iteration variable 25`)
fstrcase = 1.0000e+00 * f-value for maximum TF coil case TRESCA stress
fstrcond = 8.6890e-01 * f-value for maxiumum TF coil conduit TRESCA stress
ftburn = 1.00e+00 * f-value for minimum burn time (`constraint equation 13`; `iteration variable 21`)
ft_burn = 1.00e+00 * f-value for minimum burn time (`constraint equation 13`; `iteration variable 21`)
fvdump = 6.1211e-01 * f-value for dump voltage (`constraint equation 34`; `iteration variable 51`)
fwalld = 1.3024e-01 * f-value for maximum wall load (`constraint equation 8`; `iteration variable 14`)
pnetelin = 500 * required net electric power (MW) (`constraint equation 16`)
Expand Down Expand Up @@ -1732,7 +1732,7 @@ vftf = 0.33, * coolant fraction of TFC 'cable' (`i_tf_sup=1`); or of TFC leg

*-----------------Times Variables------------------*

tburn = 1.0d4, * burn time (s) (calculated if `lpulse=1`)
t_burn = 1.0d4, * burn time (s) (calculated if `lpulse=1`)

*---------------Torga Curgap Module----------------*

Expand Down
10 changes: 5 additions & 5 deletions eudemo/eudemo/radial_build.py
Original file line number Diff line number Diff line change
Expand Up @@ -115,7 +115,7 @@
template_builder.adjust_variable("fne0", 0.6, upper_bound=0.95)
template_builder.adjust_variable("fdene", 1.2, upper_bound=1.2)
template_builder.adjust_variable("flhthresh", 1.2, lower_bound=1.1, upper_bound=1.2)
template_builder.adjust_variable("ftburn", 1.0, upper_bound=1.0)
template_builder.adjust_variable("ft_burn", 1.0, upper_bound=1.0)

# Modifying the initial variable vector to improve convergence
template_builder.adjust_variable("fpnetel", 1.0)
Expand Down Expand Up @@ -205,7 +205,7 @@
"coreradiationfraction": 0.6,
# Important stuff
"pnetelin": 500.0,
"tbrnmn": 7.2e3,
"t_burn_min": 7.2e3,
"sig_tf_case_max": 5.8e8,
"sig_tf_wp_max": 5.8e8,
"alstroh": 6.6e8,
Expand All @@ -229,7 +229,7 @@
"ddwex": 0.15,
"gapomin": 0.2,
# Vertical build inputs
"vgap2": 0.05,
"vgap_vv_thermalshield": 0.05,
"divfix": 0.621,
# HCD inputs
"pinjalw": 51.0,
Expand All @@ -241,8 +241,8 @@
"etahtp": 0.87,
"etaiso": 0.9,
"vfshld": 0.6,
"tdwell": 0.0,
"tramp": 500.0,
"t_between_pulse": 0.0,
"t_precharge": 500.0,
# CS / PF coil inputs
"fcuohsu": 0.7,
"ohhghf": 0.9,
Expand Down
10 changes: 5 additions & 5 deletions eudemo/eudemo_tests/template.json
Original file line number Diff line number Diff line change
Expand Up @@ -368,7 +368,7 @@
"source": "Input",
"mapping": {
"PROCESS": {
"name": "pcoreradmw",
"name": "pinnerzoneradmw",
"send": false,
"recv": true,
"unit": "MW"
Expand All @@ -382,7 +382,7 @@
"source": "Input",
"mapping": {
"PROCESS": {
"name": "pedgeradmw",
"name": "pouterzoneradmw",
"send": false,
"recv": true,
"unit": "MW"
Expand Down Expand Up @@ -941,7 +941,7 @@
"source": "Input",
"mapping": {
"PROCESS": {
"name": "bootipf",
"name": "bootstrap_current_fraction",
"send": false,
"recv": true,
"unit": "dimensionless"
Expand Down Expand Up @@ -1858,7 +1858,7 @@
"source": "Input",
"mapping": {
"PROCESS": {
"name": "tburn",
"name": "t_burn",
"send": false,
"recv": false,
"unit": "s"
Expand Down Expand Up @@ -2403,7 +2403,7 @@
"source": "Input",
"mapping": {
"PROCESS": {
"name": "thshield",
"name": "thshield_ib",
"send": true,
"recv": true,
"unit": "m"
Expand Down
8 changes: 4 additions & 4 deletions examples/codes/run_process_example.ex.py
Original file line number Diff line number Diff line change
Expand Up @@ -209,7 +209,7 @@
"coreradiationfraction": 0.6,
# Important stuff
"pnetelin": 500.0,
"tbrnmn": 7.2e3,
"t_burn_min": 7.2e3,
"sig_tf_case_max": 5.8e8,
"sig_tf_wp_max": 5.8e8,
"alstroh": 6.6e8,
Expand Down Expand Up @@ -238,7 +238,7 @@
"gapomin": 0.2,
# Vertical build inputs
"d_vv_top": 0.3,
"vgap2": 0.05,
"vgap_vv_thermalshield": 0.05,
"shldtth": 0.3,
"divfix": 0.621,
"d_vv_bot": 0.3,
Expand All @@ -252,8 +252,8 @@
"etahtp": 0.87,
"etaiso": 0.9,
"vfshld": 0.6,
"tdwell": 0.0,
"tramp": 500.0,
"t_between_pulse": 0.0,
"t_precharge": 500.0,
# CS / PF coil inputs
"t_crack_vertical": 0.4e-3,
"fcuohsu": 0.7,
Expand Down
16 changes: 8 additions & 8 deletions examples/data/codes/process/ST_IN.DAT
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@ boundu(60) = 9.0d4
ixc = 61 * gapds
boundl(61) = 0.12
ixc = 63 * ftpeak (f-value for equation 39)
ixc = 65 * tohs
ixc = 65 * t_current_ramp_up
boundu(65) = 1000
ixc = 103 * flhthresh
ixc = 109 * ralpne
Expand All @@ -103,8 +103,8 @@ shldith = 0.30 * Inboard shield thickness (m)
shldoth = 0.80 * Outboard shield thickness (m)
shldtth = 0.30 * Upper/lower shield thickness (m);
tfcth = 1.0500e+00 * Inboard tf coil thickness; (centrepost for st) (m)
vgap2 = 0.061 * Vertical gap between vacuum vessel and tf coil (m)
vgap = 1.60 * Vertical gap between x-point and divertor (m)
vgap_vv_thermalshield = 0.061 * Vertical gap between vacuum vessel and tf coil (m)
vgap_xpoint_divertor = 1.60 * Vertical gap between x-point and divertor (m)
tftsgap = 0.02
thshield = 0.05
vvblgap = 0.02
Expand All @@ -125,12 +125,12 @@ fpinj = 1.0 * F-value for injection power
fpnetel = 1.0 * F-value for net electric power
fstrcase = 1.0000e+00 * F-value for tf coil case stress
fstrcond = 8.6890e-01 * F-value for tf coil conduit stress
ftburn = 1.00e+00 * F-value for minimum burn time
ft_burn = 1.00e+00 * F-value for minimum burn time
fvdump = 1.0 * F-value for dump voltage
fwalld = 1.3024e-01 * F-value for maximum wall load
pnetelin = 500.0 * Required net electric power (mw)
pseprmax = 17.0 * Maximum ratio of power crossing the separatrix to
tbrnmn = 7.2e3 * Minimum burn time (s)
t_burn_min = 7.2e3 * Minimum burn time (s)

walalw = 8.0 * Allowable wall-load (mw/m2)
*------------------Cost Variables------------------*
Expand Down Expand Up @@ -206,7 +206,7 @@ rpf2 = -1.825 * Offset (m) of radial position of ipfloc=2 pf coils

maxpoloidalpower = 250
fpoloidalpower = 1.00
tohs = 80 *
t_current_ramp_up = 80 *

zref(1) = 3.6
zref(2) = 1.2
Expand All @@ -231,7 +231,7 @@ gamma = 0.3 * Ejima coefficient for resistive startup v-s formula
hfact = 1.1000e+00 * H factor on energy confinement times (iteration variable 10)
ibss = 4 * Switch for bootstrap current scaling;
iculbl = 1 * Switch for beta limit scaling (constraint equation 24);
icurr = 4 * Switch for plasma current scaling to use;
i_plasma_current = 4 * Switch for plasma current scaling to use;
idia = 2 *switch for diamagnetic current scaling (2: SCENE scaling)
idensl = 7 * Switch for density limit to enforce (constraint equation 5);
ifalphap = 1 * Switch for fast alpha pressure calculation;
Expand Down Expand Up @@ -285,6 +285,6 @@ tmargmin = 1.7 * Minimum allowable temperature margin (cs and tf coils) (k)
vdalw = 30.0 * Max voltage across tf coil during quench (kv)
vftf = 0.33 * Coolant fraction of tfc 'cable' (itfsup=1); or of tfc leg (itfsup=0)
*-----------------Times Variables------------------*
tburn = 1000.0 * Burn time (s) (calculated if lpulse=1)
t_burn = 1000.0 * Burn time (s) (calculated if lpulse=1)
*-----------------Vacuum Variables-----------------*
output_costs = 0
6 changes: 3 additions & 3 deletions tests/codes/process/test_data/IN.DAT
Original file line number Diff line number Diff line change
Expand Up @@ -140,12 +140,12 @@ fpinj = 1.0 * f-value for injection power (`constraint equation 30`; `iterati
fpnetel = 1.0 * f-value for net electric power (`constraint equation 16`; `iteration variable 25`)
fstrcase = 1.0000e+00 * f-value for maximum TF coil case TRESCA stress
fstrcond = 8.6890e-01 * f-value for maxiumum TF coil conduit TRESCA stress
ftburn = 1.00e+00 * f-value for minimum burn time (`constraint equation 13`; `iteration variable 21`)
ft_burn = 1.00e+00 * f-value for minimum burn time (`constraint equation 13`; `iteration variable 21`)
fvdump = 6.1211e-01 * f-value for dump voltage (`constraint equation 34`; `iteration variable 51`)
fwalld = 1.3024e-01 * f-value for maximum wall load (`constraint equation 8`; `iteration variable 14`)
pnetelin = 500.0 * required net electric power (MW) (`constraint equation 16`)
pseprmax = 17.0 * maximum ratio of power crossing the separatrix to plasma major radius (Psep/R) (MW/m)
tbrnmn = 7.2e3 * minimum burn time (s) (KE - no longer itv;; see issue #706)
t_burn_min = 7.2e3 * minimum burn time (s) (KE - no longer itv;; see issue #706)
walalw = 8.0 * allowable neutron wall-load (MW/m2) (`constraint equation 8`)

*-------------------Constraints--------------------*
Expand Down Expand Up @@ -535,7 +535,7 @@ vftf = 0.33 * coolant fraction of TFC 'cable' (`i_tf_sup=1`); or of TFC leg

*-----------------Times Variables------------------*

tburn = 1.0d4 * burn time (s) (calculated if `lpulse=1`)
t_burn = 1.0d4 * burn time (s) (calculated if `lpulse=1`)

*---------------Torga Curgap Module----------------*

Expand Down
Loading

0 comments on commit d6bd312

Please sign in to comment.