Repository navigation
4634 add fuel ion equilibrium constraint - #4639
grmtrkngtn wants to merge 49 commits into
Conversation
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #4639 +/- ##
==========================================
- Coverage 49.92% 49.75% -0.17%
==========================================
Files 151 151
Lines 30225 30309 +84
==========================================
- Hits 15089 15080 -9
- Misses 15136 15229 +93 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
|
@grmtrkngtn could you possibly explain (and justify) why the regression tests have changed results here? Its not immediately obvious why this has happened |
I noticed that too Tim, although they didn't seem to be significant changes - I can't explain it as these changes are not active in any of the regression tests! |
timothy-nunn
left a comment
There was a problem hiding this comment.
With these current changes it strikes me that the new constraint should always be active and that a sensible molflow_plasma_fuelling should be specified in each input file (or a sensible default applied).
There is also an inconsistency between models whether molflow_plasma_fuelling or molflow_plasma_fuelling_required is used.
If we use molflow_plasma_fuelling in the models, then I think the new iteration variable and constraint will always need to be active (and that should be documented).
If we use molflow_plasma_fuelling_required in the models, then the new iteration variable is not useful (unless I am missing something).
There was a problem hiding this comment.
@grmtrkngtn this will be where the changes have come from. Because the iteration variable and constraint is not on molflow_plasma_fuelling will always be the default value, whereas before it was molflow_plasma_fuelling_required which was calculated.
There was a problem hiding this comment.
I've now set a default value that is roughly representative of a large tokamak / DEMO LAR case.
It is worth noting that solutions can be quite sensitive to this value. That is expected, since the assumed fuelling rate affects the plasma particle balance. In optimisation mode users can activate ixc = 178 together with icc = 93 and allow PROCESS to solve for the fuelling rate. Otherwise, an appropriate value needs to be specified in the input file.
| self.data.physics.figmer, | ||
| _fusrat, | ||
| self.data.physics.molflow_plasma_fuelling_required, | ||
| self.data.physics.molflow_plasma_fuelling_equilibrium, |
There was a problem hiding this comment.
How come in vacuum we are using molflow_plasma_fuelling but here we use molflow_plasma_fuelling_equilibrium?
There was a problem hiding this comment.
phyaux() calculates the equilibrium fuelling rate, the fuelling rate required to sustain fusion.
molflow_plasma_fuelling is the actual fuelling throughput used by downstream engineering models such as the vacuum system.
Constraint 93 enforces equality between them at a solved point, but they should remain distinct during the solve
…fter fast particle calculation
This reverts commit 8dc8e88.
Co-authored-by: Timothy <75321887+timothy-nunn@users.noreply.github.com>
Co-authored-by: Christopher Ashe <91618944+chris-ashe@users.noreply.github.com>
|
@grmtrkngtn Am seeing commits from |
…date associated outputs, labels and tests.
9702aff to
350abb5
Compare
|
|
||
| At the heart of a PROCESS solution is a plasma operating in a self-consistent equilibrium state. Its state cannot be chosen arbitrarily: plasma temperature, density, heating, fusion reactions, radiation, transport losses and fuelling are all coupled. | ||
|
|
||
| The principal plasma state is described by the electron temperature and density, |
There was a problem hiding this comment.
Is the solve here specifically for the volume averaged temperature and density?
| The principal plasma state is described by the electron temperature and density, | ||
|
|
||
| $$ | ||
| T_e,\qquad n_e. |
There was a problem hiding this comment.
If the above is true, then:
| T_e,\qquad n_e. | |
| \langle T_e \rangle ,\qquad \langle n_e \rangle. |
|
|
||
| This gives an important distinction: | ||
|
|
||
| $$ |
There was a problem hiding this comment.
Not sure what is happening here with the formatting but it is broken here in the Github viewer
|
|
||
| Several possible figures of merit are available, all of which are in the | ||
| source file `evaluators.f90`. | ||
| The switch `i_figure_merit` selects the objective. A positive value indicates minimisation, while a negative value indicates maximisation. |
There was a problem hiding this comment.
I think it maybe be good here and throughout to give some reference to the controlling enum objects for the switches
| ) | ||
|
|
||
|
|
||
| @ConstraintManager.register_constraint(93, "", "=") |
There was a problem hiding this comment.
| @ConstraintManager.register_constraint(93, "", "=") | |
| @ConstraintManager.register_constraint(93, "particles/s", "=") |
| 178: IterationVariable( | ||
| "molflow_plasma_fuelling", | ||
| "physics", | ||
| 1.0e20, |
There was a problem hiding this comment.
| 1.0e20, | |
| 1.0e18, |
| "f_len_sol_power_decay_inboard_outboard": InputVariable( | ||
| "physics", float, range=(0.01, 2.0) | ||
| ), | ||
| "molflow_plasma_fuelling": InputVariable("physics", float, range=(1.0e20, 1.0e23)), |
There was a problem hiding this comment.
| "molflow_plasma_fuelling": InputVariable("physics", float, range=(1.0e20, 1.0e23)), | |
| "molflow_plasma_fuelling": InputVariable("physics", float, range=(1.0e18, 1.0e23)), |
This makes fuel-ion equilibrium an explicit equality constraint in PROCESS.
Previously, the required plasma fuelling rate was calculated and set internally from the fusion rate and burnup fraction. This hides one of the coupled relationships required for PROCESS to arrive at a self-consistent solution.
The change separates:
molflow_plasma_fuelling, representing the plasma fuelling rate;molflow_plasma_fuelling_equilibrium, calculated from the plasma state.Constraint 93 then explicitly enforces fuel-ion equilibrium by requiring:
molflow_plasma_fuelling = molflow_plasma_fuelling_equilibriumThe equilibrium requirement is calculated in the physics model, while the constraint simply compares the two quantities.
Motivation
This is part of the work required to introduce a PROCESS solution mode for uncertainty-quantification evaluations.
For UQ, we want to evaluate PROCESS at sampled inputs without performing a full design optimisation. PROCESS must therefore be able to solve the coupled equations required for a physically self-consistent plant state independently of the optimisation problem.
Making fuel-ion equilibrium an explicit closure equation is one step towards separating:
solving the PROCESS model for a self-consistent state, from
optimising the design.
This will allow a future solution mode to solve the required internal equilibrium equations for each UQ sample while keeping the sampled/design quantities fixed.
Docs
I have re-written the solver docs page to explain the role this plays in PROCESS, and how we view what a PROCESS solution is.