Você está na página 1de 4

TWOPHASE

Sizing Process Piping for Twophase Fluids

LOADING TWOPHASE PROGRAM To run TWOPHASE, double click on TWOPHASE.BAT icon

USING THE PROGRAM TWOPHASE

This program is written to run on almost any IBM PC or compatible computer. It works best on a color monitor, but color is not required. What is required, however, is that the computer has the ANSI.SYS screen driver loaded.

LOADING THE ANSI.SYS SCREEN DRIVER The program TWOPHASE controls the appearance of the computer screen during data input and general program operation by means of ANSI terminal control escape sequence. Details of the ANSI escape sequences can be found in your DOS manuals. Most strict IBM compatible PCs have ANSI terminal control escape sequences provided by DOS only after loading the ANSI.SYS loadable device driver. This is loaded by means by a command in CONFIG.SYS, which is probably something like: DEVICE=C:\DOS\ANSI.SYS This assumes that the computer has a drive C:, with a subdirectory \DOS, in which the device driver file ANSI.SYS resides. Your particular computer system may be configured differently, in which case the CONFIG.SYS entry must be altered to suit. When using DOS 5 or 6, it is possible to put the ANSI.SYS device driver into high memory, by using the command in CONFIG.SYS as follows: DEVICEHIGH=C:\DOS\ANSI.SYS of course, to load device drivers high (thus freeing up conventional memory), various other parameters have to be set. For these, refer to your DOS manual. Replacements for ANSI.SYS are available as public domain, shareware or commercial utilities, and these offer particularly increased speed of response over the DOS utility. Examples include NANSI.SYS and FANSI console. A program (ANSI.COM) which offers the facilities of ANSI.SYS is included in the PC Magazine Hot utilities (Ziff Davies Publishing), and this has the advantage that it is removable at any time.

2
AT&T 6300 users (e.g. Olivetti in Europe) need not load ANSI.SYS, as it is included in their implementation of DOS. Before attempting to run TWOPHASE, make sure that you have configured your computer to use the ANSI device driver, or load the driver program ANSI.COM. You have not done this properly if, when running the program TWOPHASE, you see a jumble of characters on the screen, interspersed with "left arrow" and "left square brackets" characters e.g. <-(........!!!! Type ANSI (return), if you have the program ANSI.COM on your floppy diskette.

RUNNING TWOPHASE

TWOPHASE is run from the command line by typing TWOPHASE (return) At this point, the program displays an opening title screen. You are invited to "Press any key to continue". Pressing CTRL-C or CTRL-BREAK to stop the program may leave the screen colors confused, and this is not a recommended mode of exit. Any other key press brings up a menu screen with eight options. You select one of the options by moving the highlight up or down the list, and selecting the highlighted option with the RETURN key. The list is "circular", so passing up from the top of the list brings up to the bottom entry, and vice versa. The options are as follows: 1. 2. OPEN a pre-existing file. CREATE a new file.

You would select option 2 if you have not previously used the program, or wish to input completely fresh data. Choosing option 1 opens the pre-existing file, and presents all the data in it for you to confirm or, if you wish, to change. This is the option to choose if you wish to make small changes to an analysis that you have already done. When you select these options, you are asked to input the name of the file you wish to OPEN or CREATE. A highlighted input box is provided on screen for this. When giving the name, you may include a drive letter, and a path, but you should not give a file name extension- the progam assumes that .DAT is to be used. If you make a mistake while entering the filename, then you may edit the name by use of the BACKSPACE key, or the LEFT and RIGHT arrow cursor keys. Pressing RETURN sends the contents of the input box to TWOPHASE. If this filename is unacceptable for any reason, the program will bleep and refuse to let you continue until an acceptable name has been inputted. Option No. 8 is QUIT. Select this option if you wish to exit the program normally.

3
The other five options are covered in the sections below entitled Making Calculations and Generating Results.

INPUTTING AND EDITING DATA

After selecting the OPEN or CREATE options, the user is led through a series of data input screens. On each of these screens, the actual data values are presented in highlighted input boxes, along with a brief informative message stating what the data values means. If you have selected CREATE, the boxes are initially presented empty, but, if you have selected OPEN, then the data values stored in the file which you have opened are amended. The cursor may be moved within the data entry boxes by means of the cursor keys, and the data editted as explained in the immediately preceding section. Pressing RETURN sends the data value to the program, and, if for some reason it is unacceptable for example, it might lie outside the range of practical values for a parameter, or might exceed the (generous!) practical values for a parameter, or might exceed the (generous!) program limits. If such an unacceptable value is inputted, then the program bleeps, and will not continue until the mistake is rectified. At the completion of each data entry screen, you are given a chance to continue to the next screen, or to change the entries on this screen. When all data values have been entered, or reviewed and amended, and are now accepted, the program returns to the opening menu.

MAKING CALCULATIONS

The computation module is set in motion by selecting the option CALCS in the opening menu. This is normally a very fast process, and control is returned to the opening menu within seconds- on a 386 or 486 PCs, it may even not be obvious that anything has happened!

GENERATING RESULTS The program TWOPHASE saves the results of its calculation in internal arrays. To see them, you have to select one of the two options for presenting results: SAVE RES or PRT RES. Selecting PRT RES sends a hard copy of the analysis results to a printer attached to LPT1:, and displays the results on screen. The results on screen are in "pages", and any key press brings up the following page.

4
On the printer, the end of results printing is followed by a "form feed", laser jet-owing users do not have to manually press any buttons for "new page", nor do they have to wait for the printer to "time-out". It is not recommended that you use the PRT SCRN facility to print the results off the screen. The SAVE RES option requests a file name. This may be supplied with drive and path, but is assumed by the program to have the extension .PRN.

NEXT PROBLEM After completing the first calculation, you must choose Option 7, FINISH for another process pipe line sizing.

The program makes use of a series of input routines from the book entitled "FORTRAN and the Art of PC Programming" by Tim Ward and Professor E. Bromhead, published by Wiley International.

Dr. A.K. Coker 26th January 2007

Você também pode gostar