Você está na página 1de 40

NAPA Online Manuals 2009.

1
Capacities (CP)

1992-2009 Napa Ltd. All rights reserved.

NAPA Online Manuals 2009.1 Capacities (CP)

Table of Contents
1 Tank tables (CP). . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1
1.1 1.2 1.3 1.4 Introduction. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Connection to old CP tasks. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Quantities available. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Arguments. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1.4.1 Depth Arguments. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1.4.2 Trim and heel. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1.4.3 Other arguments. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1.4.4 Adaption of arguments when changing compartment. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1.5 Variables. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1.6 Listing. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1.6.1 LQ qualifiers. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1.6.2 Standard lists commands. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1.6.3 Selecting sets of compartments. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1.6.4 Presentation of undefined values. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1.6.5 Examples. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1.7 Diagrams. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1 1 1 2 2 3 4 4 5 6 6 6 6 7 7 9

2 Sounding devices and steel reductions. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 10


2.1 Sounding devices. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2.1.1 Device types. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2.1.2 Identification of sounding devices. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2.1.3 Defining sounding devices. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2.1.4 Selecting the sounding device for calculation. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2.1.5 Auxiliary functions. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2.1.6 Drawing of sounding devices. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2.1.7 Old and new definitions. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2.1.8 Using sounding values with the calculator. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2.2 Steel reduction as a function of filling. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2.2.1 Function. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2.2.2 Definition. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2.2.3 Alternative definitions. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2.2.4 Storing. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2.2.5 Updating. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2.2.6 Connection to SM. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2.2.7 Auxiliary functions. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2.2.8 Example. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2.3 Other definitions. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 10 10 12 12 12 13 13 14 14 15 15 16 16 16 16 16 16 17 17

3 Examples of output macros. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 17


3.1 3.2 3.3 3.4 Sounding table. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Listing groups of compartments. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Example macro for LIST .macro. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Example of plotting. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 17 20 21 23

4 Commands and service functions. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 25


4.1 Main task. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 25 4.1.1 Subtask PAR. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 32 4.2 Service functions. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 35

1992-2009 Napa Ltd. All rights reserved.

NAPA Online Manuals 2009.1 Capacities (CP)

1 (38)

1 Tank tables (CP)


1.1 Introduction
The capacities task CP handles sounding tables and devices and produces output as a function of depth, sounding, ullage, draught, trim and heel. Tank geometry is derived mainly from the geometry task GM with some parameters from Ship Model SM. The sounding devices and steel reductions for individual compartments are defined in the subtask PAR. The results are derived from the volume or the surface of the liquid in a tank filled to a given level. The tank fillings are given in different methods including volumes, heights or sounding device readings.

1.2 Connection to old CP tasks


The current CP task replaces a number of separate tasks, of which the definition task was taken out of use in rel. 90.1 and the output tasks (CHYD,SOUND,RFS,TANK) in rel. 93.2. For the case that an old project (before 90.1) should be used, the difference between defining sounding devices in this task or in the old task SDEV is presented below.

1.3 Quantities available


The following quantities are available for output: Quantities in LQ CP Quantity AWP AZIMAX AZIMIN CGX CGXA CGY CGYA CGZ GAUGE H FILL FSM IMIN IMAX LMA LMV SCORRH Explanation area of waterplane azimuth angle of Imax azimuth angle of Imin cgx of volume cgx of area cgy of volume cgy of area cgz of volume sounding device reading height from tank bottom filling degree (% of max volume) free surface moment min. moment of inertia of surface max. moment of inertia of surface longit moment of surface longit. moment of volume sounding correction for heel

1992-2009 Napa Ltd. All rights reserved.

NAPA Online Manuals 2009.1 Capacities (CP)

2 (38)

SCORRT T TMA TMV TMX TMY VCORRH VCORRT VMV VNET VOLM WL

sounding correction for trim draught transv moment of surface transv. moment of volume long. moment of inertia transv moment of inertia volume correction for heel volume correction for trim vert. moment of volume net volume volume moulded weight of load

The net volume is the moulded volume minus steel reduction, while the weight of load is the net volume multiplied by the density of the contents. A normal, fixed steel reduction is obtained from SM. A steel reduction that varies with height can be defined in the subtask PAR, and used under CP only. H and GAUGE can be both arguments and result quantities, depending on which one is given (see paragraph about arguments). VCORRT gives a volume correction (net volume), defined as the volume at a given trim minus the volume at zero trim. VCORRH does the analogous function for heel. SCORRT gives the trim correction in the form of an increment to the sounding value. SCORRH gives the analogous correction for heel. FSM (free surface moment) is the real moment caused by shifting of the liquid at a given heeling. The basic quantities should be calculated for heel=0 (argument HEEL), while the heel for which the moment is printed is given as qualifier in the LQ command.

1.4 Arguments
The arguments controlling the calculation can be listed with command ARGS. The function of the arguments is presented in the following paragraphs. 1.4.1 Depth Arguments The calculation depths can be specified directly as depths, or indirectly as sounding values, volumes or fillings. The arguments can further be given directly as a set of values or by a step. The corresponding arguments H, STEP, GAUGE, GSTEP, VOL, VSTEP and FILL, FSTEP are alternatives that replace each other. (The volume argument is the net volume). If H is given and GAUGE is among the list quantities, the former is listed as given while the latter one is calculated and vice versa. When the GAUGE quantity is calculated, the calculation is done with the argument trim and heel, and therefore in line with those quantities only that are calculated with the same arguments, not volumes with a trim or heel changed by a qualifier. When applying the step arguments, the range is selected so that the maximum volume at zero trim is included in the result list. For the gauge step, there are the following additional options. With the argument TRRANGE, it is possible to define a trim range to be taken into account when deciding the range of gauge values needed. With the following options, special

1992-2009 Napa Ltd. All rights reserved.

NAPA Online Manuals 2009.1 Capacities (CP)

3 (38)

values can be added if not already in the series: Command ADD TE (tube end) adds the end of the sounding tube and ADD MAX adds the gauge corresponding to the maximum filling at the trim and heel defined by the arguments. The listing order in the table is from lower to higher values of the given argument. If the argument is ullages, this means that the volumes will be listed in descending order. With the table output option REV the order can be reversed. The heights are measured from a reference height, that is selected as the lowest coordinate of the tank, but can be changed by the argument REFZ. A permanent reference height can be defined as part of the tank oriented definitions (subtask PAR). The meaning of the argument H is obvious at zero trim and heel only: the height differs from the draught (T) by the constant REFZ, and with a non-zero trim (and to a less extent heel), the natural meaning of height is lost. In order to get an argument with a well defined interpretation, a formal, vertical sounding tube can be defined. The result quantity T is the one used as draught argument in the basic volume calculations. It is not intended for ordinary result lists, but it can be useful if one wants to compare results with values obtained by other means (e.g. calculator function VOL). It can also be used if one wants to define the plane representing the upper surface (e.g. command PLANE under task DR). The T values listed correspond to the current arguments (TRIM, HEEL) and are not valid for quantities with differing arguments provided in the LQ. When selecting a new compartment, this may cause a change of the depth arguments as presented below. For more flexibility, isolated argument values, not following from the step or not contained in a series can be added separately with command ADD. Values given in the ADD command are interpreted as arguments of the type presently valid, and added to the current set. Redefining the argument cancels the ADD command. Volume arguments are not supported. For height arguments (H or STEP), there is the alternative ADD STEPS, adding values where there is a step in the waterline area function. The values are added doubled, causing the waterline area to be calculated separately above and below the discontinuity. The same effect is obtained if a double argument is added manually. The number of depths resulting from the current combination of depth argument and compartment can be inquired with command NARG. The result is also stored in variable NARG, in order to support decisions regarding page feeds or similar in listing macros. Note: without the NARG command, the variable is not updated. 1.4.2 Trim and heel In a given table, the calculations are made for a fixed trim and heeling, the values of which can be set with the corresponding arguments (TR, HEEL). Values calculated for several trims and heelings can be added into a single table the following ways: The volume and quantities derived from the volume (VNET, WL) can be equipped with a qualifier in the quantity selection (LQ command), which will be interpreted as trim. For example, LQ H VNET('even keel') VNET('trim -1')/-1 VNET('trim 1')/1 gives the net volume for three trims in the same table (-1,0 and 1). The volume without qualifier is calculated as specified by the trim argument (assumed 0 in the example). Alternatively, a heel can be given as qualifier, which is distinguished from a trim by adding prefix H, for example VNET/ H10, denoting heel 10 (degrees). For symmetry, a T can be added in front of a trim (e.g. VNET/T-2). Both a heel and a trim can be combined, for example VNET/H5T1 for heel=5, trim=1. Another possibility is to use the correction quantities VCORRT, VCORRH, SCORRT and SCORRH. The two first ones give a correction to the net volume, and the two latter ones to the sounding value. The last letter T or H tells whether the correction is for trim or heeling. The argument for which the correction is calculated is given as qualifier, for example LQ GAUGE VNET VCORRT('trim -1')/-1 VCORRT('trim 1')/1,

1992-2009 Napa Ltd. All rights reserved.

NAPA Online Manuals 2009.1 Capacities (CP)

4 (38)

VCORRH('heel-5')/-5 VCORRH('heel=5')/5 This selection gives the net volume and a volume correction for trims -1 and 1 and heelings 5 and -5. The sounding correction gives the same information in the form of a correction of the sounding value, so that the volume table, read at the corrected sounding value gives the corrected volume. For the sounding correction to be exact, the spacing between the calculation draughts should be small enough to allow linear interpolation. For the correction quantities (VCORRT, VCORRH, SCORRT, SCORRH) to be meaningful, they must be calculated with fixed gauge (not height), using GAUGE or GSTEP as argument. 1.4.3 Other arguments In addition to those presented above, the following arguments are defined: ARR - arrangement The arrangement has its normal function of providing parameters for the compartments and a set from which selections are made. The current arrangement is selected as default, either as such or as the subset prefixed with LD (e.g. LDA) as in loading conditions. A tank need not belong to the arrangement, but some parameters (mainly RED) may then need assigning manually. COMP - current compartment When a new compartment is selected, arguments are adapted as presented below. SDEV - current sounding device When a new compartment is selected, the first device defined is selected as default. Without a sounding device, the arguments GAUGE, GSTEP and the list quantity GAUGE cannot be used. The sounding device is expressed as type/id, where '/id' is optional. If no id is given, a device with the given type and empty id is selected, if found, otherwise the first one with the given type. RHO - density of contents This parameter is relevant for quantities WL (weight of load) and FSM (free surface moment) only. The default is fetched from the arrangement. RED - steel reduction This parameter is relevant for quantities VNET (net volume), WL and FSM, and for the argument quantities VOL and VSTEP. The default is fetched from the arrangement, unless a special definition has been made under CP (see below). DMODE - control for dummy values This argument controls the listing of undefined centers of gravity or redundant volumes, as presented below. WLS - waterline section for waterline oriented quantities This option may improve the accuracy of quantities derived from the surface (AWP etc), provided that the sections are obtained reliably. 1.4.4 Adaption of arguments when changing compartment Most of the arguments are to some degree dependent on the compartment, and may need correction after changing compartment. This paragraph presents the changes made by the system, when reading a new compartment. For RHO and RED, new values are always assigned after reading a new compartment. If a variable steel reduction has been defined, it will be used. A non-standard value to be applied on many compartments must therefore be repeated. REFZ is normally handled as RHO and RED, i.e. the given value is supposed to be relevant for the current compartment, and new values are assigned when a new compartment is read. With the option *, e.g. REFZ 0 *

1992-2009 Napa Ltd. All rights reserved.

NAPA Online Manuals 2009.1 Capacities (CP)

5 (38)

the given value will be kept fixed when changing compartments. Command REFZ has the (only) effect that the fixing of the reference height is cancelled. When the compartment s changed, a sounding device is automatically selected. If no other instructions have been given, the first one encountered is selected. The argument SDEV selects a sounding device for the current compartment, and does not affect subsequent compartments. In the same way as for the reference height, this can be changed with the option *, with the effect that the device for a new compartment is selected so that the given one is matched as closely as possible. The value shown by command ARGS is the one currently active, and if the * option has been given, this selection is listed separately. SDEV cancels the * option. If no sounding device matching the default is found when fetching a compartment, a message is printed, provided that a sounding argument is active (otherwise the sounding device is assumed not relevant). Of the depth arguments, H, STEP, GSTEP and VSTEP are treated as useful regardless of compartment, and keep their value when reading a new one. The other ones are supposed to need redefining, but in order to have some arguments, defaults are assigned as follows: Fixed gauges are replaced bay GSTEP=0.1, and fixed volumes are replaced by STEP=0.5. If the new compartment does not have a sounding device, gauge arguments are replaced by STEP 0.5. If a gauge step is replaced because the compartment does not have a sounding device, the value is saved and applied again when possible.

1.5 Variables
A number of calculator variables are assigned in order to support programming of macros: The variable COMP is assigned the name of the current compartment. If the compartment is a part of an arrangement, the following variables are set from SM-task: SMCAP SMCCOD SMCGX,SMCGY,SMCGZ SMCLAS SMDES SMPDES SMPURP SMRED SMRHO SMTYPE SMVNET SMVOLM SMWLMX SMXMIN...SMZMAX: capacity (filling) alternative name (tank code) center of gravity of volume class descriptive text description of purpose purpose steel reduction density of contents type net volume moulded volume loading capacity (max weight) extreme coordinates

If a selection has been made with command SELECT, the list of compartments is available in the calculator array CPLIST. The identifier of the current sounding device is stored in variable SDEV. If none is available, value 'NONE' is assigned. At separate request (command NARG), the number calculation depths is stored in variable NARG.

1992-2009 Napa Ltd. All rights reserved.

NAPA Online Manuals 2009.1 Capacities (CP)

6 (38)

The variable LTUBE is assigned the length of the sounding tube (if any).

1.6 Listing
1.6.1 LQ qualifiers In the LQ command, a so-called qualifier can be added to the symbol of the quantity, separated by a slash, e.g. VOL/2. The effect of the qualifiers is dependent on the application, and in this case, the following alternatives are available:
s

Volumes and weight: The qualifier modifies the trim or heel argument as presented under 'Arguments'. Quantity GAUGE: The qualifier R (reverse) converts soundings to ullages and vice versa. Only when argument=gauge or gstep and the current device is a tube. Quantity FSM (free surface moment): The qualifier gives the heeling for which the the moment is calculated. The default is 0, giving zero moment. Centers of gravity: The qualifier gives a reference point (default=0).

1.6.2 Standard lists commands The standard list commands NL (new list), NP (new page), LF (line feed), TYPE (print arbitrary text), FIG (add figure) are all available, as are commands !FORM and !PAGE. In designing layouts, the parameterless calculator function CLINE may be useful, telling the line number of the last line printed on the current page (headers not counted). The TYPE command, possibly with variable components can be used for adding headers not belonging to the table. Note the calculator function FMT, by which a fixed format and field length can be given to a numeric variable. For string data, function SBS has the same effect. Note also that the syntax of the TYPE command allows fixed starting columns to be given. A (tilde) at the end of the line allows the TYPE command to be input on several lines (the tilde character may be changed in the installation parameters). The following are two examples of the TYPE command: TYPE Compartment @SBS(COMP,12) contents @SMPDES TYPE Location #@FR(SMXMIN) to #@FR(SMXMAX) 1.6.3 Selecting sets of compartments In order to help printing tables over many compartments, commands SELECT and SORT are available. Command SELECT selects a subset of compartments from the current arrangement, using a criterion based on the standard SM quantities. The following example selects all compartments with liquid contents except ballast water: SELECT TYPE=L -PURP=BW The result of the selection is a calculator array named CPLIST, which can be used for controlling loops in macros or the ! DO command, as in the following example: !DO LIST-MACRO NAME=CPLIST where LIST-MACRO is the name of a macro containing listing commands, including a command COMP @NAME. The array itself can be listed with !VAR LIST CPLIST. Another way of using the array is presented below in the example list for LISTCP.STD. Command SORT controls the order within the set selected by defining a parameter (e.g. NAME, XMIN) as sorting criterion. NOTE: Must be given before SELECT.

1992-2009 Napa Ltd. All rights reserved.

NAPA Online Manuals 2009.1 Capacities (CP)

7 (38)

A selection made with SELECT can be further restricted on the basis of a criterion concerning sounding devices. This selection is given as a separate SELECT command after the initial one, in the form SELECT SELECT SELECT SELECT DEV=type DEV=type/id DEV>type or DEV<id

where 'type' and 'id' are the identifications used for sounding devices, for example: SELECT DEV=MS An equal sign means that both type and id must match (omitted 'id' means empty id, not unspecified one). The other forms mean that the type or id only need match. If the type is given with one letter (e.g. SELECT TYPE=R), the selection concerns both sounding and ullage devices of the same main type. If the device selection is repeated, it is done from the set resulting from the initial SELECT. 1.6.4 Presentation of undefined values At arguments giving zero volume or waterline area, the centers of gravity are undefined. When this happens at the bottom of the tank, the standard solution is to use the values obtained when calculated close to the bottom. Above the tank, the last values obtained are used. Alternatively, the values may be represented by minus signs or spaces. Volumes and areas outside the range of the compartment are normally represented by the natural values, i.e. zero for areas and volumes below minimum and max volume for arguments above maximum. Above the upper limit of the range, one can alternatively represent these values by minus signs or spaces, if one wants to emphasize the fact that the range of the tank is exceeded The first value of the maximum volume is printed - repetitions only are suppressed. These aspects are controlled by the argument DMODE. It is a string, where the existence of the following letters are interpreted as follows:
s s s

G: replace centers of gravities by dummy values V: replace redundant volumes or areas by dummy values S: use space as dummy value (default minus sign)

Other characters are ignored. These options should not be used if the table is used as input for diagram plotting or processing in the table calculation module, because the values used for representing dummy values can cause unwanted effects. 1.6.5 Examples The first example shows an ordinary list with a number of quantities listed as function of the gauge reading: LQ CP, GAUGE, VNET, CGX, CGY, CGZ, AWP, CGXA, CGYA, FSM('FSM/30')/30 TOO CP HD=(UL, S, U, UL, -, UL) GSTEP 100 ----------------------------------------------------------------GAUGE VNET CGX CGY CGZ AWP CGXA CGYA FSM/30 cm m3 m m m m2 m m tonm ----------------------------------------------------------------0 1.5 64.08 3.66 0.03 34.3 64.11 3.73 3 100 39.0 64.50 4.12 0.49 37.3 65.96 4.49 35 200 75.2 65.17 4.34 0.93 41.5 65.95 4.65 32 300 113.3 65.44 4.45 1.40 42.5 66.03 4.69 33

1992-2009 Napa Ltd. All rights reserved.

NAPA Online Manuals 2009.1 Capacities (CP)

8 (38)

400 145.8 65.49 4.56 1.80 19.7 64.34 5.77 26 500 165.5 65.37 4.70 2.09 20.1 64.48 5.78 7 600 185.6 65.28 4.82 2.43 20.4 64.58 5.79 2 700 205.9 65.21 4.91 2.81 20.7 64.65 5.79 2 ----------------------------------------------------------------The following example illustrates combination of different trims in the same list: LQ GAUGE('sounding'), VNET('trim=-2')/-2, VNET('trim=-1')/-1, VNET('even keel'), VNET('trim=1')/1, VNET('trim=2')/2 TOO CP HD=(UL, S, U, UL, -, UL) ---------------------------------------------------------------sounding trim=-2 trim=-1 even keel trim=1 trim=2 cm m3 m3 m3 m3 m3 ---------------------------------------------------------------0 1.7 1.3 1.5 2.1 3.1 100 39.6 39.3 39.0 38.8 38.6 200 75.8 75.5 75.2 75.0 74.7 300 114.0 113.7 113.3 113.0 112.7 400 145.3 145.5 145.8 146.0 146.3 500 165.1 165.3 165.5 165.7 165.9 600 185.2 185.4 185.6 185.8 185.9 700 205.5 205.7 205.9 206.1 206.3 ---------------------------------------------------------------The following example illustrates the effect of DMODE. The first example is listed with the default behaviour. The LQ is the same as above, but the tank is different. ---------------------------------------------------------------sounding trim=-2 trim=-1 even keel trim=1 trim=2 cm m3 m3 m3 m3 m3 ---------------------------------------------------------------760 2092.5 2087.1 2082.0 2077.1 2072.6 770 2118.5 2113.1 2108.0 2103.2 2098.7 780 2144.6 2139.2 2134.1 2129.3 2124.8 790 2170.7 2165.3 2160.2 2155.4 2150.9 800 2196.8 2191.4 2186.2 2181.4 2176.9 810 2222.3 2217.4 2212.3 2207.5 2203.0 820 2244.1 2243.5 2238.4 2233.6 2227.9 830 2261.7 2267.2 2264.5 2259.1 2248.7 840 2275.1 2282.8 2290.5 2277.8 2265.3 850 2284.4 2290.0 2290.5 2288.2 2277.7 860 2289.5 2290.5 2290.5 2290.5 2286.0 870 2290.5 2290.5 2290.5 2290.5 2290.1 880 2290.5 2290.5 2290.5 2290.5 2290.5 ---------------------------------------------------------------The following example is otherwise the same, but adding DMODE V ---------------------------------------------------------------sounding trim=-2 trim=-1 even keel trim=1 trim=2

1992-2009 Napa Ltd. All rights reserved.

NAPA Online Manuals 2009.1 Capacities (CP)

9 (38)

cm m3 m3 m3 m3 m3 ---------------------------------------------------------------760 2092.5 2087.1 2082.0 2077.1 2072.6 770 2118.5 2113.1 2108.0 2103.2 2098.7 780 2144.6 2139.2 2134.1 2129.3 2124.8 790 2170.7 2165.3 2160.2 2155.4 2150.9 800 2196.8 2191.4 2186.2 2181.4 2176.9 810 2222.3 2217.4 2212.3 2207.5 2203.0 820 2244.1 2243.5 2238.4 2233.6 2227.9 830 2261.7 2267.2 2264.5 2259.1 2248.7 840 2275.1 2282.8 2290.5 2277.8 2265.3 850 2284.4 2290.0 2288.2 2277.7 860 2289.5 2290.5 2290.5 2286.0 870 2290.5 2290.1 880 2290.5 ----------------------------------------------------------------

1.7 Diagrams
The standard commands PQ, POO and PLD are available. The subject identifier is CP, but being the only alternative, it is not needed in the commands. The PQ command (plot quantities) has the same alternatives as the LQ command. With command PLOT .macro options predefined plots can be run in a similar way as with the LIST command. The macros are named PLOTCP.macro in this case. The following example concerns the tank shown in the figure below:

Tank in the PLD example This is a typical case where the ADD STEPS option is essential for getting a good plot of surface quantities (there is second discontinuity not visible in this section). The plot was made with the following options: PQ CP, H, VOLM, AWP, (GAUGE) POO CP, BOX, VA, LGTEXT=LH, LEGEND, LGH=*1.1, NET=P1021, SMOOTH, ARG: AXIS=LB, NOM=GAUGE, NAXIS=LA, F1: AXIS=LB, PEN=A1, RANGE=(0,250), F2: AXIS=UA, PEN=A2, SCALE=(F1)

1992-2009 Napa Ltd. All rights reserved.

NAPA Online Manuals 2009.1 Capacities (CP)

10 (38)

Example of graphic presentation

2 Sounding devices and steel reductions


This chapter presents the definitions supporting the tank capacity calculations:
s s s

sounding devices variable steel reductions reference heights

These are installed as the subtask PAR under the main CP task. In addition, there is the possibility to define a reference height.

2.1 Sounding devices


2.1.1 Device types The sounding devices can be manual sounding devices or remote sounding devices, and both types can show soundings or ullages. The types are designated by two-character symbols as follows: MS, MU RS, RU LS, LU DS manual device remote device same device type as RS,RU, but with installed with local reading device. 'dip' sounding device for measuring a remainder at the tank bottom

From the calculation point of view, types LU,LS are equivalent with RU,RS, and the difference has been introduced for administrative purposes only. A manual sounding device is formed by a tube, along which a distance is measured, either from the zero point up to the liquid level (sounding) or from the upper end down (ullage). The zero point is by default at the end of the tube, but can be redefined by explicit definition. The following figure shows an example, where straight sounding tubes are placed in the corners of a box shaped tank. Soundings are shown to an inclined liquid level.

1992-2009 Napa Ltd. All rights reserved.

NAPA Online Manuals 2009.1 Capacities (CP)

11 (38)

Illustration of manual soundings and ullages A remote sounding device in one way or another senses the orthogonal distance from the device to the liquid surface, either from below (sounding) or from above (ullage). Such a device is defined by the location of the probe and an optional correction, added by the device.

Illustration of remote soundings and ullages The dip sounding device is formed by a weight dropped from a given position until it touches the bottom. The sounding the value is the length of the immersed part:

This device is presently implemented for tanks with horizontal bottom only (at least in the region where the device may touch it). The quantity ' gauge' is used to denote device readings, regardless of whether they represent soundings or ullages.

1992-2009 Napa Ltd. All rights reserved.

NAPA Online Manuals 2009.1 Capacities (CP)

12 (38)

The usage of the words 'manual' and 'remote' in this context has historical reasons, and the relevant aspect is the geometric behaviour. For example, a device that senses the upper level of the surface by using a directed radar beam must be defined as an MU device. 2.1.2 Identification of sounding devices A sounding device is always attached to a specific compartment. A compartment may have several devices, which usually can be distinguished by their type only, but when needed, an additional identifier can be added. Thus, the identification of a device is formed by type/id where 'type' is MS, MU, RS, RU, LS, LU or DS. '/id' is optional, and can be selected freely. 2.1.3 Defining sounding devices Sounding devices are defined with command DEV in subtask PAR under CP. This command either redefines a device or adds a new one, depending on whether there is already a device with the given identification. For a manual device, the form of the command is DEV comp type/id curve h where 'comp' is the name of the compartment, 'type/id' is the identification, 'curve' the definition the geometry of the tube and 'h' the (optional) height of the zero point. 'curve' can be represented by a directly given set of points in space or by the name of a separately defined curve. Examples: DEV T110 MU (#BH1+1 #LBH2-0.2 #DECK1+0.05),(#BH1+1 #LBH2-0.2 DEV T112 MS TUBE-T112 0.7 The first example shows usage of reference to surfaces. Note however, that there is no automatic updating, in case the geometry is changed. In the second example, the sounding tube is defined as the curve named TUBE-T112, and the zero point is at height 0.7. The definition of a remote device has the following form: DEV comp type/id (x,y,z) h where (x,y,z) is the location of the probe and 'h' the optional reading correction. Example: DEV T110 RS (#BH1+1 #LBH2-0.2 #DECK1+0.05) The definition of a dip device has the same form: DEV comp type/id (x,y,z) h (x,y,z) is the point from which the device is lowered and h the height (z-coordinate) of the tank bottom. 2.1.4 Selecting the sounding device for calculation When a new compartment is selected with the COMP command, the first device (if any) will be selected as default. Other selections can be made with the SDEV argument. Arguments GAUGE and GSTEP and result quantity GAUGE require that there is a device available.

1992-2009 Napa Ltd. All rights reserved.

NAPA Online Manuals 2009.1 Capacities (CP)

13 (38)

2.1.5 Auxiliary functions A catalog of stored devices is obtained by command CAT. A list of compartments having devices is stored in a calculator array DEVLIST. The DES command lists definitions of sounding devices: DES DEV comp (The keyword DEV is optional). This command lists the devices defined for the given compartment. In order to list a set of compartments in a single command, the name of a specific compartment can be replaced by the syntax *LIST or *: DES *list DES * 'list' is the name of calculator array, and the operation will be repeated for all names in the list. The bare * refers to the list DEVLIST, created by the CAT command. Command DELETE DEV deletes sounding devices: DELETE DEV comp type/id A list of sounding devices is also available formally as a property of the arrangement, quantity SDE. For example, SDE can be added to the LQ of SM or inquired with the CPP function. 2.1.6 Drawing of sounding devices In the drawing task, graphic check of sounding devices can be done with commands PLOT SDEV name options DRW SDEV options (single compartment) (from current arrangement)

A manual sounding device is drawn as a curve, adding symbol at the high end. The default for the name of the figure used for the symbol is MSDEVICE. A remote sounding device is represented by a symbol only (RSDEVICE). A dip device is represented by a symbol showing the attach point and a figure (DSDEVICE) showing the weight. The following options are provided type D=d: FIG=fig NAME=name R,M,L given main type only, RS,MS,RU,MU,LS,LU: specified type, type/id: specific device. size of figure (drawing scale), default twice the standard text height (as set with TH) name of figure to represent the device name of compartment. Relevant for DRW only.

If ID NAME is set, and the figure has a text field 1, the name of the compartment (DRW) or name of device (PLOT) is written into the text field. The drawing task can be entered from CP with command DR. The following figure shows an example of ID NAME +DRW SDEV:

1992-2009 Napa Ltd. All rights reserved.

NAPA Online Manuals 2009.1 Capacities (CP)

14 (38)

Example of DRW SDEV The original way of plotting the devices was to use figures. With the 3d mode of the view (!view 3d), the figures are replaced by markers as follows:

Markers designating different devices 2.1.7 Old and new definitions This information is relevant for sounding devices created before rel. 90.1. The storage format initially defined for sounding devices was suitable for fixed sets of devices only, and in order to support a more flexible handling of devices, the storage has been revised. Definitions according to the new format are done in subtask PAR under task CP, and can only be used in this task, in PLOT SDEV and in the inclining test task. In order to make definitions in the old format fully available, command GET OLD must be given, otherwise old formats are taken into account only when explicitly selected by the SDEV command. Command CNV OLD fetches old definitions permanently. If definitions of both types have been made for a given device, the new definition is used. If GET OLD or CNV OLD has been given, command DES under PAR will show both new and old definitions, with a comment #** o preceding a definition in old format. Otherwise, DES OLD comp must be used. When any definition is changed under PAR, the whole set of valid definitions will be stored in the new format. 2.1.8 Using sounding values with the calculator Calculations involving sounding device readings can be done by the calculator using the following service functions provided by CP.

1992-2009 Napa Ltd. All rights reserved.

NAPA Online Manuals 2009.1 Capacities (CP)

15 (38)

The functions CP.T and CP.GAUGE convert gauge values to draughts and vice versa: t=CP.T(comp,device,gauge,trim,heel) gauge=CP.GAUGE(comp,device,t,trim,heel) comp=name of compartment, device=name of device, e.g. MS, MS/V1. trim and heel are optional, default=0. NOTE: as in the VOL function, these are given in the external form: trims in m and heel in degrees. The draught t is the same as used when expressing the filling in volume oriented calculator functions, for example VOL: vol=VOL(comp,t,trim,heel) The function CP.VOLG (volume from gauge) provides a shortcut: vol=CP.VOLG(comp,device,gauge,trim,heel) while CP.GVOL (gauge from volume) does the reverse function: gauge=CP.GVOL(comp,device,vol,trim,heel) In all these functions, the same conventions for trim and heel are valid. A list of devices defined for a given tank is obtained by the function CP.DEVICES. The user must reserve a string array to receive the result: @devlist=ARR(3) @n=CP.DEVICES(comp,devlist) where comp=name of compartment and n=number of devices. The devices are stored using the normal conventions, e.g. MS, MS/V1.

2.2 Steel reduction as a function of filling


The steel reduction for an individual compartment can be defined as a function of filling degree. Normally, the original input is given as a function of filling height, which is converted to a function of filling degree. The correction is defined for zero trim and heel, for non-zero trim or heel the meaning of height is lost. The steel reduction defined this way replaces the fixed one defined under SM in the CP task. The argument FILL is not supported for variable steel reductions (works inexactly). The variable steel reduction is also available in the table interface of LD. 2.2.1 Function The reduction is stored as a function of uncorrected relative volume as follows: q=vol/volm red=f(q) vnet=(1-red)*vol where volm=total moulded volume vol=volume at the current filling, as obtained from the geom vnet=corrected volume at then current filling f(q)=the variable steel reduction. This principle is adopted as being the most convenient when applying the correction, especially when trim or heel is nonzero. The result is likely to remain useful even if minor changes are made to the geometry. This is the way the steel reduction is handled internally. It can be defined directly this way or by giving a local reduction as function of height.

1992-2009 Napa Ltd. All rights reserved.

NAPA Online Manuals 2009.1 Capacities (CP)

16 (38)

2.2.2 Definition The steel reduction is defined in the PAR subtask using command RED. The basic form gives the local reduction as a function of z: RED comp (z1,red1) ... (zn, redn) 'comp' is the name of the compartment. z1,z2... are the z-values where the reduction is defined. red1,red2, etc. designate the reduction at the given z. Note: the reduction is always given as a fraction (range 0...1). The parentheses are optional. The internal form can be given directly this way: RED comp I (q1,red1) ... (qn, redn) qi=fraction of volume (range=0...1) and 'red' the reduction for the part of the volume in question. The 'I' can be read as 'internal' or 'integral'. The function defined this way can be thought of as the integral of the local steel reduction defined by the basic form. When given the first form, the integral is generated and the result is stored in the latter form. In order to represent the integral with sufficient accuracy, the number of arguments is increased at need so that the spacing is at most 1/20 of the height of the compartment. If the range given does not cover the whole compartment, it is extrapolated, and a warning is given. 2.2.3 Alternative definitions Alternatively, the definition can be taken from a table containing at least the quantities VOLM and VNET, with VOLM increasing. Such a table can be made by the normal LIST command of CP, after which new values for VNET can be entered under the TAB task. The command is then RED comp TAB*table The result is stored as if the reductions had been defined the normal way. 2.2.4 Storing The result is stored under the name RED*comp. It has the form of a table and can be used under table calculation (set prefix=RED*). This way it is possible to draw the curve. The steel reduction can be defined initially as a table, provided that it has the column VREL (quantity 5344) and RED (quantity 1520). 2.2.5 Updating A steel reduction given in the internal form is independent of the compartment geometry and useful even if the geometry is changed. When given a local reduction, the geometry is needed for generating the integral, and there is no automatic updating in case of changes in the geometry, therefore the definition must be re-entered under PAR. 2.2.6 Connection to SM The overall steel reduction defined under SM is supposed to coincide with the varying steel reduction at maximum filling. There are no automatic transfers between CP and SM, but a warning is given when a compartment is used under CP and there is a conflict. The values obtained from SM and CP are shown. At any time, the total reduction from CP can be inquired with the service function CP.VARRED, e.g. !CAL CP.VARRED('T10',1). In order to restore a fixed reduction, the variable one must be deleted. 2.2.7 Auxiliary functions A catalog of stored steel reduction definitions is obtained with command

1992-2009 Napa Ltd. All rights reserved.

NAPA Online Manuals 2009.1 Capacities (CP)

17 (38)

CAT RED The command obeys the options defined for the general CAT command (see !EXPL CAT/GEN). The DES command lists definitions: DES RED comp This command lists the definition of the reduction defined for the given compartment. 2.2.8 Example The example shows a compartment (R601 of Napaship), where a steel reduction is defined as follows RED R601 (1 0.5) (4 0.5) (4 0) (7.2 0) In the lower half, the local steel reduction if 50 % (exaggerated for purposes of illustration) and in the upper half it is zero. The following figure shows the local steel reduction and the integrated one:

Local and integrated steel reduction From the figure it can be seen that the overall effect is 22 %. This value should be given in SM.

2.3 Other definitions


A reference height can be defined in subtask PAR by command REFZ comp h The default for the reference height is the lowest z-coordinate of the compartment. The reference height defines the meaning of argument quantity and result quantity H.

3 Examples of output macros


3.1 Sounding table
The following macro shows a number of possibilities available for handling options and decisions regarding sounding tables. The macro is here presented as one text, in practice one might prefer to collect parts of the macro into independent parts, allowing these parts to be used in other combinations also. Comment: this macro was made before some features of NAPA BASIC were introduced.

1992-2009 Napa Ltd. All rights reserved.

NAPA Online Manuals 2009.1 Capacities (CP)

18 (38)

100 110 120 130 140 150 160 170 180 190 200 210 220 230 240 250 260 270 280 290 300 310 320 330 340 350 360 370 380 390 400 410 420 430 440 450 460 470 480 490 500 510 520 530 540 550 560 570 580 590 600 610 620 622

** PROG OUTPUT OF SOUNDING TABLE FOR SINGLE COMPARTMENT !CDE 0 &ONERR 99999 (finish if error) ** ----------- various initial assignments ---------** store list of sounding devices and corr. headers &TYPELIST=ARR(3,1111) (string array, 'named' 1111) &TYPELIST(1)='MS' &TYPELIST(2)='MU' &TYPELIST(3)='RS' &TYPELIST(4)='RU' &TYPELIST(5)='LS' &TYPELIST(6)='LU' &HEADER=ARR(3,1112) &HEADER(1)='MANUAL SOUNDING TABLE' &HEADER(2)='MANUAL ULLAGE TABLE' &HEADER(3)='REMOTE SOUNDING TABLE' &HEADER(4)='REMOTE ULLAGE TABLE' &HEADER(5)='LOCAL SOUNDING TABLE' &HEADER(6)='LOCAL ULLAGE TABLE' ** (could be saved as a table under task TAB) !FORM !FORM !FORM !FORM !FORM !FORM !FORM !FORM !FORM !FORM !FORM GSTEP GAUGE H VNET VCORRH MASS CGX CGY CGZ TMY TMX 7.0 CM 7.0 CM 7.2 9.1 9.2 9.1 9.2 9.2 9.2 9.1 9.1

&ONERR 970

(restart if error)

** ------------- get sounding device ----------------&ADEV=.... sounding device (MS,RS,MU,RU,lS or LU) &I=LOCS(TYPELIST,ADEV) identify device &IF I>0 530 !TYPE Unknown device - give again &GOTO 480 &GARG='SND' &IF SBS(ADEV,2,2)='U' &GARG='ULLAGE' LQ GAUGE(&GARG), VNET('Trim +1')/1 VNET('Even keel'), VNET('Trim -1')/-1, VCORRH('Heel S')/-1, VCORRH('Heel P')/1 TOO HD=(S,U, '-', ' ') LMIN=18, SPACE=5, LNP=(' COMPARTMENT IDENT: %COMP', ' COMPARTMENT NAME: %SMDES', ' CONTENTS: %SMPDES', ' ') ** LNP option: headers for additional pages

1992-2009 Napa Ltd. All rights reserved.

NAPA Online Manuals 2009.1 Capacities (CP)

19 (38)

630 640 ** ---------------------------------------------------650 &NAME=.... name of compartment, E=end 660 &IF NAME='E' 1000 670 680 COMP &NAME 690 SDEV &ADEV 700 &IF SBS(SDEV,2)=ADEV 730 710 !TYPE device &ADEV not defined for &COMP 720 &GOTO 470 730 740 NL '&HEADER(I)' 750 760 ** select GSTEP so that the list fits into two pages 770 GSTEP 10 -1 1 ;** note the trim range 780 NARG ;** get number of arguments 790 &IF NARG<100 870 800 GSTEP 50 -1 1 810 &IF NARG<100 870 820 GSTEP 100 -1 1 830 &IF NARG<100 870 840 !TYPE GSTEP replaced by step 850 STEP 0.5 860 870 ** ----------------- start listing, headers first 880 TYPE COMPARTMENT IDENT: &COMP 890 TYPE COMPARTMENT NAME: &SMDES 900 TYPE CONTENTS: &SMPDES 910 TYPE NET VOLUME, CUBIC METRES 915 TYPE 920 930 LIST 940 NP 950 &GOTO 650 960 970 ** handle error 980 &Q=.... try again? (y/n) 990 &IF Q='Y' 650 1000 ** END OF TEXT Listing example: Napa Oy NAPA/D/CP/910404 DEMOSHIP/A MANUAL SOUNDING TABLE DATE 91-05-05 TIME 18.30 SIGN JVH PAGE 1

COMPARTMENT IDENT: T101 COMPARTMENT NAME: FW TANK NO 5 CONTENTS: FRESH WATER NET VOLUME, CUBIC METRES SND Trim +1 Even keel Trim -1 Heel S Heel P CM M3 M3 M3 M3 M3 ---------------------------------------------------------0 3.7 2.2 0.8 1.10 -0.85

1992-2009 Napa Ltd. All rights reserved.

NAPA Online Manuals 2009.1 Capacities (CP)

20 (38)

50 100 150 200 250 300 350

31.9 60.6 89.4 118.1 146.9 175.7 190.6

30.4 59.1 87.8 116.6 145.4 174.2 190.6

28.9 57.5 86.3 115.1 143.9 172.7 190.6

1.16 1.21 1.21 1.21 1.21 1.21 0.00

-1.15 -1.21 -1.21 -1.21 -1.21 -1.21 0.00

3.2 Listing groups of compartments


The following example shows the same list as in the first example, repeated for a group of compartments. Main macro: 100 110 120 130 140 150 160 170 180 190 200 210 220 230 240 250 260 270 280 290 300 310 320 330 340 350 360 370 380 390 400 410 410 420 430 440 END ** PROG - OUTPUT OF SOUNDING TABLE - GROUP ** This macro makes a sounding table for all compartments ** with a given type sounding device !CDE 0 &ONERR 99999 !ADD CP.SND-I ** (assignments, formats etc. as in the preceding example) &ADEV=.... sounding device (MS,RS,MU,RU,lS or LU) &I=LOCS(TYPELIST,ADEV) identify device &IF I>0 250 !TYPE Unknown device - give again &GOTO 190 &GARG='SND' &IF SBS(ADEV,2,2)='U' &GARG='ULLAGE' LQ GAUGE(&GARG), VNET('Trim +1')/1 VNET('Even keel'), VNET('Trim -1')/-1, VCORRH('Heel S')/-1, VCORRH('Heel P')/1 TOO HD=(S,U, '-', ' ') LMIN=18, SPACE=5, LNP=(' COMPARTMENT IDENT: %COMP', ' COMPARTMENT NAME: %SMDES', ' CONTENTS: %SMPDES', ' ') SDEV &ADEV * NL '&HEADER' ;** select device with permanent effect

SORT CCODE ;** sort according to CCODE SELECT TYPE=L ;** all compartments with liquid contents SELECT SDEV>&ADEV ;** subset with device of the given type ** array CPLIST contains list of selected compartments ** do the listing for all compartments selected !DO CP.SND.L NAME=CPLIST OF TEXT

The macro CP.SND.L, run in the DO command above, contains the following: 100 ** PROG LISTING COMMANDS FOR SINGLE COMPARTMENT

1992-2009 Napa Ltd. All rights reserved.

NAPA Online Manuals 2009.1 Capacities (CP)

21 (38)

110 120 130 140 150 160 170 180 190 200 210 220 230 240 250 260 270 280 290 300 310 315 320 330 340 END

&ONERR 730 COMP &NAME

(allows main loop to continue if error)

** select GSTEP so that the list fits into two pages GSTEP 10 -1 1 ;** note the trim range NARG ;** get number of arguments &IF NARG<100 270 GSTEP 50 -1 1 &IF NARG<100 270 GSTEP 100 -1 1 &IF NARG<100 270 !TYPE GSTEP replaced by step STEP 0.5 ** ----------------- start listing, headers first TYPE COMPARTMENT IDENT: &COMP TYPE COMPARTMENT NAME: &SMDES TYPE CONTENTS: &SMPDES TYPE NET VOLUME, CUBIC METRES TYPE LIST NP OF TEXT

3.3 Example macro for LIST .macro


The following macro has been distributed as an example of writing macros of this type. Note specially that a set selected with SELECT causes the whole set to be run. (This macro is independent of line numbers, which are not listed). @@ Basic listing, use 'LIST .STD ?' for help @ECHO OFF @@ Common declarations !VAR @ !VAR TILDE ~ @IR=LOCS(LISTPAR,'?') @@ Check for ? @IF IR>0 @GOTO HELP @ONERR END @I=1 @VT=VTYP('CPLIST') @N=0 @IF VT>0 @N=RSIZE(CPLIST) @IF N>0 THEN @ONERR NEXT COMP @CPLIST(1) @ELSE @VT=VTYP('COMP') @IF VT=0 THEN !TYPE No compartment has been selected !TYPE Use SELECT crit to select many or COMP to select one @GOTO END @ENDIF @N=1 @ENDIF

1992-2009 Napa Ltd. All rights reserved.

NAPA Online Manuals 2009.1 Capacities (CP)

22 (38)

@IR=LOCS(LISTPAR,'C') @@ Check for argument C @IF IR=0 NL 'Compartment tables' @LABEL LIST NP TYPE TYPE Compartment ident: @COMP TYPE Compartment descr: @SMDES TYPE Contents : @SMPDES (@SMPURP, RHO = @SMRHO) TYPE TYPE Extreme points of comp: Aft end at frame @FMT(FR(SMXMIN),1,7)) TYPE Fore end at frame @FMT(FR(SMXMAX)),1,7) TYPE Lowest point ~ @FMT((LL(COMP,3)),2,7) m above BL TYPE Highest point ~ @FMT((UL(COMP,3)),2,7) m above BL TYPE LIST @LABEL NEXT @IF I=N @GOTO END @I=I+1 COMP @CPLIST(I) @GOTO LIST @GOTO END @LABEL HELP !TYPE !TYPE Instructions for command LIST .STD !TYPE !TYPE The listing gives a short header and the basic list for each !TYPE compartment. The contents of the list is controlled by the !TYPE arguments and the LQ and TOO. A new list named !TYPE 'Compartment tables' is opened unless option C (continue) !TYPE is given. !TYPE If a selection has been given (command SELECT) all !TYPE compartments are listed, else the current one only. !TYPE A selection can be cancelled with command SELECT OFF. !TYPE @LABEL END !VAR STD @@ Reset variables and tilde Output example. Compartment ident: R10 Compartment descr: Front peak tank Contents : DAY TANK (DT, RHO = 0.8) Extreme points of comp: Aft end at frame 139.9 Fore end at frame 152.6 Lowest point 0.00 m above BL Highest point 7.20 m above BL --------------------------------------------------------H VNET CGX CGY CGZ AWP CGXA CGYA M M3 M M M M2 M M --------------------------------------------------------0.00 0.0 95.52 0.00 0.00 2.6 95.61 0.00 0.50 5.3 97.12 0.00 0.31 17.5 97.47 0.00 1.00 16.8 97.59 0.00 0.62 26.8 97.75 0.00

1992-2009 Napa Ltd. All rights reserved.

NAPA Online Manuals 2009.1 Capacities (CP)

23 (38)

1.50 31.7 97.78 0.00 0.92 31.9 97.86 0.00 2.00 48.8 97.87 0.00 1.20 34.7 97.92 0.00 2.50 67.1 97.94 0.00 1.48 35.8 97.96 0.00 3.00 84.7 97.96 0.00 1.75 33.7 97.67 0.00 3.50 99.8 97.85 0.00 2.00 29.6 97.34 0.00 4.00 112.6 97.75 0.00 2.20 23.1 96.87 0.00 4.50 122.8 97.62 0.00 2.36 18.5 96.34 0.00 5.00 132.5 97.53 0.00 2.53 20.6 96.37 0.00 5.50 144.0 97.44 0.00 2.76 27.1 96.54 0.00 6.00 159.7 97.42 0.00 3.07 34.8 96.71 0.00 6.50 180.0 97.38 0.00 3.43 43.1 96.86 0.00 7.00 203.8 97.34 0.00 3.82 51.3 96.96 0.00 7.20 214.8 97.33 0.00 3.94 0.0 96.96 0.00 ---------------------------------------------------------

3.4 Example of plotting


This example is a macro intended to be used with the PLOT .macro command. It uses a figure named PLD1, containing a number of text fields. After the listing, an example of output and the corresponding PQ/POO are given. @@ Basic plotting, use 'PLOT .STD ?' for help @ECHO OFF !VAR @ !VAR TILDE ~ @I=1 @IR=LOCS(LISTPAR,'?') @IF IR>0 @GOTO HELP @ONERR END @VT=VTYP('CPLIST') @N=0 @IF VT>0 @N=RSIZE(CPLIST) @IF N>0 THEN @N=RSIZE(CPLIST) @ONERR NEXT COMP @CPLIST(1) @ELSE @VT=VTYP('COMP') @IF VT=0 THEN !TYPE no compartment has been selected !TYPE Use SELECT to select many or GET name to select one @GOTO END @ENDIF @N=1 @ENDIF @IR=LOCS(LISTPAR,'C') @IF IR=0 DR;DRAWING 'TANK_DIAG';END; @LABEL LIST PLD POO SUB, NAME=@COMP, FIG=PLD1, T2='Compartment ident: @COMP', T3='Compartment descr: @SMDES', T4='Contents : @SMPDES (@SMPURP, RHO = @SMRHO)', T11='TANK DIAGRAM', T14=' @DTX(DT)', T15=' @DTX(TM)', T16=' @DTX(YCN)',

1992-2009 Napa Ltd. All rights reserved.

NAPA Online Manuals 2009.1 Capacities (CP)

24 (38)

T17=' @DTX(SGN)', T18=' @DTX(PRV)' @LABEL NEXT @IF I=N @GOTO END @I=I+1 COMP @CPLIST(I) @GOTO LIST @LABEL HELP !TYPE Instructions for command PLOT .STD !TYPE !TYPE The command creates a PLD drawing for each tank selected, !TYPE as subdrawings to the main drawing TANK_DIAG. An option C !TYPE (as in continue) causes the macro not to create a new drawing !TYPE but continue to add subdrawings to the current one. !TYPE !TYPE If a selection has been given (SELECT) all compartments !TYPE are plotted, else the current one only. !TYPE A selection can be cancelled with command SELECT OFF. @LABEL END !VAR STD Output example:

Tank diagram The example was made with the following plot quantities (PQ) and plot options (POO): PQ CP, H, VOLM, CGX, TMY, (CGZ) POO CP, BOX, VA, LGTEXT=S, LEGEND, LGTYPE=IL, LGH=*1.1, NET=P2021, SMOOTH, ARG: AXIS=LB,

1992-2009 Napa Ltd. All rights reserved.

NAPA Online Manuals 2009.1 Capacities (CP)

25 (38)

F1: F2: F3: F4: CGX: ARG:

AXIS=LB, PEN=A1, AXIS=UA, PEN=A2, SCALE=(F1), AXIS=UL, PEN=A3, SCALE=(F1), AXIS=LA, PEN=A4, SCALE=(F1), SCALE=OFF, RMARG=1, NOM=CGZ, NAXIS=UA

This set of options is designed to produce a reasonable plot with up to four freely selected quantities in the PQ.

4 Commands and service functions


4.1 Main task
ADD additional argument values This command adds depth arguments to those obtained from the main argument (STEP,H,GAUGE or GSTEP, not VOL or VSTEP). ADD value, value, ... Directly given values. These are cancelled when giving a new main argument or changing compartment. value: additional depth argument values, interpreted as the same quantity as the current main argument, and in the same unit. An asterisk as prefix means a discontinuity, and two values are added, one on either side of the given one.

ADD TE 'Tube end', add the end of the sounding tube when generating gauges from the GSTEP argument. ADD GMAX Add the value corresponding to maximum fill to the gauges obtained from GSTEP, taking into account current trim and heel. ADD STEPS Add steps in the volume=f(depth) curve to the arguments. This alternative is available for H and STEP arguments only. ADD OFF Cancels previous ADD commands. If many different types of ADD's are given, they have to be given in different ADD commands. An ADD command of a different type will not make the previous ones inactive. ARGS list arguments This command lists the current calculation arguments in the form used for input. A short explanation is added as comment. ARR select arrangement

1992-2009 Napa Ltd. All rights reserved.

NAPA Online Manuals 2009.1 Capacities (CP)

26 (38)

This command selects the arrangement to be used as source of compartment data. Default is the one registered as permanent or (if defined) a subset named by adding prefix LD (as under LOAD). ARR id id: CNV name of arrangement convert old device definitions This command permanently converts sounding device definitions from the old format to the new one. Old=older than rel. 87. CNV OLD COMP select compartment This command selects the compartment to be calculated. If the compartment belongs to the current arrangement, the density of the contents (argument RHO) and the steel reduction (RED) are assigned. A sounding devices is selected, if any (first one or as spec. with command SDEV ... *). The compartment name is stored in the variable 'COMP'. If it belongs to the current arrangement, the main parameters are stored in variables SMPURP=purpose, SMVOL=volume etc. (see documents). COMP name name: DMODE name of compartment control listing of dummy values This argument controls the way undefined or redundant values are listed. DMODE option option: string containing one or several of the following characters (other characters ignored): V: G: S: EXAMPLE DMODE VGS DR -&gt; enter drawing task The standard drawing task is entered. Return to CP is done with command CP or OK. EDIT END FIG -&gt; enter editor finish the task add figure to the list See !EXPL FIG/GEN FILL depth argument as filling replace redundant volumes (and areas) with space or minus replace undefined centers of gravities with space or minus use space (instead of minus) for dummy values

1992-2009 Napa Ltd. All rights reserved.

NAPA Online Manuals 2009.1 Capacities (CP)

27 (38)

The calculation depths are expressed as filling i.e. fraction of total volume. Effect of varying steel reduction not taken into account. FILL values FSTEP depth argument as filling. equal spacing As FILL, but the values are selected as a multiple of the given step. FSTEP step GAUGE sounding device readings (argument) This command defines the calculation heights by sounding values. A subsequent COMP or SDEV command will cancel the values set with this command (assumed no longer relevant). GAUGE values values: GET sounding values in the standard form get compartment Synonym for COMP. With parameter OLD, device definitions in the old format are converted to the new one for the duration of this task (see also CNV OLD). GSTEP step for sounding device argument This command defines sounding arguments by a step. The arguments will be selected in the range covered by the heights of the tank and the sounding device. See also argument TRRANGE. GSTEP step trimrange step: trimrange: H value of step (opt) old form of giving the trim range, replaced by argument TRRANGE. calculation heights This command specifies calculation depths by heights measured from the reference height (see command REFZ). The H quantity is well defined only when the ship is upright (trim=0, heel=0). H values values: HEEL set of values in the standard form calculation heel This command defines the calculation heel. Default=zero. NOTE: quantities FSM and VCORRH should normally be calculated with initial heel 0 (=the HEEL argument), while the additional heel argument needed is given as qualifier in the LQ (see !EXPL LQ). HEEL heel LF add line feeds This command adds empty lines, either a specified number or until a specified position on the page, see !EXPL LF/GEN. LIST start listing

1992-2009 Napa Ltd. All rights reserved.

NAPA Online Manuals 2009.1 Capacities (CP)

28 (38)

This command starts various listings. LIST CP t-options This gives the basic list. The quantities to be listed are specified by command LQ. CP is default if no argument is given in the command. t-options: standard table output options, see !EXPL TOO/GEN

LIST REF/OBJ/EXP List various background data, REF=referenc system, OBJ=current hull object, EXP=explanations of quantities. LIST .id List according to standard macro. For alternatives, use LIST .CAT. LQ select output quantities This command selects the quantities included in output started with LIST CP (or bare LIST). For full instructions on the LQ command, use !EXPL LQ/GEN. A numeric qualifier (not zero) is taken into account in the following cases: Centers of gravity: reference coordinate (default 0) Volumes and weight: trim value, e.g. VOLM/1 SCORRT,VCORRT: trim SCORRH,VCORRH: heeling FSM: heeling The following string qualifiers can be used: Volumes and weight: trim and/or heel, using symbols T and H, followed by a value, e.g. VOLM/T1 VOLM/T1H5 VOLM/H1 GAUGE: R=reverse, convert sounding to ullage or vice versa. Only when argument=gauge or gstep and the current device is a tube. With subject SM (i.e. LQ SM ...) the LQ command concerns the listing with SML. NARG number of depth arguments The number of depths (=data lines in the table) is listed and stored in variable NARG. NL new list This command can be used to start a new list or specify parameters of the list. See !EXPL NL/ GEN. Default for the list name is 'TANK TABLES'. NP new page This command causes the result listing to continue on a new page. PAR -&gt; definition of sounding devices ao In this subtask, various permanent definitions related to NCP are made, e.g. sounding devices are defined in this task.

1992-2009 Napa Ltd. All rights reserved.

NAPA Online Manuals 2009.1 Capacities (CP)

29 (38)

PLD

draw diagram This command draws a diagram showing the quantities selected with command PQ and using the options set by command POO.

PLD POO plot-options plot-options: (opt) standard plot options, see !EXP PLD/GEN. If this part is given, the keyword POO must be added. PLOT run plot macro This command runs plot created as a macro, PLOT .macro options macro: POO name of macro (complete name PLOTCP.macro). .CAT gives catalog. set plot output options This command handles plot output options for diagrams drawn with command PLD. For the syntax of the POO command, see !EXPL POO/GEN. PQ select quantities for diagram This command selects the quantities to be output graphically using command PLD. The first quantity in the list is used as the argument. The available quantities and the meaning of qualifiers are the same is in command LQ. For the general syntax of the PQ command, see !EXPL LQ/GEN. RED set steel reduction The steel reduction is used for calculating net volume and weight of contents. When selecting a compartment, the steel reduction is set to the value defined in the arrangement, if any, otherwise 0. RED value REFZ reference height for calculation heights This command defines the reference height from which the calculation heights given by H are counted. When a new compartment is read, REFZ is set to the reference height defined for it, if any, otherwise the lowest z-coordinate of the tank. REFZ h * h: *: new ref. height (opt) makes the height valid for subsequent comppartments also. This option is cancelled with REFZ -. set density of contents The density of contents is used if weights or free surface moments are calculated. When selecting a compartment, the density is set to the value defined in the arrangement, if any, otherwise 1. RHO rho SCAN -&gt; enter list scanner

RHO

1992-2009 Napa Ltd. All rights reserved.

NAPA Online Manuals 2009.1 Capacities (CP)

30 (38)

For more details, see !EXPL SCAN/GEN. SCAN SEND just sends the current result list to the printer. Note: the current result list closed. SDEV select sounding device This command selects the sounding device for the current compartment or a default for subsequent compartments. SDEV type/id * type: /id: *: type of device (MS,MU,RS,RU,LS or LU) (opt) additional identifier (opt) this option makes the selection default for subsequent COMP selections. Without this option, the effect concerns the current compartment only. select compartments This command selects a subset of compartments using the a selection criterion based on the compartment parameters (e.g. NAME, PURP, TYPE, CLASS, XMIN etc). The selection is stored in the calculator array CPLIST, which can be listed with !VAR LIST CPLIST. A preceding SORT command controls the order in the list. See also the second form. SELECT criterion criterion: selection criterion in the standard form (see !EXPL SEL/GEN), based on compartment parameters. EXAMPLES SELECT PURP=HFO SELECT NAME>T TYPE=L SELECT device-crit This form selects a subset based on sounding devices. A select from the arrangement (previous form) must first be made. The preceding selection is restricted to those compartments having a sounding device of the specified type. device-crit: criterion concerning sounding devices SDEV=type: SDEV=type/id: SDEV>type: SDEV<id: SML select with given type and empty id. 'type'=MS,RS, RS,RU,LR,LU or only M, R or L. select with given type and id. select with given type and unspecified id. select with given id and unspecified type.

SELECT

summary of compartments. This is the same function as LIST under SM, and produces data for the compartments in the current arrangement. The result can be controlled with commands SELECT and SORT. When selecting quantities with LQ, subject SM must be added (LQ CP is the default). For more information, see !EXPL LIST/S01.

SORT

specify sorting

1992-2009 Napa Ltd. All rights reserved.

NAPA Online Manuals 2009.1 Capacities (CP)

31 (38)

This command specifies sorting that affects the result of the SELECT command. For sorting the output of SML, use TOO SM ... SORT qnt qnt: -: STEP quantity to be sorted, e.g. NAME, PURP, XMIN. (opt) make the sorting is descending order calculation step This command defines the calculation heights by specifying a step. The calculation heights are selected at multiples of the step within the range covered by the compartment. STEP step TABLE -&gt; enter table calulation The command gives access to the table calculation task, to which CP data can be transferred by generating a table with the table output option TABLE. TOO set table output options This is the standard command for setting table output options for controlling the layout of the listing with LIST (subject CP) or SML (subject SM). See !EXPL TOO/GEN. TR calculation trim See !EXPL TRI. TRIM calculation trim This command defines the calculation trim. Default is zero trim. Note that the trim argument can be overridden for given quantities by qualifiers in the LQ. TRRANGE trimrange for applying GSTEP The command defines a trim range, taken into account when deciding the range from which gauge readings are selected when applying the GSTEP argument. TRRANGE trmin trmax trmin,trmax: TRRANGE OFF Cancel the TRRANGE argument. (The old syntax GSTEP trmin trmax is still available). TYPE print line This is the standard TYPE command for adding arbitrary text to the list, see !EXPL TYPE/GEN. VOL depth argument via volume This command selects the depth argument so that specified (net) volumes are obtained. VOL volumes lowest,highest trim in the range

1992-2009 Napa Ltd. All rights reserved.

NAPA Online Manuals 2009.1 Capacities (CP)

32 (38)

volumes: VSTEP

set of volumes depth argument as volume step This command selects the depth argument so that (net) volumes are obtained as multiples of the given step.

VSTEP step vstep: WLS volume step waterline section mode on/off The command specifies whether quantities related to the surface area should be calculated by doing sections from the object or by using the calculation sections. WLS ON/OFF ON: OFF: waterline section mode ON: generate sections for calculating the area related quantities. This alternative is more accurate, but is slower and involves the risk for failed sections. standard method, use the calculation sections.

4.1.1 Subtask PAR CATALOG catalog of sounding devices A list of sounding devices of the project is produced. The names listed are stored in an array named DEVLIST. CAT RED gives a catalog of all tanks having a variable steel reduction defined. DELETE deleting from the data base. This command deletes a sounding device or a steel reduction definition. DELETE DEV comp type/id comp: type/id: identification of compartment identifier of the sounding device as in command DEV

DELETE RED comp Delete the steel reduction defined for the compartment. EXAMPLE DELETE DEV T120 MS/NN DES a description of definition data

DES DEV comp type A definition list of sounding devices of the given compartment comp: type: name of compartment (opt) list only devices of the given type (MS...RU).

DES DEV array() type

1992-2009 Napa Ltd. All rights reserved.

NAPA Online Manuals 2009.1 Capacities (CP)

33 (38)

Repeat the operation for all names in the given array. DES DEV *; is shorthand for CAT;DES DEV DEVLIST() and gives the result for all tanks in the arrangement. type: DES OLD comp A definition list of old sounding devices of the given compartment. comp: DES RED comp Display the definition of the steel reduction for the given compartment. DEVICE entering or updating of sounding devices This command redefines or adds a sounding device for a given tank. DEVICE comp id/name curve h This form defines a manual sounding device, where the soundings are formed by lengths measured along a tube. comp: id: /name: curve: name of tank to which it belongs type of device: MS=manual sounding or MU=manual ullage. (opt) name of device. Must be given when there are several devices of the same type in one compartment. definition of the geometry of the tube, either directly or by reference to a space curve: name: (x1,y1,z1), (x2,y2,z2)...: h: name of space curve curve defined by points in space identification of compartment (opt) list only devices of the given type (MS...RU).

(opt) height of zero point (MS only). Defines the point from which soundings are measured, default=startpoint of curve. h is measured in meters from the baseline, and has to be above the lower end of the pipe. EXAMPLES DEV T102 MS (#BH1+0.2 2 #TTOP) (#BH1+0.2 4 #TTOP+5), (#BH1+.02 4 #DECK1+0.4) DEV T102 MS/F MS-T102 4.5

DEVICE comp id/name (x,y,z) h Defines a remote sounding device, i.e. device measuring the orthogonal distance to the liquid surface. comp: id: /name: (x,y,z): as above type of device, RS=remote sounding, RU=remote ullage. For administrative purposes, the symbols LS and LU can be used instead of RS,RU. (opt) as above location of probe (point in space).

1992-2009 Napa Ltd. All rights reserved.

NAPA Online Manuals 2009.1 Capacities (CP)

34 (38)

h:

(opt) height correction, actual value-displayed value, default=0. EXAMPLE DEV T102 RS (#BH1+2, 0, #TTOP+0.1) 0.1

DEVICE comp DS/name (x,y,z) h Defines a dip sounding device, i.e device measuring the immersed part of a line lowered from a fixed point to the tank bottom. comp: name: (x,y,z): h: EDIT as above as above point from which the line is lowered height of tank bottom (or place where the dip touches the bottom) enter editor This command is in all respects equivalent with DES, except that the result is stored in the editor work area and the editor is started. Within the editor, all editor commands are available, including SAVE and REPLACE. Exit from the editor can take place the normal way (END, OMIT), or by using the command ADD, in which case the contents of the work area will be run as in *ADD. When EDIT is given without parameters, the editor is entered using the current contents of the work area. EDIT DEV comp comp: END END This record finishes the task and returns control to CP OK OK This record finishes the task and returns control to CP REDUCTION define variable steel reduction This command defines a steel reduction that varies with the filling. It is applied in the CP task only. See also commands DEL, DES and CAT. RED name (z1,r1) (z2,r2), ... Defines local reduction as function of height name: z1,z2: r1,r2: name of compartment heights from the baseline corresponding LOCAL steel reduction, i.e. fraction of the area at the given height. end of device definition identification of compartment end of device definition

RED name I (f1,r1) (f1,r2), ... Defines integrated reduction as function of filling degree.

1992-2009 Napa Ltd. All rights reserved.

NAPA Online Manuals 2009.1 Capacities (CP)

35 (38)

name: f1,f2: r1,r2:

name of compartment filling degree (0...1) corresponding steel reduction, as fraction of VOLUME

RED name TAB*table Use the given table as source for the steel reduction. The table must contain at least columns VOLM and VNET, and the volumes must be sorted in increasing order. ZREF ZREF t t: height from baseline bottom reference height of tank

4.2 Service functions


CP.DEVICES() sounding devices of compartment The function stores the sounding devices defined for a compartment in an array. The function value is the number of devices defined. CP.DEVICES(comp,array,filter) comp: array: filter: name of compartment array for storing the result. Previous contents are removed. (opt) restricts the devices returned by a criterion expressed by a filter (see !EXP WILD/GEN)

list=CP.DEVICES(comp,filter) As above, but the result array is reserved internally. it will be reused at the next call. EXAMPLES @DEVLIST=ARR(3) @N=CP.DEVICES('R10',DEVLIST) The contents of DEVLIST could be 'MS', 'MS/V1', 'RS'. CP.GAUGE() convert draught to gauge reading The function returns the gauge reading corresponding to a filling height expressed by draught. The reverse function is done by CP.T. CP.GAUGE(comp,device,t,trim,heel) comp: device: T: trim: heel: name of compartment sounding device (MS, RS etc). For local definition, see CP.VOLG. draught (opt) trim (m), default=0 (opt) heel,degrees, default 0 EXAMPLE

1992-2009 Napa Ltd. All rights reserved.

NAPA Online Manuals 2009.1 Capacities (CP)

36 (38)

CP.GAUGE('R10','MS',1.2) CP.T() convert gauge reading to draught The function returns the filling height expressed as draught corresponding to a gauge reading. The reverse function is done by CP.GAUGE. CP.T(comp,device,gauge,trim,heel) comp: device: gauge: trim: heel: name of compartment sounding device (MS, RS etc). For local definition, see CP.VOLG. gauge reading, m (opt) trim, m, default=0 (opt) heel, degrees, default 0 EXAMPLE CP.T('R10','MS',0.52) CP.GVOL() convert volume to gauge reading The function returns the gauge reading corresponding to filling expressed by a volume. The reverse function is done by CP.VOLG. CP.GVOL(comp,device,vol,trim,heel,red,opt) Parameters can be omitted from the end. comp: device: vol: trim: heel: red: name of compartment sounding device (MS, RS etc). For local definition, see CP.VOLG. net volume (opt) trim (m), default=0 (opt) heel,degrees, default 0 (opt) steel reduction, default=no steel reduction value: SM: V: opt: options I: S: EXAMPLE Return the gauge reading on MS when the net volume in R10 is 30.5, applying the steel reduction obtained from SM. CP.GVOL('R10','MS',30.5,0,0,'SM') trim, heel in internal units silent, make no error messages for missing devices explicit value as a fraction (0...1), default=0 the value defined in SM. 0 if not defined. the value obtained from the varying steel reduction (as defined by RED in subtask PAR of CP). Same as SM if not defined.

1992-2009 Napa Ltd. All rights reserved.

NAPA Online Manuals 2009.1 Capacities (CP)

37 (38)

CP.VOLG()

convert gauge reading to volume The function returns the volume corresponding to a gauge reading. The reverse function is done by CP.GVOL.

CP.VOLG(comp,device,gauge,trim,heel,red,opt) Parameters can be omitted from the end. comp: device: id: arr: sounding device, given by its name (MS, RS etc) real array containing the elements type, h, x, y, z [x y z ...] where H and the coordianates correspond to the parameters given in PAR/CP and 'type' gives the type: 1=MS, 2=MU, 3=RS, 4=RU, 5=DS. name of compartment

gauge: trim: heel: red:

gauge reading, m (opt) trim, m, default=0 (opt) heel, degrees, default 0 (opt) steel reduction, default=no steel reduction value: SM: V: explicit value as a fraction (0...1), default=0 the value defined in SM. 0 if not defined. the value obtained from the varying steel reduction (as defined by RED in subtask PAR of CP). Same as SM if not defined.

opt:

options I: S: EXAMPLE CP.VOLG('R10','MS',0.52) Return the moulded volume when the reading of MS is 0.52. CP.VOLG('R10','MS',0.52,0,0,'V') Return the net volume when the reading of MS is 0.52, applying the varible steel reduction. trim, heel in internal units silent, make no error messages for missing devices

CP.GEOM()

device geometry This function returns the geometry of a sounding device as a curve or point object or as three coordinates only. The result is returned as the function value (reference number to a curve, point object or calculator array).

p=CP.GEOM(comp,device) Return coordinates of the device (endpoint if manual one) in the array p. NOTE: if the call is repeated, the same array is reused. comp: device: name of compartment sounding device (MS, RS, MS/id etc)

1992-2009 Napa Ltd. All rights reserved.

NAPA Online Manuals 2009.1 Capacities (CP)

38 (38)

obj=CP.GEOM(comp,device,name) A above, but return a curve or point object. name: name of the result. A curve is returned for a manual device (RU,RS) and a point object for others. NOTE: the curve is not stored in the data base (can be done with the DB.WRITE function). EXAMPLES @p=cp.geom('T10','RS/D1') !type Device RS/D1 located at x=@p(1) y=@p(2) z=@p(3) @cur=cp.geom('T10','MS','TUBE') PLOT TUBE @l=length(cur) CP.VARRED() get variable steel reduction The function returns the steel reduction valid for a specified filling of a given tank, when applying the definition given by RED in subtask PAR of CP. If there is no variable steel reduction defined, the fixed one from SM is returned with a warning, red=CP.VARRED(comp,fill) comp: fill: name of compartment (opt) filling degree, either as a fraction (value<=1) or volume (value>1). Default=1.

run command of subtask PAR CP.PARCOMMAND() This function runs any command available in the subtask PAR of CP, mainly definitions related to sounding devices. CP.PARCOMMAND(command) command: string representing the command to be run. Double apostrophes are converted to single ones and upper case conversion done as in normal commands.

CP.PARCOMMAND(id,parameters) As above, but the command identifier is given separately. id: parameters: command identifier string containing the parameters.

CP.PARCOMMAND(id,arr) As above, but the parameters are fed by an array.

1992-2009 Napa Ltd. All rights reserved.

Você também pode gostar