Skip to content
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

cpttf and cpttf_max error catching (integer turns option) #724

Open
jonmaddock opened this issue Jun 13, 2018 · 2 comments · May be fixed by #3114
Open

cpttf and cpttf_max error catching (integer turns option) #724

jonmaddock opened this issue Jun 13, 2018 · 2 comments · May be fixed by #3114
Assignees

Comments

@jonmaddock
Copy link
Contributor

In GitLab by @jmorris-uk on Jun 13, 2018, 09:20

Add error catching for cpttf and cpttf_max depending on whether cpttf is iteration variable or constrained etc.

Note. cpttf is now an output when the integer turns option is selected (and for stellarators), but can be constrained using cpttf_max. The code should therefore show an error and stop if it is selected as an iteration variable when it shouldn't be.

  !+ad_vars  cpttf /7.0e4/ : TF coil current per turn (A).
  !+ad_varc                  (calculated for stellarators)
  !+ad_varc                  (calculated for integer-turn TF coils i_tf_turns_integer=1)
  !+ad_varc                  (iteration variable 60)
  real(kind(1.0D0)) :: cpttf = 7.0e4

  !+ad_vars  cpttf_max /9.0e4/ : Max TF coil current per turn [A].
  !+ad_varc                  (For stellarators and i_tf_turns_integer=1)
  !+ad_varc                  (constraint equation 77)
  real(kind(1.0D0)) :: cpttf_max = 9.0e4
@cjwgriesel
Copy link
Contributor

Added exclusion for constraint 77 fcpttf if ixc =60 (cpttf) is selected. Cannot have constraint icc = 77 fcpttf with iteration value ixc = 60 cpttf.

Exclusion for ixc = 60 if i_tf_turns_integer == 1. Cannot have iterated itv ixc = 60 with i_tf_turns_integer == 1.

Exclusion for ixc = 60 if t_turn_tf or t_cable_tf is selected. Cannot have iterated itv ixc == 60 cpttf with t_turn_tf input or t_cable_tf is input.

Added a Warning that if i_tf_turns_integer == 0 and if t_turn_tf or t_cable_tf is selected then cpttf is calculated. It will over write any value of cpttf if it is inputted.

Added a Warning that if i_tf_turns_integer == 0 and if cpttf = 70000.0 and if t_turn_tf or t_cable_tf is not selected then the default value of cpttf has been used if no value of cpttf has been inputted.

Added improved method of detecting if values have been inputted by having three boolean flags t_turn_tf_is_input, t_cable_tf_is_input and cpttf_max_is_input. If any are true then a value has been inputted. Note that at present cpttf_max_is_input is not used.

new warnings and errors added to errorlist.json 282 to 286.

Noticed an error in sctfcoil.py and corrected it. i.e.
po.ovarre(
self.outfile,
"WP cross section area (per coil) (m2)",
"(aswp)",
sctfcoil_module.awptf,
)
fixed it by providing the output for both aswp and awptf.

Added a modification to hdf_to_scatter_plot.py where the font size can be selected manually (default set 6) and called it hdf_to_scatter_plot1.py.

@jmorris-uk
Copy link
Contributor

jmorris-uk commented May 14, 2024

Errors and warnings implemented by Charles in #3114 look fine. There are some other changes unrelated to this issue in that branch that need to be discarded/reviewed separately.

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

Successfully merging a pull request may close this issue.

5 participants