END
print
'
How long does it take to enrich enough Uranium to make a nuclear weapon if one already has an enrichment cascade and consistently adds centrifuges to that cascade? The following calculator allows a user to specify the number of centrifuges in the initial cascade, the yearly Separative Work Unit capacity of each centrifuge, and the number of centrifuges added to the cascade per day. From this information, the user is then provided with an estimate of the number of days and years it would take to produce 50kg of highlyenriched (90% U235) Uranium; the amount required for a guntype weapon assembly. In regards to recent events, the user may wish to choose 165 centrifuges as this is the number that Iran claims to have operating in its present enrichment program at the Natanz facility. It should also be noted that P1 centrifuges can be run at 23 kgSWUs per year and that P2 type centrifuges can run up to 5 kgSWUs per year. '
;
print
start_html('Calculate Time'),
hr,
start_form,p,
"How many centrifuges are you starting with? ",
popup_menu(name=>'casc', width=>'25',
values=>['50','100','165','200','400','800','1000','5000','10000'],
default=>'165'),p,
" What is the yearly Separative Work Unit capacity of each centrifuge? ",
radio_group(
name=>'swu',
values=>['1','2','3','4','5','6'],
default=>'5'), ' (kilogram SWUs per year)',p,
#" At what intervals are we adding centrifuges to the cascade? ",
# radio_group(
# name=>'rate',
# values=>['1','7','30'],
# default=>'1'), ' (days)',p,
" How many centrifuges are being added per day? ",
radio_group(
name=>'interval',
values=>['1','2','3','4','5','10','20','50'],
default=>'1'), ' (centrifuges/day)',p,
# "Did you have a particular country in mind? ",
# textfield('country'),p,
"Click to enrich: ",submit(name=>ENRICH),
end_form;
#hr;
if (param()) {
my $cent= param('casc');
my $SWUper=param('swu');
my $rate=1;#param('rate');
#my $country=param('country');
my $int=param('interval');
my $Nf=.00711;
my $Np=.90;
my $Nw=.0025;
my $product=50; #kilograms of uranium
my $feed=$product*($Np/$Nw1)/($Nf/$Nw1);
my $waste=$feed$product;
sub fxn
{
$_[0];
$function=(2*$_[0]1)*log($_[0]/(1$_[0]));
return $function;
}
my $a=&fxn($Nf);
my $b=&fxn($Np);
my $c=&fxn($Nw);
my $SWU= $product*$b+$waste*$c$feed*$a;
my $n = $cent*$SWUper/365;
my $r = $int*$SWUper/365;
my $bplus = (($n.5*$r)+sqrt(($n.5*$r)*($n.5*$r)+4*($r/(2*$rate))*$SWU))/($r/$rate);
my $days1= $bplus;
my $days=to_whole($days1);
#$days=$days/100;
my $years1=$bplus/365*100;
my $years=to_whole($years1);
$years=$years/100;
print ""," It will take " , #em(escapeHTML($country)),
' approximately ',
em(escapeHTML($days)), ' ',
"days ( ", em(escapeHTML($years)), ' ', "years)
to obtain 50 kilograms of highlyenriched Uranium (90% U235).","",p,
# 'cent:', em(escapeHTML($cent)),p,
# 'Swuper:',em(escapeHTML($SWUper)),p,
# 'rate:', em(escapeHTML($rate)),p,
# 'country:',em(escapeHTML($country)),p,
# 'Nf:', em(escapeHTML($Nf)),p,
# 'Np:', em(escapeHTML($Np)),p,
# 'Nw:', em(escapeHTML($Nw)),p,
# 'product:', em(escapeHTML($product)),p,
# 'feed:', em(escapeHTML($feed)),p,
# 'waste:', em(escapeHTML($waste)),p,
# 'a:', em(escapeHTML($a)),p
# 'b:', em(escapeHTML($b)),p
# 'c:', em(escapeHTML($c)),p
# 'SWU:', em(escapeHTML($SWU)),p,
# 'n:', em(escapeHTML($n)),p,
# 'r:', em(escapeHTML($r)),p,
# 'bplus:', em(escapeHTML($bplus)),p,
# 'days:', em(escapeHTML($days)),p,
# 'years:', em(escapeHTML($years)),p,
# hr;
}
print ' For this calculation, we assume that each new centrifuge is being seamlessly added to the cascade in such a way that it will instantaneously contribute to the cumulative separative work capacity. For realworld enrichment programs this would not be the case as cascade design generally dictates specific matching conditions between each stage, centrifuges are often added in groups as smaller cascades, and there are issues with switching the pipes and filling new centrifuges that would further increase the time it would take to integrate and operate new centrifuges. Consequently, this calculation provides a low bound for the time required to enrich 50kg of Uranium to weaponsgrade. Also, we assume that the centrifuge plant is running at a tails assay of .25%.
Resources:
 D.G. Avery and E. Davies, "Uranium Enrichment by Gas Centrifuge," M&B Technical Library, ed. J Gordon Cook, Mills&Boon Limited, London, 1973.
 S Villani, Uranium Enrichment, SpringerVerlag, New York, 1979.
 Uranium SWU Calculator, FAS, Washington DC, 2005.
';
print '
