Section 2.2 of the User's Guide for CPO2D and CPO3D

(or proceed to section 2.3)

 

Input and output files.

 

Usually the only file of interest to the user is:

the output data file

The program also creates a file to hold the input data:

the input data file

The program also creates and uses some 'background' files, referred to in the programs as 'hidden' files:

the processed data file

the binary data files

The binary files are sometimes very long and so should not be retained for a long time, see below.

 

The output data file is created by the program and is used to hold the ray and other information that it has calculated, so that the user can look at the information later. Usually all the information that appears on the screen in the 'information' box also goes into this file. The user controls the amount of information that is given on the segments and rays. The user also chooses the name of the file (using databuilder/file names). The file is over-written if it has been used before.

Warning: File names must not include spaces -so do not use names such as temp 1.dat

or c:\program files\cpo\temp.dat.

Cumulative option: When this is selected (using databuilder/file names) all the data in the information box is copied into the output file, including the data from a sequence of runs.

 

The input data file is created by the data-builder (that is, pre-processor) and contains the data that initially specifies a simulation. The 'benchmark test' or 'example' files are input data files. Data files can also be created from ‘dxf’ files. Further data can also be entered later, during the interactive stage of the program, as described in chapter 5. The name of the file is chosen by the user (but see below).

 

The processed data file is created by the program and is used to save data that it has calculated or processed, such as information on the subdivision of electrodes into segments. The name is again chosen by the user (and see below).

 

The binary data files are essentially appendices to the processed data file. They are used to save data compactly in a binary form. They have the same root name as the processed data file but have the extensions 'yxx', 'yyy', or 'yzz'. Warning: these files can be large and so if they are allowed to accumulate they might harm the performance of the computer. This is important in space-charge problems with a large number of segments -the 'yyy' files can then become extremely large.

 

 

The following sections deal with:

Actions taken by the program.

Re-using data.

Choice of names for files.

Changing names for files.

Advanced editing.

Extracting information from binary files.

Transferring data to excel.

 

 

Actions taken by the program.

When a new input data file is used the program:

(1) reads the electrode data in the input data file,

(2) calculates the surface charges,

(3) puts the values of these charges and all the other relevant information about the electrodes and segments into the processed data file and the binary data files,

(4) reads and acts on the remaining information in the input data file, for example on the types of rays or cathodes, and

(5) goes into the interactive stage, during which some of the results of the various calculations that the program is asked to do are put on the screen (in the 'information' box) and also into the output data file.

 

Re-using data.

If the electrode data are the same as those used previously, with the same processed data file, then the program will automatically recognise this and will save time by skipping steps (2) and (3) above, and will instead read the data from the processed data file and binary data files. This gives a considerable saving in time for complicated systems. But if any differences (of any kind) are found, up to and including the line that gives the fractional charge inaccuracy, then the charges will be recalculated.

 

Choice of names for files.

The file extension should always be .dat -other choices are not recommended. The file name must not contain gaps. Problems might occur if a file name is very long. It is advisable to choose names that are easily deleted by a general deleting instruction. For example all the names specified in the 'test', 'example' and 'shape' files that form part of the CPO packages start with temp or tmp. Alternatively all the data files should be put in a directory that can be deleted later. Some of the files created by the program, particularly the binary files, can be very long when the number of segments is large, and if lots of them are created and not deleted the speed of programs might be reduced, sometimes severely.

 

Changing names for files.

When an input data file has been changed it should usually be saved with a different name, for future use. The name of the processed data file should also be changed at the same time. This is important when advanced options are used that save extra information in the binary file (for example the option to improve paraxial mesh points).

 

Advanced editing.

The input and processed data files are annotated and so can be edited by an experienced programmer. For example the processed data file could be edited to remove some of the segments to create a hole or to create an electrode of unusual shape. The electrode and segment data in the processed data file has the right format for re-use in an input data file.

 

Extracting information from binary files.

Briefly, segment information can be extracted in a form suitable for re-use as input data. This can be useful for saving segments created by iterative subdivision (adaptive segmentation)  or for removing a few segments to create a hole in an electrode.

 

Transferring data to excel.

Chose the option to separate numbers by commas and after the ray output file has been produced delete the unwanted parts and change its ending from .dat to .csv so that it can be used in excel.

 

 

(proceed to next section)