To compute the sea pressures on the vessel, the program must know the form of the vessel below the water. This is communicated to MOSES by a set of vessel description data, defined earlier, and the current condition of the body. To initiate the pressure computations discussed above, one must issue:

G_PRESSURE, BODY_NAME, PKT_NAME -OPTIONS

and the available options are:

-HEADING, H(1), H(2), ...., H(n)-PERIOD, T(1), T(2), ...., T(n)-MAX_DIST, DIST-MD_TYPE, METHOD

When this command is issued, MOSES will take the system in its current configuration and compute frequency domain pressures and a total hydrodynamic database for the body BODY_NAME. This data will be stored by the name PKT_NAME in the database.

The **-HEADING** option is used to change the default values of vessel heading for which results will be computed. H(i) is the ith value of heading
(deg.) to be considered. Here, heading is measured as an angle from the X axis, positive toward Y. Hence, for a vessel described with the origin at the bow, head seas
are 180 degrees. The **-PERIOD** option is used to alter the default values of encounter period, and T(i) is the ith value of encounter period in
seconds. As many of these options as needed can be input, so long as the number of periods does not exceed 200. The defaults for heading and period are set with
options on **&DEFAULT**.

When the **G_PRESSURE** command is issued, MOSES takes the vessel description and the condition defined, and converts the vessel description into one describing the
vessel below the waterplane. The program will then compute the added inertia and damping matrices, and the applied forces on the vessel. These computations will be
performed for the periods and headings defined by the command. In converting the model, the two options **-M_DISTANCE** of the **&PARAMETER** command are used to refine the
computation. Use of these options allows one to define a quite crude mesh and have MOSES automatically refine it to achieve any desired degree of precision. Also, the
option **-MAX_DIST** provides a way to get approximate solutions to large diffraction problems with reduced computational effort. This option defines a
maximum distance (feet or meters) for panel interaction. Any two panels which have a distance between them greater than DIST will have a zero for their coupling terms
in the diffraction matrix. For very long slender bodies, this option can be used quite effectively to save computer effort. For a body 4000 ft long with 6000
diffraction panels, answers within 10% of the exact ones can be obtained in 66% of the time.

The **-MD_TYPE** option allows the user to choose a method for calculating the mean drift forces on the body. The default is the pressure integration method which is
selected with the parameter NEARFIELD. The Salvesen method can be selected with the parameter SALVESEN. Alternatively the user can select to use the momentum method
with the parameter FARFIELD, however this will only produce mean drift forces for the horizontal components (X and Y) and the vertical moment (RZ). Note that the mean
wave drift parameters will be reset by any calls to the deprecated **G_MDRIFT** command; it is therefore highly recommended that all options and parameters for **G_PRESSURE**
are always explicitly specified.

Once one has a pressure database, it can be examined in the Disposition Menu. In particular, the command

V_MATRICES, BODY_NAME

will gather the added mass and damping matrices for the pressure packet currently associated with body BODY_NAME and place the user in the Disposition Menu. Alternately, the command

V_EXFORCES, BODY_NAME

will do the same thing with the wave excitation forces. For both of these commands, the results are about the origin.

As mentioned earlier, it is possible to define the hydrodynamic pressure distribution and/or the total hydrodynamic database via commands. The same device is used if one has computed hydrodynamic pressures and wished to "save" them for use later. This capability can be quite useful when analyzing a large diffraction model. For instance, one could alter the mooring lines of system, and use the importation feature to save time in the reanalysis. Caution should be used here, so that only changes to the model that do not effect hydrodynamic properties are performed. To emit a hydrodynamic database, one issues:

E_PRESSURE, BODY_NAME -OPTION

where BODY_NAME is the name of the body for which hydrodynamic databases will be emitted. This command will export a pressure database for the packets currently
associated with the body BODY_NAME. Here, the only option is **-NOTE**, which is just like the same option on model definition} commands. In particular, you need to
specify all five characters of the option, and the note that you attach will be included as a comment in the emitted file. Also, the title and subtitle will be
included if they are not blank. No drift or total data will be emitted since it is recomputed when the pressure data is imported. It is possible to export (and
subsequently import) a total hydrodynamic database. This is accomplished with:

E_TOTAL, BODY_NAME -OPTION

The resulting output is substantially smaller than the pressure database. Here the options and titles are the same as for the pressure database. This file, however,
consists data for both Total force and drift force. For simulation purposes, this is all that is necessary, but it cannot be used for computing structural loads. When
such a database is input, a *single* warning to this effect will be given.

The format of an exported pressure database is the same as the one used to define the data directly to MOSES. It begins with the command:

I_PRESSURE, BODY_NAME, PKT_NAME, DISPL, -OPTIONS

which places the user in a submenu. Here, BODY_NAME is the name of the body for which the database is being generated, PKT_NAME is a desired packet name, DISPL is the displacement at the condition being defined, and the options are:

-PERIOD, T(1), T(2), ......-HEADING, H(1), H(2), ......-CONDITION, DRAFT, ROLL, PITCH

Even though these items are called options, the first three of them are necessary to properly define the database. The **-PERIOD** option defines the
periods (sec) for which the database will be defined, and **-HEADING** defines the headings (deg) for which the exciting forces will be defined. The **-CONDITION** option defines the vessel condition for which the database is defined and DRAFT, ROLL, and PITCH are the draft (feet or meters), roll
(deg), and pitch (deg) defining the condition. The remaining options were described previously.

Once the menu has been entered, several commands are available. First, the command:

FP_MAP, PANEL_NAME, :PNT_SEL(1), :PNT_SEL(2), .......

defines a how the structural loads on the panel PANEL_NAME will be mapped to all points matching :PNT_SEL(i). The command:

FPANEL, PANEL_NAME, AREA, XC, YC, ZC, NX, NY, NZ, WLLEN

defines a panel. Here, PANEL_NAME is the name of the panel, XC, YC, and ZC are the coordinates ( feet or meters ) of its centroid, NX, NY, and NZ are the components of its normal, and WLLEN is the length of the intersection of the panel with the waterline ( feet or meters ).

After a panel has been defined, the pressures acting on it are defined through a set of velocity potentials with commands:

FPPHI, PER, RPRX, IPRX, RPRY, IPRY, .... \ RPRRZ, IPRRZ, RPDH(1), IPDH(1), ...

Here, PER is one of the periods T(i), and the remainder of the data are velocity potentials per unit wave amplitude (feet or meters). These commands *must* be in
decreasing order of period. In other words, the value of PER for a given command must be less than the value of PER for the previous one and greater than PER for the
next one. The velocity potentials are pairs of real and imaginary numbers. The first six pair (twelve numbers) are the radiation potentials, and the remainder are
diffraction potentials. The diffraction potentials correspond to the headings H(i), and are in the same order.

The final type of data for a panel is defined with:

FDELP, PER, RPRXX, IPRXX, RPRXY, IPRXY, .... \ RPRRZZ, IPRRZZ, RPDHX(1), IPDHX(1), ...

These quantities are the gradients of the potentials defined with the **FPPHI** command, and thus there will be 3 times as many values as on the **FPPHI** command. If these
are viewed as complex numbers, then the first three numbers are the derivatives with respect to X, Y, and Z of the first potential on **FPPHI**. The first 36 values (18
complex numbers) are gradients of the radiation potentials. The gradients of the diffraction potentials follow for each heading.

After all of the panels have been defined, the menu is exited with an **END_I_PRESSURE** command.

To define a "total hydrodynamic database" one first issues:

I_TOTAL, BODY_NAME, PKT_NAME, DISPL, -OPTIONS

One can then describe the hydrodynamic data, and issue **END_I_TOTAL** to exit the menu. Here, BODY_NAME is the name of the body for which the database is being
generated, DISPL is the displacement at the condition being defined, and the options are:

