&OPTIMISE: FORCES
Requests a fast calculation in which only the force acting
on the wire in its nominal position is used to compute the
sag.
The wire sag that results from such a force is parabolic,
since this it results from an elastic elongation. The shape
is not a hyperbolic cosine, this would be the case of a
freely hanging wire that is longer than the distance between
the two (elongation negligible).
This approach is incorrect if the wire is nominally in an
almost stable position while there are substantial forces
acting on the wire in neighbouring positions.
Requests a calculation of the wire sag profiles, computing
the forces at each wire position. The forces are computed
by interpolation in a grid (see SCANNING-GRID) around the
wire at the points of which the forces are explicitely
calculated.
Computing this grid of forces is potentially time consuming
since it involves solving the capacitance equation for each
wire position.
When the DETAILED option is active, the program tries to
compute a sag profile for each wire. This calculation needs,
as one of the parameters, the force acting on the wire as
function of the wire displacement. Since it would not be
practically possible to compute this force each time
explicitely (i.e. by solving the capacitance matrix), an
interpolation is performed on a grid (the interpolation
order can be chosen with INTERPOLATION-ORDER).
The boundaries of the grid are automatically computed from
both the expected sag in the parabolic approximation and the
largest area around each wire that is free of cell elements.
(One can also set the area manually with SCANNING-AREA.)
The number of grid lines can be controled with the SCANNING-GRID
option. Numbers can be specified separately for x and y and
should be in the range 2 to MXGRID.
[Default is 11 for both nx and ny.]
By default, the range of wire shifts for which the forces are
computed, is selected automatically by enlarging by a factor
2 the 0th order estimates of the shift, and restricting this
to the largest area around the wire which is free of other
cell elements. This behaviour can be selected explicitely also
by specifying FIRST-ORDER.
If the scaling factor 2 doesn't appear suited, then use the
keyword FIRST-ORDER-ENLARGED-BY followed by a scaling factor
of your choice.
If the wire movements are expected to be very large, then one
may wish to select LARGEST which will set the scanning area to
the largest area around each wire which is free from other cell
elements.
You may also manually set the scanning area by giving 4 numeric
arguments: a lower x, a lower y, an upper x and an upper y which
together describe a rectangular area relative to the nominal
position of the wire under consideration. Note that a manually
set scanning area is not checked to be located within the largest
area free of other cell elements. The option is convenient for
making plots of the force variations.
The differential equation that governs the wire sag is
numerically solved using a multiple shooting method in
which each shot is traced with a Runge-Kutta-Nystroem
method, and in which the boundary and matching conditions
are minimised with a Newton method with Broyden rank-1
updates of the derivative matrix.
The number of shots can be chosen by the user and must
be equal to 0, in which case the method becomes a single
shot method.
Also the number of integration steps within each shot
can be set by the user. This parameter must be at least
equal to 1.
See nshot.
This is the order used to interpolate the electrostatic
force table used by the detailed method.
The interpolation is done by interpolating first along
the rows of the table, then the interpolation results,
in both cases by local polynomial interpolation of the
selected order.
The order should be a number larger than or equal to 1,
and small than or equal to the scanning grid size.
By default, the calculation stops if a point of the wire
is found at a position not covered by the SCANNING-AREA,
whether set manually or automatically.
If you select EXTRAPOLATE, then the force on the wire
at such a point, will be computed by extrapolating the
force table.
It is usually a better strategy to pick a SCANNING-AREA
that covers all wire positions - if this is not possible,
then the wire is probably not in a stable position (i.e.
it will move against other electrodes).
Requests iterating over the positions of all SELECTed
wires.
The iteration starts from the nominal position for all
wires, and a set of wire offsets equal to (0,0) except
for those wires for which the user has given an initial
offset.
Then, a loop is started in which
1. for each SELECTed wire, the average sag is computed
assuming the nominal position for this wire and the
position + its current offset for the other wires
2. once all average sags are known, the wire offsets
are updated.
The iteration is stopped when no wire moves by more than
TOLERANCE (convergence), or when the maximum permitted
number of iterations has been reached (iteration stopped).
ITERATE can be used both with the FAST and with the
DETAILED method of calculating wire sags.
Output is only produced from the last iteration provided
convergence has been achieved.
Iteration is done by default when the number of SELECTed
wires is larger than 1. The default maximum number of
iterations is set to 5, which may be insufficient if the
TOLERANCE is set to a very small number, and also in case
of an oscillatory systems. In the latter case it is
preferable to adjust the UPDATE-SCALING-FACTOR.
This parameter enters as convergence criterion for iterations
over all wires (ITERATE option).
In each iteration, the maximum of the differences between the
current and the new wire offsets is computed. When this maximum
drops below TOLERANCE, the iteration is declared to have
converged.
The parameter is by default set to 0.0010 cm (10 micron).
(not yet used)
When performing iterations over all wires (ITERATE option),
there are instable equilibrium situations in which no wire
would moves in its nominal position, but where all wires
move as soon as one wire is slightly displaced.
To deal with such cases, you can manually set the initial
offset of one or more wires.
By default, all wires have an initial offset of (0,0).
The gravitational force on the wire is included in the
sag computation.
This is default.
The electrostatic force on the wire is taken into account
when calculating the wire sag.
This is default.
Prints depending on the setting of FAST/DETAILED either
- FAST: the expected maximum sag or
- DETAILED: the above + the sag profile.
[This is default.]
Plots the sag profiles if the DETAILED option has been selected.
[This is default.]
When this option is selected, the wire sag is stored in global
variables:
- FAST: the maximum sag from the parabolic approximation is
stored as SHIFT_X_n and SHIFT_Y_n, where n is the wire number.
- DETAILED: the sag profile is stored in a set of 3 vectors
called Z_n, SAG_X_n and SAG_Y_n, where n is the wire number.
The wire elongation is stored in STRETCH_n in both cases.
In case these global variables are already in use, then their
contents will be lost.
These arrays can be used to obtain the sag at any point on
the wire by such statements as:
Parse terminal z
Call interpolate_2(z_1,sag_x_1,z,x)
Call interpolate_2(z_1,sag_y_1,z,y)
Say "Sag at z={z} is (x,y)=({x,y})."
If (1) the instruction is placed in the body of a DO loop and
(2) these global variables are used in arithmetic or in IF
conditions, then you have to declare the global variables before
the DO loop by assigning them an (arbitrary value). Declaring is
not required if the variables are only used outside a DO loop,
e.g. in SAY statements or in procedure calls.
The variable OK is set to TRUE if no error was detected during
execution of the FORCE command, otherwise it is set to FALSE.
This variable can therefore be tested to decide whether further
action on the output variables is meaningful.
[The wire sag is not kept by default.]
Prints, if the DETAILED option has been selected, a table
of the forces acting on the wire as function of its shift.
This table is used to compute the sag profile.
[This option is off by default.]
Plots, if the DETAILED option has been selected, the table
of the forces acting on the wire as function of its shift.
This table is used to compute the sag profile.
[This option is off by default.]
When this option is selected, the table of electrstatic forces
acting on the wires is stored as:
- FAST: Two scalars called FORCE_X_n and FORCE_Y_n where n
is the wire number.
- DETAILED: two matrices called FX_n and FY_n where n is the
wire number. Two further vectors, X_F_n and Y_F_n give the
abscissa for these two matrices.
Note that only the electrostatic forces are stored - the
gravitational force, if present, is assumed constant and
can be computed from the wire density and chamber orientation.
In case these global variables are already in use, then their
contents will be lost.
This option is probably not very useful - it could for instance
be used to make a 3-dimensional graph of the electrostatic forces
acting on the wire as function of the wire shift:
Call plot_surface(fx_1,60,30,x_f_1,y_f_1)
Call plot_end
Call plot_surface(fy_1,60,30,x_f_1,y_f_1)
Call plot_end
or to obtain the electrostatic forces acting on the
wire in their final position:
* Get position at wire center
Call interpolate_2(z_1,sag_x_1,0,xc)
Call interpolate_2(z_1,sag_y_1,0,yc)
Say "Position in the wire center: ({xc,yc})."
* Get forces at wire center
Call dimensions(x_f_1,ndim,dim)
Global nx=number(dim)
Call dimensions(y_f_1,ndim,dim)
Global ny=number(dim)
Call book_matrix(point,2,1)
Global point[1;1]=xc
Global point[2;1]=yc
Call interpolate(fx_1,x_f_1,y_f_1,point,out)
Global fxc=number(out)
Call interpolate(fy_1,x_f_1,y_f_1,point,out)
Global fyc=number(out)
Call delete_matrix(dim,point,out)
Say "Electrostatic forces in central position: ({fxc,fyc}) N/cm."
If (1) the instruction is placed in the body of a DO loop and
(2) these global variables are used in arithmetic or in IF
conditions, then you have to declare the global variables before
the DO loop by assigning them an (arbitrary value). Declaring is
not required if the variables are only used outside a DO loop,
e.g. in SAY statements or in procedure calls.
The variable OK is set to TRUE if no error was detected during
execution of the FORCE command, otherwise it is set to FALSE.
This variable can therefore be tested to decide whether further
action on the output variables is meaningful.
[The force table is not kept by default.]
Keyword index.
Formatted on 10/11/98.