.. _hd-output:

Output Files
============
HydroDyn produces three types of output files: an echo file, a summary 
file, and a time-series file. The following sections detail the 
purpose and contents of these files.

Echo Files
~~~~~~~~~~
If you set the **Echo** flag to TRUE in the HydroDyn driver file or the
HydroDyn primary input file, the contents of those files will be echoed
to a file with the naming conventions, **OutRootName**\ *.dvr.ech* for
the driver input file and **OutRootName**\ *.HD.ech* for the HydroDyn
primary input file. **OutRootName** is either specified in the HYDRODYN
section of the driver input file, or by the OpenFAST program. The echo files
are helpful for debugging your input files. The contents of an echo file
will be truncated if HydroDyn encounters an error while parsing an input
file. The error usually corresponds to the line after the last
successfully echoed line.

.. _hd-summary-file:

Summary File
~~~~~~~~~~~~
HydroDyn generates a summary file with the naming convention,
**OutRootName**\ *.HD.sum* if the **HDSum** parameter is set to TRUE.
This file summarizes key information about your hydrodynamics model,
including buoyancy, substructure volumes, marine growth weight, the
simulation mesh and its properties, and the radiation kernel for 
potential-flow bodies.

When the text refers to an index, it is referring to a given row in a
table. The indexing starts at 1 and increases consecutively down the
rows.

WAMIT-Model Volume and Buoyancy Information
-------------------------------------------
This section summarizes the buoyancy of each potential-flow body in 
its undisplaced position. For a hybrid potential-flow/strip-theory 
model, these buoyancy values must be added to any strip-theory member 
buoyancy reported in the subsequent sections to obtain the total 
buoyancy of the platform.

Strip-Theory Volume Calculations
--------------------------------
This section contains a summary of the combined total volume, 
submerged volume, volume of any marine growth, and fluid-filled
(flooded/ballasted) volume of all strip-theory members in their undisplaced
positions. Except for the fluid-filled volume value, the reported
volumes are only for members that have the **PropPot** flag set to
FALSE. The flooded/ballasted volume applies to any fluid-filled member,
regardless of its **PropPot** flag.

Total Buoyancy Loads
-------------------------
This section details the buoyancy loads of the undisplaced substructure
when summed about (0,0,0). The external buoyancy includes the
effects of marine growth, and only applies to members whose **PropPot**
flag is set to FALSE. The internal buoyancy is the negative effect on
buoyancy due to flooding or ballasting and is independent of the
**PropPot** flag.

Integrated Marine Growth Weights
--------------------------------
This section details the marine growth weight loads of the undisplaced
substructure when summed about (0,0,0).

Strip-Theory Node Table
-----------------------
This table details the undisplaced strip-theory nodal information and properties for
all user defined joints and internal analysis nodes generated by HydroDyn. 
The internal nodes are generated by splitting input members somewhere 
along its length to meet the requirements of the **MDivSize** parameter in 
the primary input file member table. The node index is provided in the 
first column. The second column provides the input member index (not to be 
confused with the **MemberID**) each internal node belongs to. 
User-defined joints do not necessarily belong to a specific member, so no 
information is provided on this column for these joints. **Nxi**, **Nyi**, and **Nzi** 
provide the (*X*,\ *Y*,\ *Z*) coordinates in the global inertial-frame 
coordinate system. **R** is the outer radius of the member at the node 
(excluding marine growth), and **t** is the member wall thickness at the node. 
**tMG** is the marine growth thickness, and **MGDens** is the marine growth 
density. **PropPot** indicates whether the element attached to this node 
is modeled using potential-flow theory. If **FilledFlag** is TRUE, then **FillMass**
gives the filled fluid mass assigned to the node. **Cd**, **Ca**, **Cp**, **Cb**, **AxCd**, **AxCa**,
**AxCp**, **JAxCd**, **JAxCa**, and **JAxCp** are the transverse drag,
transverse added-mass, transverse dynamic-pressure, buoyancy-scaling, axial drag, axial added-mass, 
axial dynamic-pressure, endplate axial drag, endplate axial added-mass, and
endplate axial dynamic-pressure coefficients, respectively. Note that some of the columns 
are only populated for user-defined joints, while other columns are only populated 
for internal analysis nodes belonging to a single member.

.. TODO 7.5.2 is the theory section which does not yet exist.
.. See Section 7.5.2 for the member splitting rules used by HydroDyn.

