Feature/veqpy - #4597
Draft
chencx04 wants to merge 10 commits into
Draft
Feature/veqpy#4597chencx04 wants to merge 10 commits into
chencx04 wants to merge 10 commits into
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 commit introduces a new `VeqpyRuntime` class to manage the latest veqpy equilibrium state and its associated axis iteration results. It also refactors the plasma equilibrium handling in the `PlasmaEquilibrium` class, adding methods to store and clear veqpy equilibrium data. The code now checks for the availability of veqpy equilibrium results in various plasma profile calculations, improving the integration of veqpy with the existing plasma modeling framework. Additionally, logging has been added for better traceability of equilibrium state conditions.
This commit removes the direct instantiation of the `PlasmaEquilibrium` class from the `Models` and `Physics` classes, streamlining the plasma equilibrium handling. It introduces a new `plasma_equilibrium-copy.py` file that implements a fixed-boundary plasma equilibrium via optional Veqpy integration. The `check_process` function is updated to enforce validation checks for equilibrium conditions, ensuring user-defined inputs are correctly specified. Additionally, the `DataStructure` class is enhanced to include a `veqpy` attribute for managing equilibrium states, improving the overall integration of Veqpy within the plasma modeling framework.
This commit introduces a validation check in the `check_process` function to ensure that when the pedestal type is set to `GREENWALD_FRACTION` and the equilibrium solver is active (`i_equilibrium_solve = 1`), the user must provide absolute density values for pedestal and separatrix densities. An appropriate error is raised if these conditions are not met, enhancing the robustness of input handling in the plasma modeling framework.
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: