FORCES 

&OPTIMISE: FORCES


FAST

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.


DETAILED

Requests a calculation of the wire sag profiles, without any a priori assumption regarding the shape of the wire.

In this mode, the program uses in its computations the force that acts on the wire if it is (artificially) offset. These forces are computed by solving the capacitance equations for every (set of) wire locations for which one needs a force. Since the force usually displays smooth variations with offset, the program computes the forces only for a number of locations (SCANNING-GRID) in the vicinity (SCANNING-AREA) of the nominal location and interpolates in this table (INTERPOLATION-ORDER) when a force is needed.


SCANNING-GRID

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 explicitly (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 controlled 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.]


SCANNING-AREA

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 explicitly also by specifying the area as 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.


nshot

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.


nstep

See nshot.

INTERPOLATION-ORDER

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.


EXTRAPOLATE

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).


ITERATE

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

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.


TOLERANCE

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\ \μm.]


UPDATE-SCALING-FACTOR

(not yet used)

OFFSET

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.

The offsets you specify are applied to all wires except the one of which the sag is being computed.

[By default, all wires have an initial offset of (0,0).]


GRAVITY

The gravitational force on the wire is included in the sag computation.

This option is meaningful only if the GRAVITY command has been used to set a direction in which gravity acts on the wires.

[This is default.]


ELECTROSTATICS

The electrostatic force on the wire is taken into account when calculating the wire sag.

[This is default.]


PRINT-SAG

Prints depending on the requested level of detail in the calculation, the following is printed:

[This is default.]


PLOT-SAG

Plots the sag profiles if the DETAILED option has been selected.

The x-component of the sag is plotted with the representation FUNCTION-1 while the y-component is shown with the representation FUNCTION-2.

[This is default.]


KEEP-SAG

When this option is selected, the wire sag is stored in global variables:

The wire elongation is stored in STRETCH_n, a Number, in both cases.

In case these global variables are already in use, then their original 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})."

You have to declare the Global variables before the loop if

Declaring is not required if the variables are only used outside the loop, in procedure Calls, in Say statements or for substitution in normal input statements.

The global variable OK is set to True if no error was detected during execution of the FORCES 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.]


PRINT-FORCES

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.]


PLOT-FORCES

Plots, if the DETAILED option has been selected, the force acting on the wire as function of its shift, both as function of the x-shift for various y-shifts and as function of the y-shift for various x-shifts.

These graphs are meant to convey the absolute values of the forces, they are not meant to be particularly pleasing to the eye. For a more colourful presentation, use the KEEP-FORCES option and plot the forces with the PLOT_SURFACE or PLOT_CONTOURS procedure.

The x-component of the force is plotted with the representation FUNCTION-1 while the y-component is shown with the representation FUNCTION-2.

[This option is off by default.]


KEEP-FORCES

When this option is selected, the table of electrostatic forces acting on the wires is stored as:

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 original contents will be lost.

This option can for instance be used to make a 3-dimensional graph of the electrostatic forces acting on the wire as function of the wire shift:

The plot shows the forces in a chamber with a planar and a wire cathode, as for instance used for the read-out of a TPC. The plot was made with the following set of commands:

&CELL
plane y -0.2
pl y  4
rows
s * * 0 0 2000
p * * 0 0.2 0
p * * 0.2 0.2 0

periodicity x 0.4

&OPTIMISE forces detailed keep-forces noplot-sag ... noplot-forces noprint-sag ... scanning-grid 25 25 ... scan-area -0.15 -0.15 +0.15 +0.15 Call plot_surface(fy_1,30,120,x_f_1,y_f_1, ... `x`,`y`,`y-Component of F`)

One can also use this option to obtain the electrostatic forces acting on the wire in their final position:

* Get position at wire centre
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 centre: ({xc,yc})."
* Get forces at wire centre
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."

You have to declare the Global variables before the loop if

Declaring is not required if the variables are only used outside the loop, in procedure Calls, in Say statements or for substitution in normal input statements.

The variable OK is set to True if no error was detected during execution of the FORCES 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.]


Go to the top level, to &OPTIMISE, to FORCES, to the topic index, to the table of contents, or to the full text.

Formatted on 21/01/18 at 16:55.