How to define a source in the shape of a spherical shell?

@SophiaVT To have a shell source, you’ll also need to sample the radius in between a minimum and maximum radius. The appropriate PDF for the radius is uniform in r², as explained in arguments here. Thus, your sampling scheme will look something like:

double r_min = ...;
double r_max = ...;
double angle = 2 * M_PI * openmc::prn(seed);
double radius_sq = r_min*r_min + openmc::prn(seed)*(r_max*r_max - r_min*r_min);
double radius = std::sqrt(radius_sq);
particle.r.x = radius * std::cos(angle);
particle.r.y = radius * std::sin(angle);
particle.r.z = 0.0;