Fusion-Power-Plant-Framework / bluemira

Bluemira is an integrated inter-disciplinary design tool for future fusion reactors. It incorporates several modules, some of which rely on other codes, to carry out a range of typical conceptual fusion reactor design activities.
https://bluemira.readthedocs.io/
GNU Lesser General Public License v2.1
58 stars 16 forks source link

Free boundary equilibrium reformulation for divertor optimization #204

Closed DanShort12 closed 2 years ago

DanShort12 commented 2 years ago

In GitLab by @sebkahn on Jun 21, 2021, 12:02

Description

The free boundary optimisation problem does not include divertor considerations at present.This should be made possible somehow.

Proposal

The proposal is to make a configurable OptimisationProblem in which:

Additional context

As discussed with @alexanderianblair and @CoronelBuendia on the 3/11/2021

DanShort12 commented 2 years ago

In GitLab by @sebkahn on Jun 21, 2021, 12:06

changed the description

DanShort12 commented 2 years ago

In GitLab by @sebkahn on Jun 21, 2021, 12:06

changed the description

DanShort12 commented 2 years ago

In GitLab by @CoronelBuendia on Jun 21, 2021, 16:30

At the moment when solving equilibria, we optimise the coil currents using an objective function which minimises the error to the desired set of magnetic constraints, with a Tikhonov regularisation term on the coil currents:

image

For STEP at the moment, none of the "subject to" equations are activated, so its (mathematically speaking) still an unconstrained problem. What I was suggesting was to modify the optimisation problem being solved to account for divertor magnetic constraints. Seb didn't like the sound of lumping the divertor magnetic constraints in the existing set of constraints, because (rightly enough) we don't know where the divertor target should be a priori or indeed what values we actually want or are achievable. Something like this might enshrine the STEP design intent, but who knows:

image

At the moment, seeing as the coil engineering constraints (F, B, I) are not activated, you might even find some good solutions to this problem.

Either way, I suggest to first formulate the design optimisation problem which best captures the design intent of the STEP team. Once this is done, we can discuss implementation details and any compromises we might have to make.

DanShort12 commented 2 years ago

In GitLab by @sebkahn on Jul 26, 2021, 17:18

changed the description

DanShort12 commented 2 years ago

In GitLab by @sebkahn on Jul 26, 2021, 17:21

changed the description

DanShort12 commented 2 years ago

In GitLab by @sebkahn on Jul 27, 2021, 21:07

changed the description

DanShort12 commented 2 years ago

In GitLab by @sebkahn on Jul 27, 2021, 21:07

changed the description

DanShort12 commented 2 years ago

In GitLab by @sebkahn on Jul 27, 2021, 21:12

changed the description

DanShort12 commented 2 years ago

In GitLab by @CoronelBuendia on Jul 28, 2021, 08:52

To be clear, once you have formulated the optimisation problem for the coil currents, you should make a new Optimiser(EquilibriumOptimiser), and not modify the existing one.

DanShort12 commented 2 years ago

In GitLab by @sebkahn on Jul 29, 2021, 15:51

Sam feedback

DanShort12 commented 2 years ago

In GitLab by @sebkahn on Aug 3, 2021, 16:06

changed the description

DanShort12 commented 2 years ago

In GitLab by @sebkahn on Aug 3, 2021, 16:09

changed the description

DanShort12 commented 2 years ago

In GitLab by @sebkahn on Aug 3, 2021, 16:09

changed the description

DanShort12 commented 2 years ago

In GitLab by @sebkahn on Aug 3, 2021, 16:11

changed the description

DanShort12 commented 2 years ago

In GitLab by @alexanderianblair on Aug 5, 2021, 17:37

OK, so after extensive brainstorming today with Mark - the plan for this is currently as follows:

Initially: write a new Optimiser(EquilibriumOptimiser) as suggested by Matti, that minimises the objective function $\mathcal L$ (by passing to NLOpt or similar) that includes the divertor figure of merit. The choice of the objective function is broad, and should ideally be guided by the actual requirements imposed by the physics at the divertor, as mentioned by Matti - possibly being user-defined. In lieu of this, the initial objective function as a function of coil currents to minimise will be

\mathcal L ({\bf I}) = \lambda_1 \left(||\bf{GI} -\bf{b_t} + \bf{b_p}||^2_2 +||\bf{\Gamma I}||^2_2\right) - \lambda_2 L_c({\bf I}) - \lambda_3 f_x({\bf I})

with the $\lambda_i >0$ for $i= 1,2,3$ that weight the relative importance of the magnetic constraints (containing the four main isoflux constraints the constrain the core), the connection length, and the flux expansion to be specified by the user. The previous set of constraints on I, B etc will be applied as before, with the extra x-point constraint supplemented to this as required. This also makes it straightforward to check consistency with the existing coil current optimisation procedure, by setting $\lambda_2 = \lambda_3 = 0$.

This route should be able to be extended in a rather straightforward manner if coil positions need to be optimised in the same step, and to accommodate different/better objective functions as the divertor optimisation problem becomes better defined.

CoronelBuendia commented 2 years ago

@sebkahn @markj997 @alexanderianblair I believe that with #1027 all of the functionality required above will be possible, but not implemented "ready-made" as this will likely be quite a specific problem. Could we close this issue when that branch gets merged?

markj997 commented 2 years ago

@sebkahn @markj997 @alexanderianblair I believe that with #1027 all of the functionality required above will be possible, but not implemented "ready-made" as this will likely be quite a specific problem. Could we close this issue when that branch gets merged?

I believe so yeah, honestly this was so long ago I can't remember the details behind it but #1027 seems to cover the points above.