Optimizer and solver: GDFsolve is a multidimensional root finder and optimizer that can be used as a driver-program for GPT simulations. It automates the design process by solving any number of constraints on beam parameters along the beam line by varying variables used in the GPT inputfile. GDFsolve can also be used as optimizer to minimize or maximize the weighted sum of any number of selected beam parameters. If needed, the optimizer can be combined with the root finder to form a constrained optimizer.

The beam parameters to be taken into consideration can be any combination of built-in and custom analysis routines at any point in the beam line, including 3D beam position, beam sizes in all dimensions, x, y and z-emittance, energy, energy spread and all Courant Snyder parameters. Possible variables include all positions and parameters of all beam line components.

The root-finder is based on multi-dimensional Newton-Raphson and Singular Value Decomposition. This guarantees stable operation, even when one or more variables or constraints are (nearly) irrelevant. The used method allows a non-equal number of variables and constraints. Broydens Method reduces the number of GPT runs considerably when the number of variables is equal (or less) than the number of constraints. Backtracking is used in situations with slow convergence.

Root-finding in one and two dimensions (4K)
Root-finding in one and two dimensions.

In many design scenario’s, the variables can not be chosen freely. They are restricted to boundary conditions such as the location of other beam line components. In our implementation all variables are optionally bounded by a minimum and maximum value. The solution in underconstrained systems is extrapolated in the nullspace to solve boundary violations very efficiently.

Boundary condition extrapolation (4K)
Extrapolation when a boundary-condition is violated.

The optimizer is based on multi-dimensional Powel optimization. It is a very convenient and very powerful tool in the final stages of the design process.