Skip to content

Value of dr_tf_inboard inconsistent in MFILE #3574

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
jonmaddock opened this issue Mar 7, 2025 · 4 comments
Open

Value of dr_tf_inboard inconsistent in MFILE #3574

jonmaddock opened this issue Mar 7, 2025 · 4 comments
Assignees
Labels
TF Coil Toroidal field coil

Comments

@jonmaddock
Copy link
Contributor

When selected as an optimisation parameter, the solution value of dr_tf_inboard in the MFILE is inconsistent with its itvarXXX value.

 dr_tf_inboard____________________________________________________________ (itvar007)_____________________ 1.19999999999999996e+00
 dr_tf_inboard_(final_value/initial_value)________________________________ (xcm007)_______________________ 1.00000000000000000e+00
 dr_tf_inboard_(range_normalised)_________________________________________ (nitvar007)____________________ 1.16279069767441845e-01
...
 TF_coil_inboard_leg_radial_thickness_(m)_________________________________ (dr_tf_inboard)________________ 7.61474358840885657e-01

The optimisation parameter solution value (itvar007) appears to still be at its initial value (see xcm007 == 1.0). This needs to be reconciled.

@clmould clmould added the TF Coil Toroidal field coil label Apr 1, 2025
@clmould
Copy link
Collaborator

clmould commented Apr 10, 2025

PROCESS/process/build.py

Lines 1684 to 1704 in aac5f4d

# Issue #514 Radial dimensions of inboard leg
# Calculate build_variables.dr_tf_inboard if tfcoil_variables.dr_tf_wp is an iteration variable (140)
if any(numerics.ixc[0 : numerics.nvar] == 140):
# SC TF coil thickness defined using its maximum (diagonal)
if tfcoil_variables.i_tf_sup == 1:
build_variables.dr_tf_inboard = (
build_variables.r_tf_inboard_in
+ tfcoil_variables.dr_tf_wp
+ tfcoil_variables.casthi
+ tfcoil_variables.dr_tf_nose_case
) / np.cos(
np.pi / tfcoil_variables.n_tf_coils
) - build_variables.r_tf_inboard_in
# Rounded resistive TF geometry
else:
build_variables.dr_tf_inboard = (
tfcoil_variables.dr_tf_wp
+ tfcoil_variables.casthi
+ tfcoil_variables.dr_tf_nose_case
)

The large tokamak file has both ixc = 140 and ixc = 13. Having 140 enabled causes the value of dr_tf_inboard (which is ixc=13) to be overwritten.

@mkovari
Copy link
Collaborator

mkovari commented Apr 11, 2025

The docs say

Direct parametrization: the TF radial inboard thickness width is set as an input variable : dr_tf_inboard (iteration variable 57).

Iteration variable 57 is actually dr_tf_nose_case. This error in the docs may not be relevant to the issue, but it seems worth fixing.

The docs are very clear that

dr_tf_wp and dr_tf_inboard cannot be used as iteration variables simultaneously.

@mkovari
Copy link
Collaborator

mkovari commented Apr 14, 2025

@ajpearcey Alex, You might want to think about how you would like to set up the TF coil geometry in the DEMO and large tokamak input files.

@clmould
Copy link
Collaborator

clmould commented Apr 14, 2025

@ajpearcey one idea we had is to remove ixc = 13 from the LT in.dat files since this variable is being overwritten, do you think this would make sense?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
TF Coil Toroidal field coil
Projects
None yet
Development

When branches are created from issues, their pull requests are automatically linked.

4 participants