Home > atphysics > Radiation > atgetU0.m

atgetU0

PURPOSE ^

SYNOPSIS ^

function U0=atgetU0(ring)

DESCRIPTION ^

 computes Energy loss per turn in eV .

see also: ringpara atsetcavity atenergy

CROSS-REFERENCE INFORMATION ^

This function calls: This function is called by:

SOURCE CODE ^

0001 function U0=atgetU0(ring)
0002 %
0003 % computes Energy loss per turn in eV .
0004 %
0005 %see also: ringpara atsetcavity atenergy
0006 
0007 %S.Liuzzo modified to use atenergy.m
0008 
0009 [~,~,~,~,U0]=atenergy(ring);
0010 
0011 return
0012 
0013 %
0014 % emass=510998.928/1e6; % electron mass in MeV
0015 %
0016 % a = findcells(ring,'Energy');
0017 % if isempty(a);
0018 %    gamma = 3000/emass;
0019 % else
0020 %    gamma = ring{a(1)}.Energy/(emass*1e6);
0021 % end
0022 %
0023 % dipindex = find(atgetcells(ring,'BendingAngle'));
0024 % lendp = atgetfieldvalues(ring,dipindex,'Length'); %bending magnet length
0025 % theta = atgetfieldvalues(ring,dipindex,'BendingAngle'); %bending angle
0026 % rho = lendp./theta;
0027 %
0028 % I2 = sum(abs(theta./rho));
0029 %
0030 % U0 = 14.085*(gamma*emass/1000)^4*I2*1000.; %eV
0031 %
0032 %
0033 %
0034 %
0035 % return

Generated on Thu 24-Aug-2017 18:47:33 by m2html © 2005