multigroup diffusion equation in spherical geometry
DESCRIPTION
http://syeilendrapramuditya.wordpress.comNuclear EngineeringReaktor NuklirTRANSCRIPT
http://syeilendrapramuditya.wordpress.com
Nuclear Reactor Theory
Multigroup Diffusion Equation in Spherical geometry
Syeilendra Pramuditya
http://syeilendrapramuditya.wordpress.com
2009
Problem 8A
1/18
http://syeilendrapramuditya.wordpress.com
According to the instruction, this problem should be solved by using the one-group diffusion
equation. To condense the group constants (5 groups to 1 group), we need to calculate the
fluxes for each group again, because the geometry in this problem (spherical) is different from
geometry of previous problem (cylindrical), which means that the geometrical buckling for each
group must be different from previous problem.
The general multi-group neutron diffusion equation is expressed as follow:
()
And, by assuming that we are dealing with a steady state homogenous system, the equations
simplify as follow:
()
First, we need to find the expression of geometrical buckling for spherical geometry, we
introduce the Helmhotz equation as follow:
()
The above equations is actually about the Eigen value problem.
For spherical geometry, the Laplacian takes the form:
()
And by assuming that the system under consideration only depends on radial coordinate, and
does not depend on any angular coordinates, the Laplacian simplifies as follow:
()
And now substitute eq. () to eq. ():
()
Eq. () has the boundary condition of:
2/18
http://syeilendrapramuditya.wordpress.com
()
The general solution of eq. () is as follow:
()
Where C1 and C2 are constants, the second term of the above equation becomes infinity as r
approaches zero, therefore, C2 should be zero, then:
()
Applying the boundary condition, eq. ():
()
Therefore, B should be:
()
Therefore, the solutions of this Eigen value problem are as follow:
()
()
The geometrical buckling is then defined as the fundamental Eigen value of the Laplace
operator, which is when n = 1:
()
C1 in eq. () is the normalization factor for flux, and can be calculated from reactor power (1000
MWt), as follow:
()
()
3/18
http://syeilendrapramuditya.wordpress.com
Substitute eq. () and () to eq. ():
()
()
By using the method of Integral by Parts:
()
()
()
()
As r approaching zero:
()
Therefore:
()
Therefore, the flux distribution can be calculated analytically by using eq. (), (), and (), and the
results are as follow:
r (cm) Flux
0 1.32823E+14
4/18
http://syeilendrapramuditya.wordpress.com
25 1.29576E+1450 1.20121E+1475 1.05283E+14
100 8.63406E+13125 6.48949E+13150 4.27057E+13175 2.15143E+13200 2.87349E+12
0
Problem 8B
First, the removal cross sections for each group are calculated as follow:
()
And the extrapolation distance for each group are calculated as follow:
()
d[1] = 5.3280000000E+00 cm
d[2] = 2.1312000000E+00 cm
d[3] = 1.9180800000E+00 cm
d[4] = 1.7049600000E+00 cm
d[5] = 5.1148800000E-01 cm
And geometrical buckling for each group is calculated as follow:
5/18
http://syeilendrapramuditya.wordpress.com
()
B[1] = 2.3410106613E-04
B[2] = 2.4156445856E-04
B[3] = 2.4207465940E-04
B[4] = 2.4258647831E-04
B[5] = 2.4548288893E-04
Then the fluxes for each group are calculated as follow:
()
()
()
()
()
The results are as follow:
flux[1] = 1.4855100217E+01 #/cm2.s
flux[2] = 6.0866413556E+00 #/cm2.s
flux[3] = 5.9419121579E-01 #/cm2.s
flux[4] = 3.4902315167E-03 #/cm2.s
flux[5] = 5.8169382911E-08 #/cm2.s
And, by assuming that ,
()
One group constants are calculated as follow:
6/18
http://syeilendrapramuditya.wordpress.com
()
()
()
()
The result of k-eff (1g) is slightly different from k-eff (5g), this is caused by error from group
constants condensation process.
Problem 8C
The numerical method to solve this problem consists of two coupled iteration schemes:
1. Inner iteration to calculate the neutron flux
2. Outer iteration to calculate the keff, which is performed after the inner iteration is
numerically converged
This coupled equation system to calculate keff and the corresponding flux is known as the power
iteration method.
1. The Inner Iteration: Flux Calculation
The one-group neutron diffusion equation in a homogenous system is expressed as follow:
()
In an angular-independent spherical coordinate, eq. () takes the form as follow:
()
()
7/18
http://syeilendrapramuditya.wordpress.com
For r = 0, the second term in the left hand side of eq. () will become infinity, to handle this
problem, we will use the L’Hospital Theorem:
()
Therefore, we will divide eq. () into two parts:
()
And,
()
With boundary conditions as follow:
()
Next, we will use the central finite difference approximation:
()
()
Substitute eq. () to eq. ():
()
By using the principle of symmetry, eq. () becomes as follow:
()
By rearranging the terms, we will get:
()
Now, substitute eq. () and eq. () to eq. ():
()
8/18
http://syeilendrapramuditya.wordpress.com
By rearranging the terms, we will get:
()
Therefore, eq. () and () will be used in the inner iteration to evaluate the flux distribution
numerically. The inner iteration is continued until the error in flux decreases below some
specified amount:
()
Note that eq. () and () are known as the Jacobian Iteration Scheme, we can improve the rate of
convergence by employing the Gauss-Siedel Iteration Scheme to eq. ():
()
We can improve the rate of convergence even further by employing the Successive over
Relaxation (SOR) scheme:
()
Where is the SOR constant, and unique for each equation system .
2. The Outer Iteration: k-eff Calculation
First, we will re-write eq. () as follow:
()
()
()
We do not really know the source term, , since it involves the flux itself, hence, we must
make an initial estimate of source term, keff, and flux to start the calculation:
()
Next, we evaluate the flux by using these initial estimations, and employing the inner iteration
scheme, which are eq. () and (), that is to solve the following equation:
()
9/18
http://syeilendrapramuditya.wordpress.com
Once the inner iteration converged, we will get the new flux distribution, . By using this
newly calculated flux, then we can generate improved estimates of source:
()
As the iteration number becomes large, it is expected that we eventually will get the true Eigen
function of flux, which satisfies eq. (). The keff is defined as the ratio of the number of neutrons
in two consecutive fission generations, hence, by using eq. (), keff can be evaluated as follow:
()
By performing the volume integration to eq. (), we will get:
()
Recognizing that , and make use of eq. (), we can re-write eq. () as follow:
()
Notice that by scaling the source term in eq. () and () by a factor of (1/keff) in each iteration, we
prevent the numerical overflow or underflow and assure that this iteration scheme will stable
and converge. The outer iteration is continued until the error in keff and/or S decreases below
some specified amount:
()
()
Therefore, eq. () and () are the algorithmic basis of the outer iteration to determine keff.
The flowchart of this power iteration method is shown below:
10/18
http://syeilendrapramuditya.wordpress.com
The Power Iteration Method
After the iteration converged, we must normalize the flux to the reactor power (1000 MWt), by
using eq. () and ():
()
11/18
http://syeilendrapramuditya.wordpress.com
Integral in the above equation is solved by using the Trapezoidal Method for numerical
integration:
()
Therefore the normalization factor for the flux is as follow:
()
To perform this numerical calculation, I developed a code based on the Pascal language, please
refer to the appendix section at the end of this report.
From analytical calculation, we have these data:
The outer iterations were then performed by employing two kinds of convergence criteria:
And here are some parameters used in the calculation:
maximum error for flux calculation: 1E-6
maximum error for source calculation: 1E-6
maximum error for k-eff calculation: 1E-6
maximum inner iteration: 10000
maximum outer iteration: 10000
The results are as follow:
Table 1. Calculation Results
Mesh Width Error TypeTotal
IterationOuter
Iteration
Average Inner
Iterationcalculated keff Difference* (%)
12/18
http://syeilendrapramuditya.wordpress.com
residual 4830 332 14.55 1.16456841772010 0.026427372
residual 12877 337 38.21 1.16491056028794 0.002944209
residual 48124 335 143.65 1.16485925288219 0.001460328
relative 14498 10000 1.45 1.16456721274325 0.026530814
relative 22540 10000 2.25 1.16490671885187 0.002614438
relative 57789 10000 5.78 1.16483730750576 0.003148314
*Relative difference from analytical keff
As shown in Table 1, by using relative error, it is very difficult to reach numerical convergence
with the accuracy for keff calculation of 10-6, even up to outer iteration of 10000, it has not
converged yet. It is found that the best result was achieved when we use mesh size of
, and maximum residual error of 10-6, which only produce relative difference from
analytical keff of 0.001460328%, as shown in the third row of Table 1.
Neutron flux distribution calculated with numerical method is shown below:
This result is almost identical to that from analytical solution.
Appendix: The Code
program spherical_diffusion;
uses crt;
var
file1:text;
13/18
http://syeilendrapramuditya.wordpress.com
i,nr,iter_in,itermax_in,iter_total:integer;
konvergen,conv_source:boolean;
radius,dr,sigma_a,D,error,alpha,errmax_flux:real;
FluxOld,FluxNew:array[0..1000] of real;
Sold,Snew:array[0..1000] of real;
nusigma_f,sum1,sum2,kold,knew,err_source,errmax_source,err_k:real;
errmax_k,sigma_f,fluxnorm,volume,power,dummy1:real;
iter_out,itermax_out:integer;
function calculate_center(a,b,c,d,e:real):real;
begin
calculate_center:=(a*sqr(b)/(6*a+c*sqr(b)))*(6*d/sqr(b)+e/a);
end;
function calculate_region(a,b,c,d,e,f,g:real):real;
begin
calculate_region:=(a*sqr(b)/(2*a+c*sqr(b)))*((d+e)/(sqr(b))+(d-e)/(g*sqr(b))+f/a);
end;
begin
clrscr;
assign(file1,'out.txt');
rewrite(file1);
{preparing all required data}
alpha:=0;
radius:=204.3299897447;
sigma_a:=4.5948564225E-02;
D:=2.0317144072;
errmax_flux:=1E-6;
errmax_source:=1E-6;
errmax_k:=1E-6;
itermax_in:=10000;
itermax_out:=10000;
nusigma_f:=5.4083863335E-02;
sigma_f:=nusigma_f/2.5;
volume:=(4/3)*PI*radius*radius*radius;
power:=1E+9;
dr:=2.8812956642;
nr:=round(radius/dr);
{boundary condition}
FluxNew[nr]:=0;
FluxOld[nr]:=0;
Sold[nr]:=0;
Snew[nr]:=0;
{initial guess}
for i:=0 to nr-1 do
begin
FluxOld[i]:=1;
FluxNew[i]:=1;
14/18
http://syeilendrapramuditya.wordpress.com
Sold[i]:=1;
Snew[i]:=Sold[i];
end;
kold:=1;
writeln('Calculation started...');
writeln;
iter_total:=0;
{outer iteration}
iter_out:=0;
repeat
begin
inc(iter_out);
conv_source:=true;
{inner iteration}
iter_in:=0;
repeat
begin
inc(iter_in);
konvergen:=true;
inc(iter_total);
{evaluete flux}
FluxNew[0]:=calculate_center(D,dr,sigma_a,FluxOld[1],Sold[0]/kold);
for i:=1 to nr-1 do
begin
{Jacobian}
FluxNew[i]:=calculate_region(D,dr,sigma_a,FluxOld[i+1],FluxOld[i-1],Sold[i]/kold,i);
{Gauss-Siedel}
{FluxNew[i]:=calculate_region(D,dr,sigma_a,FluxOld[i+1],FluxNew[i-1],Sold[i]/kold,i);}
end;
{SOR subroutine}
for i:=0 to nr-1 do
begin
FluxNew[i]:=FluxNew[i]+alpha*(FluxNew[i]-FluxOld[i]);
end;
{convergence test for flux}
for i:=0 to nr-1 do
begin
error:=abs(FluxNew[i]-FluxOld[i])/FluxNew[i];
if (error > errmax_flux) then konvergen:=false;
end;
{update flux}
for i:=0 to nr do FluxOld[i]:=FluxNew[i];
end;
15/18
http://syeilendrapramuditya.wordpress.com
until (konvergen=true) OR (iter_in > itermax_in);
{convergence test for source}
for i:=0 to nr-1 do
begin
Snew[i]:=nusigma_f*FluxNew[i];
err_source:=abs((Snew[i]-Sold[i])/Snew[i]);
if (err_source>errmax_source) then conv_source:=false;
end;
sum1:=0;
sum2:=0;
for i:=0 to nr do
begin
sum1:=sum1+Sold[i];
sum2:=sum2+Snew[i];
end;
{convergence test for k-eff}
knew:=kold*(sum2/sum1);
err_k:=abs((knew-kold)/knew);
{err_k:=abs((knew-1.1648762639)/1.1648762639);}
{update source and k-eff}
for i:=0 to nr do Sold[i]:=Snew[i];
kold:=knew;
end;
until (iter_out=itermax_out) or ((conv_source=true) and (err_k<=errmax_k));
{flux normalization to reactor power}
sum1:=0;
for i:=0 to nr-1 do
begin
{trapezoid method for numerical integration}
sum1:=sum1+(dr/2)*(FluxNew[i]*sqr(i*dr)+FluxNew[i+1]*sqr((i+1)*dr));
end;
fluxnorm:=(3.204E-11)*sigma_f*4*PI*sum1;
fluxnorm:=(1E9)/fluxnorm;
{saving results to file}
append(file1);
writeln(file1,'k-eff = ',knew);
writeln(file1);
writeln(file1,' r (cm) Flux');
for i:=0 to nr do
begin
FluxNew[i]:=FluxNew[i]*fluxnorm;
append(file1);
writeln(file1,i*dr:10:3,' ',FluxNew[i]:10:0);
end;
16/18
http://syeilendrapramuditya.wordpress.com
close(file1);
writeln('Calculation finished! result saved to out.txt');
readln;
end.
Sample output:
k-eff = 1.1645684177
r (cm) Flux
0.000 1.32989E+14
5.763 1.32811E+14
11.525 1.32276E+14
17.288 1.31388E+14
23.050 1.30151E+14
28.813 1.28570E+14
34.576 1.26654E+14
40.338 1.24412E+14
46.101 1.21854E+14
51.863 1.18992E+14
57.626 1.15841E+14
63.389 1.12414E+14
69.151 1.08730E+14
74.914 1.04804E+14
80.676 1.00655E+14
86.439 9.63036E+13
92.201 9.17690E+13
97.964 8.70725E+13
103.727 8.22357E+13
109.489 7.72808E+13
115.252 7.22303E+13
121.014 6.71068E+13
126.777 6.19334E+13
132.540 5.67328E+13
138.302 5.15278E+13
144.065 4.63408E+13
149.827 4.11941E+13
155.590 3.61091E+13
161.353 3.11070E+13
167.115 2.62079E+13
172.878 2.14315E+13
178.640 1.67962E+13
184.403 1.23195E+13
190.166 8.01799E+12
195.928 3.90682E+12
201.691 0.00000E+00
17/18
http://syeilendrapramuditya.wordpress.com
References
1. Duderstadt, James J. and Louis J. Hamilton. (1976), Nuclear Reactor Analysis, John Wiley
& Sons, Inc, New York.
2. DeVries, Paul L., (1993), A First Course in Computational Physics, John Wiley & Sons, Inc,
New York.
3. Press, William H., Brian P. Flannery, Saul A. Teukolsky, William T. Vetterling. (1989),
Numerical recipes in Pascal, Cambridge University Press, New York.
4. http://en.wikipedia.org/wiki/Laplacian
5. http://en.wikipedia.org/wiki/Integrate_by_parts
6. http://en.wikipedia.org/wiki/Finite_difference
7. http://en.wikipedia.org/wiki/Numerical_integration
8. http://en.wikipedia.org/wiki/L'Hôpital's_rule
18/18