11.07.2015 Views

ZGOUBI USERS' GUIDE - HEP

ZGOUBI USERS' GUIDE - HEP

ZGOUBI USERS' GUIDE - HEP

SHOW MORE
SHOW LESS
  • No tags were found...

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

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

4.4 Optical Elements and related numerical procedures 115@""qTOSCA: 2-D and 3-D Cartesian or cylindrical mesh field mapTOSCA is dedicated to the reading and treatment of 2-D or 3-D Cartesian or cylindrical mesh field maps as delivered bythe TOSCA magnet computer code standard output.The total number of field data files to be read is given by the parameter ¤that appears in the data list following thekeyword. Each file contains the field components , , on an , ) mesh at ¤a given coordinate. (§for 2-D maps, and in this case and are assumed zero all over the map 7 . For 3-D maps with mid-plane symmetry,– ¡ Ž ¡¡|• – ¡ Ž ¡, and thus, the first data file whose name follows in the data list is supposed to contain the median plane field¤dŽ “\(assuming and Ž ¡ – ý\), while the next file(s) contain the next maps in increasing Z order. For arbitrary3-D maps (and in particular, contrary to what precedes without mid-plane symmetry assumption), following MOD value,see below, the total number of maps (whose names follow in the data list) is ¡ , and map number ? ¤Œ @ A?¤(one.q is the †\The field map data files should be formatted following the FORTRAN reading sequence below.DO 1 K = 1, KZOPEN (UNIT = NL, FILE = FNAME, STATUS = ‘OLD’ [,FORM=’UNFORMATTED’])DO 1 J = 1, JYDO1 I = 1, IXIF (BINARY) THENREAD(NL) Y(J), Z(K), X(I), BY(J,K,I), BZ(J,K,I), BX(J,K,I)ELSEREAD(NL,100) Y(J), Z(K), X(I), BY(J,K,I), BZ(J,K,I), BX(J,K,I)100 FORMAT(1X,6E11.2)ENDIF1 CONTINUE{where, ¤§ (binary files, FNAME must begin with ‘B ’ or ‘b ’, a flag ‘BINARY’ will thus be set to ‘.TRUE.’.A flag MOD determines wether Cartesian or Z-axis cylindrical mesh is used. MOD can take various valuesdepending also on the map data file formatting. (To be documented - see FORTRAN subroutine FMAPW and its entriesFMAPR, FMAPR2.) , Ñ ) is the number of longitudinal (transverse horizontal, vertical) nodes of the 3-D uniform mesh. ForThe field¡|– ¡ • is normalized by means of BNORM in a similar way as in CARTEMES. As well thecoordinates X (and Y, Z with 3-D field maps) is normalized with a X-[Y-,Z-]NORM coefficient (usefull to convert tocentimeters, the working units in zgoubi .¡ ¡ ŽAt each step of the trajectory of a particle inside the map, the field and its derivatives are calculated- in the case of 2-D map, by means of a second or fourth order polynomial interpolation, depending on IORDRE(IORDRE = 2, 25 or 4), as for CARTEMES,- in the case of 3-D map, by means of a second order polynomial interpolation with a U U-point parallelipipedicgrid, as described in section 1.4.4.UEntrance and/or exit integration boundaries between which the trajectories are integrated in the field may be defined, inthe same way as in CARTEMES.7 Use MAP2D in case non-zero úüû , úËý are to be taken into account in a 2-D map.

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

Saved successfully!

Ooh no, something went wrong!