Feature/veqpy - #4597
Draft
chencx04 wants to merge 7 commits into
Draft
Conversation
This commit introduces a comprehensive markdown file outlining the main usage scenarios of the PROCESS system, including CLI and Python API entry points, optimization, evaluation, and parameter scanning methods. It details the core calling chain, key classes involved, and provides flowcharts for better understanding. This documentation aims to enhance user guidance and clarify the operational structure of PROCESS.
…a geometry This commit introduces a new plasma geometry option (`i_plasma_geometry = 13`) that allows users to specify the last closed flux surface using discrete (R, Z) points. It includes the addition of `r_array` and `z_array` inputs, which are validated and processed to derive key plasma parameters such as `rmajor`, `rminor`, `kappa`, and `triang`. The implementation also tracks the number of LCFS points provided and updates relevant documentation to reflect these changes.
This commit introduces new variables and logic to handle proton-boron fusion reactions in the physics model. It adds the necessary input variables for boron-11 and proton fuel fractions, updates the physics calculations to account for these new fuel types, and includes the boron atom mass constant. Additionally, it modifies the impurity radiation model to incorporate boron as a new impurity species. Relevant tests have been updated to reflect these changes.
…alculations This commit introduces a user-defined plasma current option (`i_plasma_current = 0`) that allows users to specify the plasma current directly via `plasma_current_user_input`. It updates the relevant physics models to handle this new input, including validation checks to ensure positive values. Additionally, a new `PlasmaEquilibrium` model is added to facilitate equilibrium calculations, integrating it into the existing physics framework. Documentation is updated to reflect these changes, enhancing user guidance on plasma current configurations.
This commit adds validation logic to ensure that when plasma equilibrium is solved (`i_equilibrium_solve=1`), the plasma current and current profile index must be user-specified. It raises appropriate errors if these conditions are not met. Additionally, it updates the physics model to calculate the total magnetic field and its components, ensuring consistency in the plasma equilibrium calculations. This enhances the robustness of the plasma modeling framework.
This commit introduces a new static method `bootstrap_fraction_sauter_equilibrium` in the `PlasmaBootstrapCurrent` class to calculate the bootstrap fraction based on Sauter equilibrium conditions. Additionally, a new static method `diamagnetic_integral` is added to the `PlasmaDiamagneticCurrent` class for calculating the diamagnetic integral based on the plasma equilibrium. These enhancements improve the accuracy and functionality of the plasma current models, facilitating more detailed plasma behavior analysis.
This commit refactors the import statements in the plasma model files to ensure consistency and clarity. It also adds detailed docstrings to several methods, including error handling for invalid inputs in the plasma geometry and equilibrium classes. Additionally, it improves the readability of the plasma current calculations by restructuring conditional checks. These changes enhance the maintainability of the code and provide better guidance for future developers.
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.
Description
Checklist
I confirm that I have completed the following checks: