Skip to content

System practicalities

This chapter gives an overview of the program and file structure and tabulates the I/O units used by SHIPFLOW. A brief description of memory allocation is also given.

Files

The following table shows all the I/O units used by SHIPFLOW.

Unit Name Description
6 Terminal output.
5 Terminal input.
3 (not used)
4 (user spec.) Geometry file containing the offset coordinates.
1 (user spec.) Command file. Its name id will be used as prefix for all files that SHIPFLOW creates. This naming convention can be overruled with the FILE command.
2 id_OUTPUT Detailed output.
7 id_SUMMARY Summarized output.
id.cgns Data for visualization of results from all modules with SPOST.
8 id_XPDB XPAN results needed by XBOUND and XCHAP.
9 id_XBDB XBOUND results needed by XCHAP.
17 id_XVGRID Grid coordinate file for XCHAP.
19 id_XVPROF Inflow boundary velocity profiles, generated and used by XCHAP.
22 id_XPRES Restart file for XPAN.
26 id_LWAVECUT Contains wave profiles along longitudinal wave cuts. Generated when the WAVECUT command is used.
27 id_TWAVECUT Contains wave profiles along transverse wave cuts. Generated when the WAVECUT command is used.
52 id_XGPOST.plt XGRID mesh for TECPLOT.
53 id_XPPOST.plt XPAN results for TECPLOT.
54 id_XBPOST.plt XBOUND results for TECPLOT.
55 id_XBSTRL.plt XBOUND streamlines for TECPLOT.
55 id_XBLIMIT.plt XBOUND limiting streamlines for TECPLOT.
58 id_FPXYPL.plt Wave profile data for TECPLOT.
61 optres.dat Contains resistance, displacement and LCB. To be used when SHIPFLOW is included in an optimization loop. Generated when the OPTIM command is used.
67 id_FPXYPL Wave profile data for FIDAP. Moved to id_XPOST/XPAN.FPXYPL.
68 id_WAVECP Wave profile from hull surface pressure for FIDAP. Moved to id_XPOST/WAVECP.

Extra data output from XPAN and XBOUND (see the PRTOPT command):

Unit Name Description
20 id_XYPLOT Speed, onset-flow and iteration history of XPAN results for xy-plot in FIDAP.
28 id_PGEOM Panel geometry information.
29 id_FDOP Finite difference operator terms from XPAN.
30 id_PCON Panel connectivities from XPAN.
31 id_STRLRES Streamline coordinates from XBOUND.
32 id_PANCO Panel corner coordinates from XPAN.
33 id_NLTERM Non-linear terms from XPAN.
34 id_BMRES Double or single model information: control point coordinates, velocities and pressures, panel source strengths and normal vectors from XPAN.
35 id_FSRES Free surface calculation information: control point coordinates, velocities and pressures, panel source strengths and normal vectors, wave heights from XPAN.
36 id_OBPRES Offbody point calculation information: offbody point coordinates, velocities and pressures from XPAN.
37 id_NAPA Output of XPAN results for NAPA interface.
57 id_XYPLOT.plt Speed, onset-flow and iteration history of XPAN results for xy-plot in TECPLOT.
62 id_OPTAIJ Special purpose optimization output. Not for general use.
63 id_OPTXYZ Special purpose optimization output. Not for general use.
64 id_OPTRES Special purpose optimization output. Not for general use.
66 id_TRACE TRACE file, a runtime log of all actions taken by XPAN, useful if anything goes wrong.

Additional files used by XCHAP:

Name Description
id_chp.cmd Command file for CHAPMAN. Automatically produced by SHIPFLOW.
id_chp.xgrd Grid file produced by XGRID for CHAPMAN.
id_chp.data Solution exported by CHAPMAN.
id_chp.cgrd Grid file exported by CHAPMAN.
id_chp.resi Accumulated iteration history of integrated forces.
id_chp.log Accumulated norms of residuals from CHAPMAN.
id_FORCELOG Iteration history of integrated forces from the last run.
id_CONV Norms of residuals from last run of CHAPMAN.
id_chp.log Iteration history of the integrated forces from CHAPMAN.
id_Propeller.html Extracted wake data in html format.

SHIPFLOW (XPAN) also uses a number of scratch files, units 40, 42, 43, 44, 45, 71, 72, 80, 81 and 82, which should not be removed until SHIPFLOW has finished. They disappear by themselves unless SHIPFLOW is terminated abnormally.

The location of scratch files can normally be specified by the system environment variable TMPDIR. This variable affects all scratch files.

In addition it is also possible to specify the location of the scratch files for the influence matrices and the system matrix in XPAN with the environment variable SHIPFLOWTMPDIR, which should be set to the path of the directory that shall contain the files.

The program and file structure is shown in the following section.

SHIPFLOW program and file structure

SHIPFLOW program and file structure: the modules SHIPFLOW, XMESH/XPAN, XBOUND, XGRID, XVISC and XCHAP run in sequence, with the input files of each module on the left, its output files on the right, and the data base files id_XPDB, id_XBDB and id_XVGRID passed on to later modules

Memory utilization

SHIPFLOW has been written mainly in FORTRAN 77 for maximum speed and portability. One drawback of the language is that the size of vectors and arrays must be known when the program is written. This has been circumvented by storing all the problem size dependent vectors and arrays as parts of a very large vector named ia. The size of ia can be controlled by the user. This enables the user to adjust the size of SHIPFLOW to achieve any of the following goals:

  • Make the problem fit into the program
  • Make the program fit into the computer
  • Leave some of the computer capacity for other tasks
  • Gain certain performance benefits

The "performance benefits" depend mainly on the following mechanism.

XPAN divides the system matrix in blocks which are stored on disc. The number and size of blocks depends on the available memory in ia.

The size of the workspace ia can be changed by the user. The technique for this is dependent on the platform. SHIPFLOW running under UNIX uses C-routines for memory allocation and the size can be specified through the environment variable SHIPFLOWMEM.

SHIPFLOW stops the execution and prints an error message on the terminal and in id_OUTPUT whenever the problem size requires more work space. The required value of SHIPFLOWMEM is also printed when possible.

XCHAP is mainly written in C++ and memory is allocated and deallocated dynamically when required and the work space ia is not used. Due to this difference XCHAP deallocates the work space ia before starting the CHAPMAN process so it can be reused.