Strip-Theory Member Table
-------------------------
This section details the undisplaced strip-theory members and their
associated properties. A suffix of 1 or 2 in a column heading refers to
the starting or ending node of the member, respectively. The first column is
the member index. **joint1** and **joint2** refer to the node index found
in the node table of the previous section. Next are the member
**Length**, the number of subdivided elements **NElem** to meet the 
**MDivSize** requirement, and the exterior **Volume**. This exterior volume 
calculation includes any marine growth volume on the member. **MGVolume** provides the volume
contribution due to marine growth. **Volume** and **MGVolume** will be zeros 
for members modeled by potential flow, i.e., with **PropPot** = T for TRUE. 
The cross-sectional properties of outer radius (including marine growth) and wall thickness for each 
node are given by **R1**, **t1**, **R2**, and **t2**, respectively. **PropPot** indicates if
the member is modeled using potential-flow theory. If the element is
fluid-filled (has flooding or ballasting), **FilledFlag** is set to
T for TRUE. **FillDensity** and **FillFSLoc** are the filled fluid
density and the free-surface location (*Z*-coordinate in the global
inertial-frame coordinate system). **FillMass** is calculated by
multiplying the **FillDensity** value by the element’s interior volume.
Finally, the hydrodynamic coefficients at the two end joints are listed. 
These are the same coefficients listed in the node table (above).

Summary of User-Requested Outputs
---------------------------------
The summary file includes information about all requested member and
joint output channels.

Member Outputs
++++++++++++++
The first column lists the string labels of the data channels, as entered in
the OUTPUT CHANNELS section of the HydroDyn input file. **Xi**, **Yi**,
and **Zi** provide the coordinates of the output location in the global
inertial-frame system when the structure is not displaced. The next column, 
**MemberID**, tells you the corresponding input member index. Next are 
the coordinates of the starting (**StartXi**, **StartYi**, **StartZi**) 
and ending (**EndXi**, **EndYi**, **EndZi**) nodes of the member containing 
this output location. **Loc** is the normalized distance from the starting 
node of this member.

Joint Outputs
+++++++++++++
The first column lists the string labels of the data channels, as entered in
the OUTPUT CHANNELS section of the HydroDyn input file. **Xi**, **Yi**,
and **Zi** provide the coordinates of the output joint in the global
inertial-frame system when the structure is not displaced. **InpJointID** 
specifies the **JointID** for the output as given in the MEMBER JOINTS table 
of the HydroDyn input file.

Radiation Memory Effect Convolution Kernel
------------------------------------------
In the potential-flow solution based on frequency-to-time-domain
transforms, HydroDyn computes the radiation kernel used by the
convolution method for calculating the radiation memory effect through
the cosine transform of the frequency-dependent hydrodynamic damping
matrix from the radiation problem. The resulting time-domain radiation
kernel (radiation impulse-response function), a time-dependent 
matrix, is provided in this section. **n** and **t** give
the time-step index and time, which are followed by the entries of the matrix 
(**K11**, **K12**, etc.) of the radiation kernel associated with that
time. Because the frequency-dependent hydrodynamic damping matrix is
symmetric, so is the radiation kernel; thus, only the diagonal and
upper-triangular portion of the matrix are provided. The radiation
kernel should decay to zero after a short amount of time, which should
aid in selecting an appropriate value of **RdtnTMax**. The dimensions of the 
radiation kernel matrix depend on the number of potential-flow bodies 
present (**NBody**) and **NBodyMod** in the HydroDyn primary input file. If 
**NBodyMod** = 1 (full hydrodynamic coupling), the summary file will contain 
data for a single 6\ **NBody**-by-6\ **NBody** matrix. If **NBodyMod** > 1 
(no hydrodynamic coupling), the summary file will contain data for **NBody** 
6-by-6 radiation kernal matrices.

Results File
~~~~~~~~~~~~

The HydroDyn time-series results are written to a text-based file with
the naming convention ``OutRootName.HD.out`` when **OutSwtch** is
set to either 1 or 3. If HydroDyn is coupled to OpenFAST and **OutSwtch** is
set to 2 or 3, then OpenFAST will generate a master results file that
includes the HydroDyn results. The results are in table format, where
each column is a data channel (the first column is always the
simulation time), and each row corresponds to a simulation output time
step. The data channels are specified in the OUTPUT CHANNELS section of
the HydroDyn primary input file. The column format of the
HydroDyn-generated file is specified using the **OutFmt** and
**OutSFmt** parameter of the primary input file.
