An attempt at developing an optimized control rod design for a nuclear reactor using a genetic algorithm and perturbation theory of the simple neutron diffusion equation model.
The objective of this project is to study whether we can optimize the control rod design by minimizing the axial power peaking factor throughout the insertion process. We will employ perturbation theory to a simple one dimensional neutron diffusion equation, and infer a control rod design from a mimization problem using a genetic algorithm.
To achieve the objective, we will as previously stated, employ a simple diffusion equation for a multiplying medium given by the equation
Here
We can model the existance of a control rod by introducing a new absorption cross-section for the control rod
If we let
However, if we only insert the control rod partially (to say
The idea is to find an
If we opt to minimize this for all insertion distances
So how can we find an optimal
The second thing to realize is that we can use perturbation theory to get a solution for a spatially dependent $N(x) $ by letting
In what follows, we will only care about the first order perturbation
By omitting contributions of order
We notice that the equations are almost identical in
resulting in the following simplified equations
We will furthermore expand
where we will restrict ourselves to some arbitrary large
The solution procedure is described as follows:
- We start by looping over a subset of all insertion distances
$x_c$ ranging from$0$ to$L$ , in total$m$ discrete insertion distances. - We discretize the domain
$[0,L]$ into$n$ points, meaning that$\phi_0$ ,$\phi_1$ ,$N_1$ and$\sigma(x, x_c)$ turns into an array of length$n$ . - Solve for the zeroth order perturbation equation
$\phi_0$ using the discretized equation below
which can be arranged into a matrix equation of the form
This is an eigenvalue problem that can be solved for the eigenvector
- Use the zeroth order solution
$\phi_0$ to solve for$\phi_1$ in the first order perturbation equation for some given$N_1(x)$ . This is done through the following discretized equation
which once again can be arranged into a matrix equation on the form
which can be solved for
-
We form the final flux
$\phi(x) = \phi_0(x) + \epsilon \phi_1(x)$ and the final number density$N(x) = N_0 + \epsilon N_1(x)$ . -
We use
$N_1$ as a function we seek to optimize in order to minimize a cost function. This minimization will be implemented through a genetic algorithm, although it's very simple to alter the code if one wants to use standard minimization techniques such as Newton, Nelder-Mead, etc. Either way, what we are actually optimizing are the$c_\eta$ 's in the Legendre expansion of$N_1$ . The cost function is defined with three terms
The first term can be identified as the win in axial PPF between the zeroth order solution
To tie everything together, we finally have to explain how we can get an idea of a control rod design given our perturbed solution
where
The code performs the optimization of a control rod design by minimizing the cost function with respect to
What follows is a construction of the matrix
Thereafter we have three optimization functions, firstly invPow
that performs an inverse power iteration to find the dominant eigenvalue and its' corresponding eigenvector.solve_phi0
and solve_phi1
compute the zeroth-order and first-order neutron fluxes according to the defined differential equations in the background. Finally, the objective
function defines the cost function for the genetic algorithm, and is evaluated purely from the coefficients in the Legendre polynomial expansion.
Finally we enter the genetic algorithm that initializes a population of solutions objective
function. We thereafter perform crossovers and mutation in order to increase the gene pool and find new solutions.
The fitness is then visualized dynamically during the optimization process, and each of the consistuent terms in the cost function are visualized to see their individual contributions.
Furthermore, a simple Nelder-Mead minimization is also available in the code repositories.
Figure 1: Fluxes at various insertion percentages
Figure 2: An optimal N(x) design
Figure 3: Axial PPF at various insertion percentages
The results above indicate that indeed it's possible to get a better axial PPF for the given
What is clear is that the optimization tends to increase the flux locally in the control rod region. Since the flux has to be constant between the unperturbed and perturbed solution, this gives rise to a smaller flux right after the control rod. In this way, one can achieve a more homogenous flux distribution in the reactor, at least theoretically. Still, the fluxes aren't perfectly balanced, and the settings of the weighting factors in the cost function might play a crucial role here.
It should also be noted that we neglected effects such as energy dependencies of cross-sections, change in the multiplication factor
In the future, it might be benefical to validate the results using tools like OpenMC. It might even be possible to couple OpenMC with a genetic algorithm directly, thought this would certainly be more computationally expensive than the method we have used here. I have added an OpenMC project at the moment that recreates the cylindrical shape based on the Legendre coefficients retrieved from the minimization above. There're some bugs in the code, but those interested might be able to alter it slightly and add a genetic algorithm or another minimization technique to develop a working model.
One could also incoroporate higher order perturbation solutions, since it's not very hard to extend the results above to a generic perturbation order