-PERIOD, T(1), T(2), ......-HEADING, H(1), H(2), ......-CONDITION, DRAFT, ROLL, PITCH-SCFACT, SCLEN, SCMASS, SCDRAG, SCFOR

Even though these items are called options, the first three of them are necessary to properly define the database. The **-PERIOD** option defines the
periods (sec), for which the database will be defined, and **-HEADING** defines the headings (deg), for which the exciting forces will be defined. The **-CONDITION** option defines the vessel condition for which the database is defined and DRAFT, ROLL, and PITCH are the draft (feet or meters), roll
(deg), and pitch (deg) defining the condition.

The option **-SCFACT** defines a set of scale factors which can be used to convert to the units required. In other words, all of the quantities input via
the commands discussed below will be multiplied by the scale factors prior to being stored in the database. The manner in which these factors will be combined with
the input numbers will be discussed with each command.

After the **I_TOTAL** command, the database is defined by a sequence of the following commands:

H_ORIGIN, OX, OY, OZH_EULERA, EROLL, EPITCH, EYAWH_PERIOD, TH_AMASS, AM(1,1), AM(2,1), ...., AM(6,6)H_DAMP, DAMP(1,1), DAMP(2,1), ...., DAMP(6,6)H_FORCE, H, RFKX, RFKY, ... RFKYAW, IFKX, ..., IFKYAW \ RDIX, RDIY, ... RDIYAW, IDIX, ..., IDIYAW \

The **H_ORIGIN** and **H_EULERA** commands define a change of coordinate system from the one being input to the one employed by MOSES. Here, OX, OY, and OZ are the components
of a vector, in the MOSES body system from the origin in the local body system to the origin of the system in which the input quantities are computed. Likewise, the
quantities EROLL, EPITCH, and EYAW are three Euler angles (deg). These angles, when applied as a yaw followed by a pitch, followed by a roll, define the direction
cosine matrix which transforms the system in which the quantities are computed to the local body system. If either of these two commands is omitted, the corresponding
transformation will be assumed to be the identity. Once a transformation has been defined, it will be used until it is redefined by another similar command.

The **H_PERIOD** command defines the period for all quantities which follow until a new **H_PERIOD** command is encountered. Here, T is the period (sec) and it must have been
defined by the **-PERIOD** option on the **I_TOTAL** command. If the period defined by an **H_PERIOD** command is the same as one previously used, the data following will be
added to the previous data for the same period. Thus, one can define the properties of a complicated body by inputting the properties for each piece of the body and
letting MOSES combine them to form the properties of the body.

The remaining commands are used to actually define the hydrodynamic properties for the "current" period, and they can be repeated as many times as desired until an
**END** is encountered. This marks the end of the hydrodynamic database definition for a given body.

The **H_AMASS** and **H_DAMP** commands define the added mass and linear damping matrices respectively. The data is input on the command by columns of the matrix. The values
which MOSES needs for the added mass matrix are added mass divided by displaced mass, and the length units should be feet or meters. When an **H_AMASS** command is input,
the top 3x3 is multiplied by SCMASS, the two coupling 3x3 matrices are multiplied by SCMASS*SCMASS, and the bottom 3x3 is multiplied by SCMASS*SCLEN*SCLEN, as defined
with the **-SCFACT** option. It is the product of the input values times the scale factors which should have the dimensions defined above. The scaling for the damping
matrix is similar to that for the added mass except that SCDRAG is used instead of SCMASS. The desired units for the product of the input values and the scale factors
is damping coefficient divided by displaced mass.

The **H_FORCE** command defines the wave exciting force for the heading, H, which has been defined by the **-HEADING** option on the **I_TOTAL** command. The first twelve values
define the Froude-Krylov force, the next twelve define the diffraction force. The first three values for each force will be scaled by SCFOR, and the last three will
be scaled by SCFOR*SCLEN, as defined on the **-SCFACT** option. The product of the input values times the scale factors should be either bforce, and feet or meters,
depending upon the last **&DIMEN** command.