# MATLAB X-Y Neutron Diffusion Code MATLAB code that solves the neutron diffusion

MATLAB X-Y Neutron Diffusion Code

MATLAB code that solves the neutron diffusion equation in 2-D, x-y coordinate system (i.e. a rectangular system that is infinite in z-direction) using the Modified Euler’s method and the central difference method.

To exercise the code’s capability, have the program and accompanying scripts run the following. Solution should be in terms of normalized flux shape, i.e. assume the constant related to reactor power (C) is 1. Output should include at least the vectors (x,y,flux) in the region. Use number of subintervals of N=10 and N=100 for comparison of the level of discretization.

A uniform medium of U(50)O2 at 10 g/cc density. The x and y extents are -5 to 5 cm and -10 to 10 cm, respectively. The boundaries are vacuum. There is a distributed source S(x,y)=D*[Ψ(y)*cos(x/5*pi)+ Χ(x)*cos(y/10*pi)], where ϕ(x,y)= Χ(x)* Ψ(y). Assume there is no multiplication.

A two-region problem. In addition to the problem listed in 1, add a 2 cm thick layer of nickel at 95% theoretical density surrounds the UO2. The boundaries are vacuum. The distributed source remains the same and is only located in the UO2 region. Assume there is no multiplication.

Plot the results for each problem. Both discretization levels should be given on the same plot. Since there are analytic solutions for these problems, as well, include that solution on the plot. All plots must be made by the scripts. using .m files