![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() |
![]() ![]() |
Creating a new cell:
Command | Short description |
---|---|
CELL-IDENTIFIER
| Provides a short description to the cell |
DEFINE
| Sets local parameters for use with ROWS |
DIELECTRICUM
| Enters a dielectric slab (do not use !) |
FIELD-MAP
| Reads a finite element field map |
OPTIONS
| Plotting of a layout etc |
PERIODICITY
| Makes the cell periodic |
PLANE
| Enters a plane |
RESET
| Cancels part of the cell description |
ROWS
| Header for the list of wires |
SAVE-FIELD-MAP
| Writes a field map in binary format |
SOLIDS
| Enters solid volumes for use with field maps |
TUBE
| Enters a tube surrounding the wires |
WRITE
| Writes a compact format dataset |
Retrieving a cell from a dataset:
Command | Short description |
---|---|
GET
| Retrieves a compact cell description |
READ-FIELD-MAP
| Reads a binary field map |
Additional information on:
The string can be retrieved by means of the GET_CELL_DATA procedure.
Format:
CELL-IDENTIFIER string
Example:
CELL-ID "DC1 central cell"
As usual, the current value of a variable is displayed if no new value is provided. All variables are displayed if arguments are absent altogether.
Do not confuse DEFINE with Global: DEFINE defines local variables for the cell section. Global defines variables that you can use anywhere. Expressions using local variables and the loop-variable are evaluated automatically. Expressions in terms of global variables have to be enclosed by curly brackets to obtain substitution.
Format:
DEFINE variable value
Example:
DEF VP_1=1000 DEF VP_2=2000 DEF R_1=5000 DEF R_2=5000 DEF VP_BETWEEN=(VP_1*R_2+VP_2*R_1)/(R_1+R_2) DEF VP_BETWEEN
A simple resistor chain, the last line displays the value. You could in principle also enter the whole formula in the ROWS lines.
Global resistor=5000 define r_1 {resistor} define r_2 {resistor}
The global variable RESISTOR is copied to the local variables R_1 and R_2. Note the use of curly brackets.
Additional information on:
+-----------------------------------------------------------------+ | The current version of Garfield only takes dielectrics into | | account in a small number of configurations. It is much better | | to use a finite elements program to generate a field map and to | | read such a map in with the FIELD-MAP instruction. | +-----------------------------------------------------------------+
Adds a slab of dielectric material to your cell. The slab extends from -infinity to +infinity in one direction and has a range you choose in the other.
x-Slabs and y-slabs of dielectric material are allowed to overlap provided they have the same dielectric constant. Slabs in one direction are not allowed to overlap, even if they have the same dielectric constant.
Dielectrica may be located amidst the wires but the must be inside the equipotential planes, if there are any in your cell.
Dielectrica slow the program down by a significant amount.
Format:
DIELECTRICUM {X-RANGE|Y-RANGE} min max EPSILON eps
Example:
DIELECTRICUM X -10 10 EPS 5
This slab of dielectric material covers the -10 < x < 10 part in x and the whole of y. The dielectric constant for the material is chosen to be 5.
Additional information on:
Currently, field maps in the format generated by Maxwell Parameter Extractor 2D and 3D as well as by Tosca and Maxwell Field Simulator 2D and 3D can be read. Interfaces for files produced by other such programs can be added (please contact the author).
When you read a field map, any wire, plane, periodicity, dielectric medium and magnetic field that you entered sofar is deleted. Also field map components read with earlier FIELD-MAP commands are deleted.
Reading large field maps is time consuming. To save time, you can after having read a set of external field maps with FIELD-MAP, write a binary field map with SAVE-FIELD-MAP and read it in with READ-FIELD-MAP. Such field maps are much smaller and much faster to read in, but are not portable between computer systems.
Also the optimisation section has a FIELD-MAP command. The field maps entered in the cell section serve as main field, i.e. the field map replaces the field due to wires and planes, while the field maps entered in the optimisation section are used for the computation of the background field. The two field maps share (for the moment) the same storage and can therefore not be used at the same time.
The FIELD-MAP command can also read magnetic fields computed by finite element programs. For the moment, there is no experience with such fields.
Format:
FIELD-MAP [FILES [contents_1] file_1 [LABEL label_1] ... [contents_2] file_2 [LABEL label_2] ... ... [contents_n] file_n [LABEL label_n] ... [format] ] ... [DRIFT-MEDIUM {SMALLEST-EPSILON | ... SECOND-SMALLEST-EPSILON | ... n | ... SECOND-LARGEST-EPSILON | ... LARGEST-EPSILON | ... epsilon}] ... [NOT-X-PERIODIC | X-PERIODIC | ... X-MIRROR-PERIODIC | X-AXIALLY-PERIODIC] ... [NOT-Y-PERIODIC | Y-PERIODIC | ... Y-MIRROR-PERIODIC | Y-AXIALLY-PERIODIC] ... [NOT-Z-PERIODIC | Z-PERIODIC | ... Z-MIRROR-PERIODIC | Z-AXIALLY-PERIODIC] ... [LINEAR | QUADRATIC | CUBIC] ... [DELETE-BACKGROUND | KEEP-BACKGROUND] ... [WINDOW xmin ymin [zmin] xmax ymax zmax] ... [Z-RANGE zmin zmax] ... [PLOT-MAP | NOPLOT-MAP] ... [NOHISTOGRAM-MAP | HISTOGRAM-MAP] ... [RESET]
Example:
&CELL field-map files "e_field.arg" "potential.arg" "epsilon.arg" ... drift-medium second-smallest ... x-periodic
(Maxwell Parameter Extractor 2D has been used to generate maps of the electric field, the potential and the dielectric constant. These maps are read in and the medium with the 2nd smallest dielectric constant is declared to be the drift medium. The map is also declared to be periodic in the x direction.)
Additional information on:
This command is executed immediately and you may - with caution - replace some of the elements of the description after issuing the command.
Format:
GET file [member]
Examples:
GET 'disk$zp:[veenhof.garfield]cell.dat' GET lib
(The last example will presumably take the first member of type CELL from the library with file name LIB. Such libraries may contain members also of other types - only members of type CELL will be considered by GET. On Vax, the file name of the last example would be expanded to LIB.DAT.)
Additional information on:
The 3 arguments form a vector that indicates the direction in which gravity pulls on the wire. Only the direction of the vector is used, not its normalisation.
The default setting is (0,0,1) i.e. gravity works along the wires.
Format:
GRAVITY x y z
Example:
gravity 0 0 1
This makes the wires run vertical, the default. In this situation, gravity does not produce a wire sag.
Format:
OPTIONS [NOLAYOUT | LAYOUT] ... [NOCELL-PRINT | CELL-PRINT] ... [NOTISOMETRIC | ISOMETRIC] ... [NOWIRE-MARKERS | WIRE-MARKERS] ... [NOCHARGE-CHECK | CHARGE-CHECK]
Example:
OPT C-PR
Requests a summary of the elements present in the cell.
Additional information on:
Format:
PERIODICITY {X|Y|PHI} = length
Example:
PERIOD X=1
Additional information on:
Note that one is not allowed to put a wire at the centre of a circular plane. In general, wires inside a circular plane, whether at the centre or not, are better dealt with by TUBE geometries.
Format:
PLANE {X|Y|R|PHI} coordinate ... [V potential] ... [LABEL label]
Examples:
PL X=-1, V=1000 PLANE PHI 30
Additional information on:
This command is executed immediately. Once the command has completed, you can use the FIELD-MAP command to modify for instance the selection of drift medium,
READ-FIELD-MAP has the same side effects as FIELD-MAP, i.e. the command deletes any wires, planes, periodicities, dielectric medium and magnetic field that may have been entered before the command is issued.
Reading binary field maps is, for most field map formats, much faster than reading the original files - but binary field maps are not portable. Files to be read with READ-FIELD-MAP must have been written on the same computer system.
Format:
READ-FIELD-MAP file
Example:
&CELL cell-id "Micromegas" Global path=`/afs/cern.ch/exp/compass/scratch/d02/megas/Maxwell/mic3.pjt/` Call inquire_file(path/`1000_400_0.1.bin`,exist) If exist Then read-field-map {path/`1000_400_0.1.bin`} Else field-map files potential "{path}/V_1000_400_0.1.arg" ... e-field "{path}/E_1000_400_0.1.arg" ... x-periodic y-mirror-periodic Endif
If a binary field map exists, the map is read. Otherwise the field maps are read in their original format.
Format:
RESET [COORDINATES] ... [DIELECTRICA] ... [DEFINITIONS] ... [FIELD-MAP] ... [SOLIDS] ... [PERIODICITIES] ... [PLANES] ... [ROWS or WIRES]
Example:
RESET
Additional information on:
The coordinate system in which the wire position is specified can either be Cartesian or polar. The wires in a cell that has a tube, are listed in Cartesian coordinates. Polar coordinates will be assumed if you put the keyword POLAR after ROWS, if you have already entered a plane in polar coordinates and if you have already entered a phi periodicity. Otherwise Cartesian coordinates are assumed. Once a coordinate system has been selected in the cell section, it has to be used throughout the section.
ROWS is a multi-line command because chambers sometimes contain many wires. You may enter one wire per line, but if your cell contains regularly spaced series of wires, you may prefer to enter these as a single "row" in which at least the position, but possibly also the other properties, depends on the so-called loop-variable I which automatically assumes a series of values.
One may use control structures (If_block, If_line, Do_loop, Call) in the listing of wires. Please keep in mind that a blank line must be present to signal the end of the list, whether typed by hand or generated with a loop.
Format of the whole command:
ROWS [CARTESIAN | POLAR | TUBE] row ... row (blank line)
Format of the rows:
label n diameter x_wire y_wire ["-> &CELL -> ROWS -Global variables, the Do_loop and an If_block to generate a spiral. Do not forget the blank line to mark the end of the list of rows !Additional information on:
This command is executed immediately, unlike the WRITE command which is only executed when the section is left. The field map must therefore be present (via a FIELD-MAP or a READ-FIELD-MAP) when you issue the SAVE-FIELD-MAP command.
Binary field maps tend to be much smaller than field maps in the original format, and also restoring field maps from binary files is usually much faster. However, binary files are not portable between computer systems.
Format:
SAVE-FIELD-MAP file
Example:
See READ-FIELD-MAP
Entering these volumes is not mandatory because their presence can in most cases be detected from the dielectric constant in the field map. Entering the solids is useful for the following reasons:
SOLIDS is a multi-line command. Each line after SOLIDS describes one volume. The end of the list is signalled by a blank line.
Only a few shapes are currently provided, other shapes can be added on request - contact the author.
Format:
SOLIDS {CYLINDER | BOX | SPHERE | HOLE} parameters ... (blank line)
Example:
solids For x From -0.02 Step 0.02 To 0.02 Do For y From -0.02 Step 0.02 To 0.02 Do hole centre {x,y} +0.0110 dir 0 0 1 ... half-lengths 0.0100 0.0100 0.0010 ... upper-radius 0.0050 lower-radius 0.0050 ... conductor hole centre {x,y} +0.0050 dir 0 0 1 ... half-lengths 0.0100 0.0100 0.0050 ... upper-radius 0.0040 lower-radius 0.0020 ... dielectric hole centre {x,y} -0.0050 dir 0 0 1 ... half-lengths 0.0100 0.0100 0.0050 ... upper-radius 0.0020 lower-radius 0.0040 ... dielectric hole centre {x,y} -0.0110 dir 0 0 1 ... half-lengths 0.0100 0.0100 0.0010 ... upper-radius 0.0050 lower-radius 0.0050 ... conductor Enddo Enddo
This represents an array of 9 double-tapered cylindrical holes in a copper clad foil of dielectric material - similar to a GEM foil.
![]() Two holes, on the left with N=2, on the right with N=20. Both are drawn with outlining. |
![]() A set of cylinders, partially hiding each other. Each cylinder is drawn with 50 panels, and 20 colour shades are used. |
![]() A set of boxes that are intersecting each other. Shown using the default colour density table, with outlining. |
![]() A sphere with 50 by 50 panels, shown with a colour table of 50 elements. |
Additional information on:
The main difference between a cell described in polar coordinates with a plane at constant r and a tube with radius r, is that one can put a wire at the centre of a tube, but not at the centre of a cell with a circular plane.
The potential for a square tubes is expensive compared to the potential used for a cell with 4 planes.
The coordinate system used when you have a tube is Cartesian.
A tube can be combined with a phi periodicity, but not with other periodicities nor with planes.
Format:
TUBE [RADIUS r] ... [VOLTAGE v] ... [EDGES n] ... [LABEL label]
Examples:
tube r=2, v=2000 tube hexagonal r=5
In the first example, a circular tube (EDGES is not specified, one could also have added CIRCLE or EDGES=0) is defined with a radius of 2 cm and at a potential of 2000 V. In the second example, the tube is hexagonal and with radius 5 cm. This tube is grounded.
Additional information on:
This kind of dataset is not meant ot be human-readable and should not be edited. The format is chosen to enable a fast restore of the data. Also the capacitance matrix and the chargees do not have to be computed anew, thus saving significant computation time if the cell contains a large number of wires.
The writing operation takes place when the section is left, not when the WRITE command is issued. The statement can appear at any place in the cell section.
Compact format cell datasets are written in a machine independent format - files written on one type of computer can be read on other computers.
Field maps are, because of their large size, not saved by the WRITE statement. If reading them with the FIELD-MAP command takes too much time, and if the size of the full field maps is a point of concern, then consider using SAVE-FIELD-MAP and READ-FIELD-MAP, which perform a binary (i.e. non-portable) save and retrieve.
Format:
WRITE DATASET file [member] [REMARK remark]
Examples:
WR DATA cell.dat cell1 REM "Some cell" WR cell.dat cell1 "Some cell"
(These two examples are equivalent, they show that the keywords DATA and REMARK are not needed if the parameters are in the right order.)
Additional information on:
Formatted on 0100-08-24 at 22:37.