28.11.2014 Views

THE EGS5 CODE SYSTEM

THE EGS5 CODE SYSTEM

THE EGS5 CODE SYSTEM

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

4<br />

z<br />

6<br />

Vac<br />

11<br />

5<br />

Pb<br />

6<br />

5<br />

Air<br />

7<br />

4<br />

9 10<br />

12<br />

Air<br />

Air<br />

8<br />

Vac Vac Vac<br />

7<br />

3<br />

11<br />

3<br />

Air<br />

8<br />

Pb<br />

9<br />

10<br />

2<br />

2<br />

Cu<br />

1<br />

1<br />

e -<br />

Vac<br />

x<br />

Figure 4.1: Diagram used with UCBEND (not to scale).<br />

V = V 0 , (4.4)<br />

W = (W 0 − αU 0 )F ,<br />

where<br />

F = unit vector renormalization factor<br />

= (1 + α 2 ) −1/2 . (4.5)<br />

The following code listing, which pertains only to that HOWFAR section relating to Region 4, should<br />

be fairly self-explanatory (Note that USTEP has been limited to 0.1 cm in this example, but this<br />

can be changed by the user).<br />

else if (irl.eq.4) then<br />

if (ifield.ne.0.and.iq(np).ne.0) then<br />

psq=e(np)*e(np)-RMSQ<br />

if (psq.lt.0.0) psq=1.0E-9<br />

p=sqrt(psq)<br />

195

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!