desc.equilibrium.EquilibriaFamily.solve_continuation_automatic
- classmethod EquilibriaFamily.solve_continuation_automatic(eq, objective='force', optimizer='lsq-exact', pert_order=2, ftol=None, xtol=None, gtol=None, maxiter=100, verbose=1, checkpoint_path=None, **kwargs)Source
Solve for an equilibrium using an automatic continuation method.
By default, the method first solves for a no pressure tokamak, then a finite beta tokamak, then a finite beta stellarator. Currently hard coded to take a fixed number of perturbation steps based on conservative estimates and testing. In the future, continuation stepping will be done adaptively.
- Parameters:
eq (Equilibrium) – Unsolved Equilibrium with the final desired boundary, profiles, resolution.
objective (str or ObjectiveFunction (optional)) – function to solve for equilibrium solution
optimizer (str or Optimizer (optional)) – optimizer to use
pert_order (int) – order of perturbations to use.
ftol (float) – stopping tolerances for subproblem at each step. None will use defaults for given optimizer.
xtol (float) – stopping tolerances for subproblem at each step. None will use defaults for given optimizer.
gtol (float) – stopping tolerances for subproblem at each step. None will use defaults for given optimizer.
maxiter (int) – maximum number of iterations in each equilibrium subproblem.
verbose (integer) –
0: no output
1: summary of each iteration
2: as above plus timing information
3: as above plus detailed solver output
checkpoint_path (str or path-like) – file to save checkpoint data (Default value = None)
**kwargs (dict, optional) –
mres_step
: int, default 6. The amount to increase Mpol by at each continuation steppres_step
: float,0<=pres_step<=1
, default 0.5. The amount to increase pres_ratio by at each continuation stepbdry_step
: float,0<=bdry_step<=1
, default 0.25. The amount to increase bdry_ratio by at each continuation step
- Returns:
eqfam (EquilibriaFamily) – family of equilibria for the intermediate steps, where the last member is the final desired configuration,