Skip to content

Implementation of beta fixed point solve, based on Jon M work. - #4640

Open
grmtrkngtn wants to merge 1 commit into
mainfrom
4637-replace-the-iterative-idempotence-treatment-of-plasma-beta-with-an-explicit-fixed-point-calculation
Open

grmtrkngtn wants to merge 1 commit into
mainfrom
4637-replace-the-iterative-idempotence-treatment-of-plasma-beta-with-an-explicit-fixed-point-calculation

Conversation

@grmtrkngtn

Copy link
Copy Markdown
Collaborator

Description

This PR replaces the iterative idempotence treatment of plasma beta with an explicit fixed-point solve.

Previously, beta_total_vol_avg could be treated as optimisation iteration variable ixc = 5, with equality constraint icc = 1 enforcing consistency between the total beta and its thermal, fast-alpha and beam components. This means that one of PROCESS's internal closure relationships is effectively being solved through the optimisation problem.

The change instead solves

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

internally using scipy.optimize.fixed_point.

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

The fixed-point calculation is performed within Caller for each model evaluation. The trial value of beta_total_vol_avg is applied after the optimisation variables have been set, ensuring that the fixed-point value is not overwritten by set_scaled_iteration_variable().

The existing MFILE/output idempotence handling is otherwise retained.

Validation

The low_aspect_ratio_DEMO.IN.DAT case was run with ixc = 5 removed while retaining beta consistency constraint icc = 1.

The case converges to essentially the same solution as main, while constraint 1 remains satisfied with zero residual. This demonstrates that the beta closure is being provided by the internal fixed-point calculation rather than by VMCON varying beta_total_vol_avg.

As a result, beta_total_vol_avg no longer needs to be exposed to the optimiser as ixc = 5. Once the fixed-point implementation is fully adopted, icc = 1 can also be removed from the optimisation problem because the same closure is enforced internally.

@grmtrkngtn
grmtrkngtn requested a review from a team as a code owner October 1, 2026 15:30
@grmtrkngtn grmtrkngtn added the Convergence Solver or convergence-related problems label Oct 1, 2026
@codecov-commenter

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 25.00000% with 18 lines in your changes missing coverage. Please review.
✅ Project coverage is 49.92%. Comparing base (4885172) to head (6c34f15).

Files with missing lines Patch % Lines
process/core/caller.py 25.00% 18 Missing ⚠️
Additional details and impacted files
@@           Coverage Diff           @@
##             main    #4640   +/-   ##
=======================================
  Coverage   49.92%   49.92%           
=======================================
  Files         151      151           
  Lines       30236    30239    +3     
=======================================
+ Hits        15094    15098    +4     
+ Misses      15142    15141    -1     

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@CoronelBuendia

Copy link
Copy Markdown
Contributor

Hmm.. this only happens when beta is used to calculate things that relate to how beta is calculated.

As far as I am aware, this was only happening in the Saamuli pedestal temperature scaling $\beta = f(T_{e,ped} = g(\beta))$ that was used for EU-DEMO, hence the constraint/Picard iteration. But this pedestal model no longer exists in open-source PROCESS.

Where is the fixed point problem now for the open-source PROCESS LAR point? I just think it's really important to identify what these "circular loops" are.

More importantly, are you sure this is a complete closure of the plasma calculation chain, or are there other fixed point issues?

@timothy-nunn timothy-nunn self-assigned this Oct 2, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Convergence Solver or convergence-related problems

Projects

None yet

Development

Successfully merging this pull request may close these issues.

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

4 participants