Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
22 changes: 9 additions & 13 deletions process/core/solver/constraints.py
Original file line number Diff line number Diff line change
Expand Up @@ -511,11 +511,11 @@ def constraint_equation_11(constraint_registration, data):
)


@ConstraintManager.register_constraint(12, "V.sec", ">=")
@ConstraintManager.register_constraint(12, "Vs", ">=")
def constraint_equation_12(constraint_registration, data):
"""Equation for volt-second capability lower limit

vs_plasma_total_required: total V-s needed (Wb)
vs_plasma_total_required: total Vs needed (Wb)
vs_plasma_total_required (lower limit) is positive; vs_cs_pf_total_pulse (available) is negative
vs_cs_pf_total_pulse: total flux swing for pulse (Wb)
"""
Expand Down Expand Up @@ -1141,7 +1141,7 @@ def constraint_manager_45(constraint_registration, _data):

@ConstraintManager.register_constraint(46, "", "<=")
def constraint_equation_46(constraint_registration, _data):
"""Equation for Ip/Irod upper limit (TART)
"""Equation for Iₚ/I_rod upper limit (TART)

eps: inverse aspect ratio
c_tf_total: total (summed) current in TF coils (A)
Expand Down Expand Up @@ -1190,19 +1190,15 @@ def constraint_equation_50(constraint_registration, data):
)


@ConstraintManager.register_constraint(51, "V.s", "=")
@ConstraintManager.register_constraint(51, "Vs", "=")
def constraint_equation_51(constraint_registration, data):
"""Equation to enforce startup flux = available startup flux

vs_plasma_res_ramp: resistive losses in startup V-s (Wb)
vs_plasma_ind_ramp: internal and external plasma inductance V-s (Wb))
vs_plasma_ramp_required: Required flux swing for startup (Wb)
vs_cs_pf_total_ramp: total flux swing for startup (Wb)
"""
return eq(
abs(
data_structure.physics_variables.vs_plasma_res_ramp
+ data_structure.physics_variables.vs_plasma_ind_ramp
),
abs(data_structure.physics_variables.vs_plasma_ramp_required),
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why has this been changed from vs_plasma_res_ramp + vs_plasma_ind_ramp to vs_plasma_ramp_required ?

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

As vs_plasma_ramp_required is the sum of the two. Thus prevents useless extra calculations and room for errors

data.pf_coil.vs_cs_pf_total_ramp,
Comment on lines 1194 to 1202
constraint_registration,
)
Expand Down Expand Up @@ -1405,9 +1401,9 @@ def constraint_equation_67(constraint_registration, data):

@ConstraintManager.register_constraint(68, "MWT/m", "<=")
def constraint_equation_68(constraint_registration, data):
"""Upper limit on Psep scaling (PsepB/qAR)
"""Upper limit on Psep scaling (PₛₑₚBₜ / q₉₅AR₀)

psepbqarmax: maximum permitted value of ratio of Psep*Bt/qAR (MWT/m)
psepbqarmax: maximum permitted value of ratio of PₛₑₚBₜ / q₉₅AR₀ (MWT/m)
p_plasma_separatrix_mw: Power to conducted to the divertor region (MW)
b_plasma_toroidal_on_axis: toroidal field on axis (T) (iteration variable 2)
q95: safety factor q at 95% flux surface
Expand Down Expand Up @@ -1452,7 +1448,7 @@ def constraint_equation_68(constraint_registration, data):

@ConstraintManager.register_constraint(72, "Pa", "<=")
def constraint_equation_72(constraint_registration, data):
"""Upper limit on central Solenoid Tresca yield stress
"""Upper limit on Central Solenoid Tresca yield stress

In the case if the bucked and wedged option ( i_tf_bucking >= 2 ) the constrained
stress is the largest the largest stress of the
Expand Down
146 changes: 73 additions & 73 deletions process/data_structure/numerics.py
Original file line number Diff line number Diff line change
Expand Up @@ -526,97 +526,97 @@ def init_numerics():
active_constraints = [False] * ipeqns

lablcc = [
"Beta consistency ",
"⟨β⟩ consistency ",
"Global power balance consistency ",
"Ion power balance ",
"Electron power balance ",
"Density upper limit ",
"(Epsilon x beta-pol) upper limit ",
"Electron density upper limit (nₑ<) ",
"(βₚε) upper limit ",
"Beam ion density consistency ",
"Neutron wall load upper limit ",
"Fusion power upper limit ",
"Toroidal field 1/R consistency ",
"NOT USED",
"Radial build consistency ",
"Volt second lower limit ",
"CS & PF system whole pulse Vs lower limit ",
"Burn time lower limit ",
"NBI decay lengths consistency ",
"L-H power threshold limit ",
"Pₛₑₚ > Pₗₕ consistency ",
"Net electric power lower limit ",
"Radiation fraction upper limit ",
"Radiation fraction (fᵧ) upper limit ",
"Divertor heat load upper limit ",
"MVA upper limit ",
"Resistive TF MVA upper limit ",
"Beam tangency radius upper limit ",
"Plasma minor radius lower limit ",
"Divertor collisionality upper lim",
"Conducting shell radius upper lim",
"Beta upper limit ",
"Peak toroidal field upper limit ",
"Plasma minor radius (a) lower limit ",
"Divertor collisionality upper limit",
"Conducting shell radius upper limit",
"⟨β⟩ upper limit ",
"TF peak symmetric toroidal field upper limit ",
"CS coil EOF current density limit",
"CS coil BOP current density limit",
"Fusion gain Q lower limit ",
"Fusion gain (Qₚₗₐₛₘₐ) lower limit ",
"Inboard radial build consistency ",
"Injection power upper limit ",
"Plasma injected power (Pₐᵤₓ) upper limit ",
"TF coil case stress upper limit ",
"TF coil conduit stress upper lim ",
"I_op / I_critical (TF coil) ",
"Dump voltage upper limit ",
"J_winding pack/J_protection limit",
"TF coil temp. margin lower limit ",
"Current drive gamma limit ",
"1st wall coolant temp rise limit ",
"First wall peak temperature limit",
"Start-up inj. power lower limit ",
"Plasma curr. ramp time lower lim ",
"Cycle time lower limit ",
"Average centrepost temperature ",
"Peak centrepost temp. upper limit",
"Edge safety factor lower limit ",
"Ip/Irod upper limit ",
"TF coil tor. thickness upper lim ",
"Poloidal beta upper limit ",
"RFP reversal parameter < 0 ",
"TF coil conduit stress upper limit ",
"TF coil superconductor critical current density upper limit ",
"TF quench dump voltage upper limit ",
"TF quench hotspot current density upper limit ",
"TF coil superconductor temperature margin lower limit ",
"HCD normalised current drive efficiency (γ) upper limit ", # noqa: RUF001
"FW coolant temperature rise upper limit ",
"FW peak temperature limit",
"Plasma injected power lower limit ",
"Plasma current (Iₚ) ramp time lower limit ",
"Pulse cycle time lower limit ",
"Average CP temperature consistency ",
"Peak CP temperature upper limit",
"Edge safety factor (q₉₅) lower limit ",
"Iₚ/I_rod upper limit ",
"NOT USED",
"⟨βₚ⟩ upper limit ",
"NOT USED",
"IFE repetition rate upper limit ",
"Startup volt-seconds consistency ",
"Tritium breeding ratio lower lim ",
"Neutron fluence on TF coil limit ",
"Peak TF coil nucl. heating limit ",
"Vessel helium concentration limit",
"Psep / R upper limit ",
"TF coil leg rad width lower limit",
"TF coil leg rad width lower limit",
"NB shine-through frac upper limit",
"CS temperature margin lower limit",
"Minimum availability value ",
"f_alpha_energy_confinement ",
"number of ITER-like vacuum pumps ",
"Zeff limit ",
"Dump time set by VV stress ",
"Rate of change of energy in field",
"Upper Lim. on Radiation Wall load",
"Upper Lim. on Psep * Bt / q A R ",
"p_sep < psep_kallenbach divertor ",
"Separatrix temp consistency ",
"Separatrix density consistency ",
"CS Tresca yield criterion ",
"Psep >= Plh + Paux ",
"TFC quench <temp_croco_quench_max",
"TFC current/copper area < Max ",
"Eich critical separatrix density ",
"TFC current per turn upper limit ",
"Reinke criterion fZ lower limit ",
"CS & PF system ramp-up Vs consistency ",
"Tritium breeding ratio lower limit ",
"TF fast neutron fluence upper limit ",
"TF peak nuclear heating upper limit ",
"NOT USED",
"Pₛₑₚ / R upper limit ",
"NOT USED",
"NOT USED",
"NB shine-through fraction upper limit",
"CS superconductor temperature margin lower limit",
"Plant availability lower limit",
"Alpha to energy confinement ratio (τ_α/τₑ) lower limit ", # noqa: RUF001
"ITER-like vacuum pump number upper limit",
"Plasma volume averaged effective charge (⟨Zₑ⟩) upper limit ",
"VV stress during TF quench upper limit ",
"Rate of change of energy in PF system upper limit",
"FW radiation wall load upper limit",
"(PₛₑₚBₜ / q₉₅AR₀) upper limit ",
"NOT USED",
"NOT USED",
"NOT USED",
"CS Tresca yield criterion upper limit ",
"Pₛₑₚ > Pₗₕ + Pₐᵤₓ consistency ",
"TF quench temperature < temp_croco_quench_max",
"TF current/copper area < Max ",
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Other lines are now using 'upper limit' instead of 'max' - would this make sense here too for consistency?

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I have left those for the breakout PR after the CroCo refactor goes in

"Eich critical separatrix density upper limit ",
"TF current per turn upper limit ",
"Reinke criterion divertor impurity fraction lower limit",
"Peak CS field upper limit ",
"p_sep lower limit ",
"nd_plasma_electron_on_axis > nd_plasma_pedestal_electron ",
"toroidalgap > dx_tf_inboard_out_t",
"available_space > required_space ",
"beta > beta_vol_avg_min ",
"CP lifetime ",
"TFC turn dimension ",
"Cryogenic plant power ",
"TF coil strain absolute value ",
"CS current/copper area < Max ",
"CS stress load cycles ",
"ECRH ignitability ",
"Pₛₑₚ lower limit ",
"nₑ₀ > nₑ_pedestal constraint ",
"toroidalgap > dx_tf_inboard_out_t", # Stellarator constraint
"available_space > required_space ", # Stellarator constraint
"⟨β⟩ lower limit ",
"CP lifetime consistency ",
"TF turn dimension upper limit ",
"Cryogenic plant power upper limit ",
"TF WP vertical strain upper limit ",
"CS current to copper area upper limit ",
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Does the word 'fraction' or 'ratio' need to go in here to replace the '/' from before? Or keep the / like in line 603 ?

"CS achievable stress load cycles lower limit ",
"ECRH ignitability ", # Stellarator constraint
"Fuel composition consistency ",
]

Expand Down
Loading