Offset file format¶
Note
For standard hulls it is also possible to have the hull geometry described in IGES or STL format (see OFFSETFILE).
The purpose of this file is to describe the geometry of the vessel. This is done by a list of coordinate values of points lying on the hull surface.
The following concepts are extensively used when the geometry is described in the manual.
- Point: A point is defined by its x, y and z coordinates.
- Status flag: A status flag can be assigned to a point. The status flag tells the program how to treat the point.
- Station: A station is a set of points that describe the intersection between the hull and a constant x plane. The XPAN module also allows for varying x.
- Group or offset group: A group describes the shape of a part of the hull. Typically one group is used to describe the bulb, the keel or the rudder. One or more groups can be used to describe the main part of the hull.
- Group label: Label name of an offset group used to identify the group.
Syntax¶
Coordinate systems¶
This section contains a description of the two coordinate systems used in SHIPFLOW. The computational coordinate system is used internally during the computation, in the output files and for post-processing. The offset coordinate system is used for defining the offset points in the offset file. The relation between the two systems is defined with the command OFFSETFILE.
- Non-dimensionalized coordinates are used internally in SHIPFLOW.
- The ship length LPP is used for non-dimensionalization.
- The ship is positioned as in the figure during the computations.
- The offset points can either be input directly in full scale coordinates together with a reference length LPP or in non-dimensionalized form.
- The coordinate system used for the offset points can be located anywhere in the center plane.
- Only one side has to be specified if the ship is symmetric.
Line syntax¶
Each non-empty line of this ASCII file should contain either a group label such as XYZHULL or the x-, y- and z-coordinate of one point and its status flag, e.g.
The coordinates and their status flag are read by a "free format" read statement. The y-coordinate of the example could also have been written as 0.0125, 1.25e-2, 1.25E-02, 1.25d-02 or perhaps 12.500D-03. Integers will be converted to real numbers and real numbers to integers if necessary:
will be interpreted as
The file must start with a group label and end with the end of file label END.
Order of points and stations¶
Body groups¶
- The points within each group must be given as stations, i.e. as sets of points lying on the intersection of the hull surface and constant x planes. The mesh generator for the potential flow part XPAN can handle points of varying x.
- The stations should be given from the bow towards the stern and the points within each station should be given from the keel and up.
- The hull must be defined also above the water plane.
The first station¶
The first station can be defined in two ways:
- As a constant x-station.
- As a set of points defining the shape of the bow in the centre plane.
Lift groups¶
Lift groups (see LIFT) are defined with a different ordering compared to body groups. The points must be given in the chord-wise direction. The ordering is illustrated in the figure below.
p means the direction of increasing point index and s the direction of increasing station index. The points should then be given so that the p index varies faster than the s index in the offset file. Note the different ordering on the pressure and suction sides.
Environment groups¶
The points and stations of environment groups (see ENVIRONMENT) must be ordered as shown in the figure below in order to find the intersection between the free-surface and the sides of the canal.
Groups¶
- A hull can be divided into several groups.
- Stations defining a boundary between two groups must be defined two times in the offset file.
Usage of group labels and status flags¶
- Each group must be preceded by a group label.
- The first point of each of the stations within a group should have status flag 1.
- The last point of each group must have the status flag 9. (This turns out to be the points immediately preceding the labels.)
- The vast majority of the points, those that are not the first of the frame they belong to or the last of a group, must have the status flag 0 (zero).
- The offbody group must be preceded by a group label. The last offbody point must have the status flag 9. All other offbody points must have the status flag 0 (zero).
XGRID requirements¶
Since XGRID will make a grid where the hull surface (+ a part of the wake centre plane) will be covered with one continuous surface and for a number of fundamental differences between XPAN and XCHAP (and hence XGRID), XGRID users will have to get used to different / more restrictions than were imposed on them when they were using XMESH. The current grid topology cannot handle appendages such as keels and rudders.
Note also that the hull representation used by XGRID differs from that of XMESH. XGRID can only handle frames with constant x-coordinates. Parametric cubic splines will only be used in the circumferential direction. Linear interpolation will be used in between frames.
The main hull can be described by at most three offset groups. The names of these groups are assigned to H1GR, H2GR and H3GR in the OFFSET command for XGRID. The names of a stern bulb and an overhang in the offset file are assigned to ABGR and OGRP, respectively.
The frames in H1GR, H2GR, H3GR and OGRP must be in global order.
The frames given in the ABGR and OGRP groups must lie in the same x-planes where they overlap for SHIPFLOW version 3.2 or earlier. For SHIPFLOW 3.3 this is only true if keyword RAWOFFSET is set.
Hull with bulbous bow¶
To ensure the best hull shape representation for both potential flow as well as RANS computations it is necessary to pay special attention to the body groups and the points order in the offset file. For XMESH it is more suitable to describe the stem together with the first station in the hull group creating a three dimensional curve as shown in the upper figure. However, the XGRID module is prepared to use the two dimensional stations lying on the x-planes. Therefore, in the case when one wants to extend the computational domain for the RANS solver to cover the whole hull it is advised to use a separate hull group for this module. The bulbous bow should be described in an additional offset group for both solvers, however the one for XGRID should also contain the points belonging to the bow overhang, see the lower figure.
The offset groups for XMESH should be specified in the command file in the XFLOW section, in the HULLTYPE command. The groups for XGRID can be respecified in the XGRID section, in the OFFSET command.
H-O topology grid import¶
When H-O topology is imported, it is not possible to set the boundary conditions unambiguously for the face that consists of the hull surface. The face is continuous along the whole domain span and covers not only the hull but also parts of the center plane in front and behind the ship. Because of that the position of the hull cannot be known exactly from just looking at the grid.
A remedy to this is to describe the hull location explicitly at the stem and/or the stern. In order to do that a special function has been developed that enables a manual specification of the contour lines and additionally gives a possibility to define a specific boundary condition for particular cell faces.
The function is triggered by setting a boundary condition keyword bcXX in the IMPORT command to MIXED_BC. XCHAP then expects a file that contains the necessary information. The file should be named id.bc, where id is the id of the grid that is being imported. The file may contain the keywords stern and stem followed by the contour lines in the grid coordinate system, and the keywords SLIP, NOSLIP and INTERIOR followed by the cell face indices. After each keyword a number of point coordinates or cell indices has to be given. An example id.bc file is given below:
stern 2
141 10.000000 -12.700000
144.5 8.952560 -8.737370
stem 3
-142.35 0.000000 -11.700000
-144.84 0.000000 -11.485041
-158.31 0.000000 19.715700
NOSLIP 2
138 14
139 26
INTERIOR 3
100 5
101 5
100 6
SLIP 1
140 15
Offset file format for twin skeg hulls¶
For the XCHAP calculations the twin skeg hull has to be split into body groups in a similar way as a standard case hull i.e. bulb, bossing, stern overhang and up to three main groups. However an additional longitudinal split has to be added thus creating inner and outer parts. The split should correspond approximately with the lower edge of the skeg (gondola) as shown in the figure below. The offset points should be arranged in such a way that the first point of each section is at the longitudinal split edge.
For global computations the H1GR should overlap with H1GI and H1GO offset groups. The H1GI and H1GO should extend about 5% of Lpp upstream of the midship while H1GR about 5% downstream of the midship.








