:3263 update the plasma current section of the docs to show and explain all models#3320
Merged
chris-ashe merged 115 commits intomainfrom Oct 9, 2024
Conversation
…e-docs-to-show-and-explain-all-models
…d coded values replaced with constants variables, in-line commnets removed with increased spacing, import re-arranged in-line with PEP standards
…of current into seperate sections
…netic plasma current functions
Update the documentation for the ps_fraction_scene function to provide a clear explanation of its purpose and parameters.
…value in multiple files. "ibss" added to obsolete variables list
…current_peng() and conhas()
…asma current shaping function for calculate_plasma_current
…_current function
…py so that they are grouped together
…place it outside the function the same as the other bootstrap fraction calculations
…e-docs-to-show-and-explain-all-models
…tiple files This should prevent parsing problems due to / no longer present. Variable name change is technically not PEP8 complinat but is a stand in to make the code explicit
…e-docs-to-show-and-explain-all-models
…ics.py and test_physics.py
…ties & Radiation section
…atting shown in the source document. Added additional context in the docs also
…profiles, ensured used of Bokeh 2.4.0
j-a-foster
requested changes
Oct 1, 2024
Collaborator
j-a-foster
left a comment
There was a problem hiding this comment.
General comments on documentation - need to review code next.
…ting legacy files
…nts to plasma_current.md overview
…t section. Referencing pages in engineering models section
timothy-nunn
requested changes
Oct 2, 2024
Collaborator
timothy-nunn
left a comment
There was a problem hiding this comment.
Consider naming some of the supporting functions with an _. Generally, is a function general (calculating an important physical quantity, a scaling function, etc) or is its only purpose to provide scaling constants to other functions.
I have checked for quality, I leave technical implementation and documentation correctness to Jack.
j-a-foster
reviewed
Oct 2, 2024
Collaborator
j-a-foster
left a comment
There was a problem hiding this comment.
Only 1 minor comment to see if something looks better
…y are internal functions
…s and add a warning about its validity
…ootstrap scaling and add warning that it is not explicitly in the paper
timothy-nunn
approved these changes
Oct 9, 2024
j-a-foster
approved these changes
Oct 9, 2024
Collaborator
j-a-foster
left a comment
There was a problem hiding this comment.
Happy for this to be merged.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This pull request includes several changes to the documentation related to plasma current and bootstrap current terminology updates. The most important changes include renaming variables for consistency and clarity, and restructuring the documentation and
physics.pyfor better readability.Bug Fixes:
5.0e6, it has now been set explicitly with the constants asconstants.twopi / constants.rmu0i_plasma_current = 6as it would check for value7when only testing condition if in[5,6]cbootparameter has now been placed outside thebootstrap_fraction_iter89()function to be the same as other modelseps) into the exponent ofrli. Original issue 954 bootstrap current fraction scaling formula for steady state machines #3268teninstead of just the volume averagetei_plasma_current = 2then the first action inphysics()was to setq95to theqbarequivalent. This would propagate a wrong value ofq95to other models when only theqbarterm was meant to the used in the plasma current scaling. This assignment is now within the plasma current functionTerminology Updates:
Main plasma current calculation in
physics.pyis now namedcalculate_plasma_current()instead ofculcur()The plasma current model selection switch is now named
i_plasma_currentinstead oficurrThe Peng plasma current scaling has been renamed to
calculate_plasma_current_peng()instead ofplasc()The diamagnetic current model selection switch is now named
i_diamagnetic_currentinstead ofidiaThe bootstrap current model selection switch is now named
i_bootstrap_currentinstead ofibssThe Pfirsch-Schluter current model selection switch is now named
i_pfirsch-schluter_currentinstead ofipsThe Nevins plasma current scaling integral function has been renamed to
_nevins_intgeral()instead ofbsinteg()The function,
hcsa()used in the Sauter bootstrap model has been renamed to,_calculate_l31_32_coefficient()The function,
hcsa()used in the Sauter bootstrap model has been renamed to,_calculate_l31_32_coefficient()The function,
dcsa()used in the Sauter bootstrap model has been renamed to,_calculate_l31_coefficient()The function,
xcsa()used in the Sauter bootstrap model has been renamed to,_calculate_l34_alpha_31_coefficient()The function,
coulg()used in the Sauter bootstrap model has been renamed to,_coloumb_logarithm)sauter()The function,
nuee()used in the Sauter bootstrap model has been renamed to,_electron_collisions_sauter()The function,
nuess()used in the Sauter bootstrap model has been renamed to,_electron_collisionality_sauter()The function,
nui()used in the Sauter bootstrap model has been renamed to,_ion_collisions_sauter()The function,
nuis()used in the Sauter bootstrap model has been renamed to,_ion_collisionality_sauter()The function,
beta_poloidal_local()used in the Sauter bootstrap model has been renamed to,beta_poloidal_sauter()The function,
beta_poloidal_local_total()used in the Sauter bootstrap model has been renamed to,_beta_poloidal_total_sauter()The variable
magnetic_momentin the Sauter bootstrap fractions has been re-named toinverse_qChanged input variable names have been added to
obsolete_varsDocumentation Reorganization:
documentation/proc-pages/physics-models/plasma_current.md: Removed detailed descriptions of plasma current scaling laws and bootstrap current methods, which have been moved to more specific documents.documentation/proc-pages/physics-models/plasma_current/diamagnetic_current.md: Added a new document detailing the diamagnetic current fraction and its calculation methods.documentation/proc-pages/physics-models/plasma_current/pfirsch_schlüter_current_drive.md: Added a new document detailing the Pfirsch-Schlüter current fraction and its calculation methods.vardes.cssnow means section break lines are more visible to distinguish between separate sections.Other Updates:
Physicsclassphysics.pyhave now been grouped and organised into sections with block comment headersdocumentation/proc-pages/eng-models/heating-and-current-drive.mdfile has been removed. It should have been removed in WIP:Update the heating and current drive docs to include all models #3171Checklist
I confirm that I have completed the following checks: