Hands On Accelerator Physics Using MATLAB®, 1e Vol
Hands On Accelerator Physics Using MATLAB®, 1e Vol
Exam (elaborations)
Hands On Accelerator Physics Using MATLAB® 1st Edition By Volker Ziemann (Solution Manual)
8 views 0 purchase
Course
Hands On Accelerator Physics Using MATLAB®, 1e Vol
Institution
Hands On Accelerator Physics Using MATLAB®, 1e Vol
Hands On Accelerator Physics Using MATLAB®, 1e Volker Ziemann (Solution Manual)
Hands On Accelerator Physics Using MATLAB®, 1e Volker Ziemann (Solution Manual)
, 1 Introduction
The material com-prises of all MATLAB code and the online appendices from the
book. Note that Appendix B.5 contains discussions of the code examples. Since
the solutions, dis-cussed in this manual, are based on the code examples from the
book, it is strongly recommended to download the additional material, which is
freely available from the web site mentioned above.
2 For Chapter 2
For the design of the beam lines in the first few exercises, it is convenient to encap-
sulate most of the script layout.m in a separate function, such that it can be used
repeatedly without excessive copying.
% layout_function.m
function vvpos=layout_function(beamline)
hold on
nlines=size(beamline,1); % number of lines
nele=sum(beamline(:,2))+1; % number of elements
vvpos=zeros(3,nele); % element positions
f=fopen(’layout.scad’,’w’); % open output file for 3D view
vv=[0;0;0]; % x,y,z or origin
ww=eye(3); % orientation of tripod
ic=1; % element counter
for line=1:nlines % loop over input elements
for seg=1:beamline(line,2) % loop over repeat-count
v0=vv; w0=ww; % remember previous point
ic=ic+1;
switch beamline(line,1)
case {1,2,5,7} % drift, quadrupole, solenoid
dv=[0;0;beamline(line,3)];
dw=eye(3);
case 4 % sector dipole
phi=beamline(line,4)*pi/180; % convert to radians
if abs(phi)>1e-7
rho=beamline(line,3)/phi; % bending radius
dv=[rho*(cos(phi)-1);0.0;rho*sin(phi)]; % sagitta
dw=wmake(0,-phi,0);
dw2=wmake(0,-phi/2,0); % for 3D renderer only
else
dv=[0;0;beamline(line,3)];
dw=eye(3);
end
4
The benefits of buying summaries with Stuvia:
Guaranteed quality through customer reviews
Stuvia customers have reviewed more than 700,000 summaries. This how you know that you are buying the best documents.
Quick and easy check-out
You can quickly pay through credit card or Stuvia-credit for the summaries. There is no membership needed.
Focus on what matters
Your fellow students write the study notes themselves, which is why the documents are always reliable and up-to-date. This ensures you quickly get to the core!
Frequently asked questions
What do I get when I buy this document?
You get a PDF, available immediately after your purchase. The purchased document is accessible anytime, anywhere and indefinitely through your profile.
Satisfaction guarantee: how does it work?
Our satisfaction guarantee ensures that you always find a study document that suits you well. You fill out a form, and our customer service team takes care of the rest.
Who am I buying these notes from?
Stuvia is a marketplace, so you are not buying this document from us, but from seller tutorsection. Stuvia facilitates payment to the seller.
Will I be stuck with a subscription?
No, you only buy these notes for $12.49. You're not tied to anything after your purchase.