Skip to content

Replace the iterative idempotence treatment of plasma beta with an explicit fixed-point calculation #4637

Description

@grmtrkngtn

Replace iterative beta idempotence with an explicit fixed-point solve

PROCESS previously relied on repeated model evaluations and the optimisation problem to obtain a self-consistent value of the total plasma beta. In particular, beta_total_vol_avg was included as an iteration variable (ixc = 5) and equality constraint 1 enforced consistency between the total beta and its thermal, fast-alpha and beam components.

This change makes that coupling explicit by solving plasma beta internally as a fixed-point problem.

PROCESS now solves

$$ \beta = \beta_{\mathrm{fast\ alpha}} + \beta_{\mathrm{beam}} + \beta_{\mathrm{thermal}} $$

using scipy.optimize.fixed_point, with a maximum of 20 iterations.

The thermal beta is calculated using the existing PlasmaBeta.calculate_plasma_beta() method from process.models.physics.physics.

The implementation adds two small methods to Caller:

  • _calculate_beta() evaluates the PROCESS models at a trial value of beta_total_vol_avg and returns the corresponding calculated total beta.
  • _solve_beta_fixed_point() repeatedly evaluates this mapping until a self-consistent beta is obtained.

The trial beta is applied after the optimisation variables are set in _call_models_once(). This is important because it prevents set_scaled_iteration_variable() from overwriting the beta being tested by the fixed-point solver.

The existing final-output/MFILE idempotence machinery has otherwise been retained; this change is intended specifically to replace the implicit iterative treatment of plasma beta rather than remove unrelated idempotence handling.

Validation

The low_aspect_ratio_DEMO.IN.DAT regression case was run with beta_total_vol_avg removed as an optimisation iteration variable while retaining beta consistency constraint 1.

beta_total_vol_avg is absent from the optimisation solution vector, confirming that VMCON is no longer directly varying beta.

Nevertheless, beta consistency constraint 1 is satisfied exactly:

⟨β⟩ consistency = 0.03718848552085542, with a constraint residual of 0.0.

The final total plasma beta is

beta_total_vol_avg = 0.03718848552085542, composed of a thermal beta of 0.03250787755343900, a fast-alpha beta of 0.004680607967416424, and zero beam beta.

The resulting solution is essentially the same as the corresponding main solution in which beta_total_vol_avg is retained as ixc = 5.

This demonstrates that the beta closure is now being supplied internally by the fixed-point calculation rather than by the optimiser varying beta_total_vol_avg.

impact

At this stage, constraint 1 has deliberately been retained as an independent validation of the new fixed-point calculation.

Because beta_total_vol_avg is now solved internally by the fixed-point calculation, it no longer needs to be exposed to the optimiser as iteration variable ixc = 5. Once the fixed-point implementation is validated, beta consistency constraint icc = 1 can also be removed, since the same closure is already enforced internally during every model evaluation.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

ConvergenceSolver or convergence-related problems

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions