Você está na página 1de 40

3.

2 Methods for Creating a Hull Form in NAPA (2008)


Workshop in NAPA User Meeting 2008 - Toivo Vaje

3.2.1 Introduction
The traditional way to define a new hull surface in NAPA is to first define the limiting curves
by using commands and then check the results by using the drawing task. Combined with
the NAPA macro syntax, this enables an experienced NAPA user to quickly define a simple
draft hull that can be used for initial calculations and other tasks.
Of course, starting from scratch is a seldom needed method and it can be avoided if there is
already some data available. Probably the fastest way to generate a new hull surface is to
transform an existing one. It is also possible to import definition curves and even surfaces
from external sources such as IGES and DXF files. Another, more tedious but sometimes
necessary, approach is to use offset data. NAPA Contract Design Manager can be used to
ease these tasks and to get more visual feedback during the process.
If it is indeed necessary to start from scratch, NAPA can aid the user in this task also. In this
workshop, in addition to demonstrating some of the above-mentioned methods with existing
input, we create a totally new hull surface using template macros available in the Hull
Surface editor (HSE).

3.2.2 Methods
There are many ways to import geometric structures to NAPA. The purpose of this workshop
session is not to go through all of these methods, but to try to cover four different ways how
to obtain a hull surface in NAPA:
1.
2.
3.
4.

A new hull surface is created using HSE template macros.


A transformation is applied in order to create a new version from the surface.
Curves are read into NAPA from an external DXF file.
A table of offsets is used to generate the surface.
In addition to this paper, useful information about these methods can be found from the
NAPA Online Manuals, from earlier NAPA User Meeting documents and from the Introduction
to NAPA book. For example, the use of the Contract Design Manager for the parts related to
this presentation is explained in detail in the User Meeting documents of 2005 and 2006.
3.2.2.1 Creating a hull surface using templates
3.2.2.1.1 Accessing the templates
Template macros offer a quick start to the definition of a new hull surface. They can be
accessed from Hull Surface Editor -> File -> New from template. There are basic templates
that give just the edge curves and need only a minimal amount of user input. More complex
macros generate less generic shapes and add more details to the surface. In general, they
also require more user input.

Template macros available in HSE


3.2.2.1.2 Definition of HULLA
In this presentation, only the templates that define only edge curves are used. Definition is
started from the after part of the ship. This is done by choosing the template
HULLA//NAPADB. This macro asks the user for the following input:

X-coordinate for transom stern


X-coordinate of aft end of parallel mid body
Beam of ship
Design draught
Bilge radius
Height of deck

After being given the preceding input, NAPA generates depending on input parameters
an after body that looks somewhat like the one in Figure 2. This is by no means an optimal
hull surface, but it contains curves that help the user to outline the shape of the ship.

The result of HULLA//DB7 template macro

Next, the user can start adding points to the edge curves. This is done simply by pressing
down the ALT-button and clicking the left mouse button on the current curve.
To get an appropriate curve grid, a few frames and waterlines have to be added. This can
be done by using the Create a New Curve dialog illustrated in Figure 3. If possible, the
curves should be inserted so that they are connected to the existing nodes. That way the
references are added correctly and points can be moved without problems.

Dialog for creating a new curve in HSE


With the addition of frames and waterlines, HULLA in Figure 4 now looks as it should,
although the curves are not faired. In case the user is aiming for an easily fairable hull,
space curves should be used near the propeller area and below the transom. Also, for the
best possible results at the preparation stage, one should always aim for a curve grid that
consists mostly of four-sided patches. Keeping this in mind from the very beginning makes
the following design stages easier.

HULLA with added frames and waterlines


3.2.2.1.3 Definition of HULLF and HULLM
After completing the definition of the after part, the next step is to start working with the
fore part of the ship. A template macro can be chosen from the File dialog located at the

upper left corner of the HSE. As with HULLA, only edge curves are needed. The macro
HULLF//NAPADB inquires user for the following input:

X-coordinate for transom stern


X-coordinate of aft end of parallel mid body
Beam of ship
Design draught
Bilge radius
Height of deck
Figure 5 shows the results of the template. Flats of side and bottom are again present, but
as with the after part, the bulb is missing. With the same methods that were used with
HULLA, points are added to the edge curves and additional frames and waterlines to mould
the ship as needed.

HULLF created with HSE template macro

HULLF after adding the additional frames and waterlines


The modification results are presented in Figure 6. The separate pieces can now be
combined. This can be done by using two more template macros. First, the macro
HULLM//NAPADB is used. It does not take any user input and just connects the front and
after parts with a very simple middle ship region HULLM.

3.2.2.1.4 Combining the results to form HULL


With the definition of the HULLM, all the needed parts for HULL are ready. The combination
is done by using the macro HULL//NAPADB. This macro is very simple and it contains the
following NAPA commands:
SUR HULL

COM HULLA HULLM HULLF


The combined hull surface is illustrated in Figure 7.

Parts are combined to form the hull surface


3.2.2.1.5 Creating new templates
If the user is familiar with NAPA macros, the definition of new templates is simple. One thing
to keep in mind is that the template macros follow a certain naming standard. The name of
the macro should start with DATA*SURF_ to be shown in the New from template dialog in

the HSE. If the naming standard is followed, the new templates will appear in the template
macro list automatically.
3.2.2.2 Transforming an existing hull surface
Transforming an existing hull is an often used method to generate a new surface. The
Transformation task (TRA) of NAPA offers command line methods for transformations, but in
the following, the Contract Design Manager (CDM) is applied to transform the newly defined
hull surface. The same input can be given under the TRA task also.
NOTE! Before any transformation is applied, the user should make sure that the reference
system of NAPA is up-to-date. Some of the critical variables can be listed with the !REF
command.
3.2.2.2.1 Available transformations
NAPA offers the following transformations:

Linear
Piecewise Linear
Lackenby
Modify Frames
Frame Area
Translation
It is also possible to make a new hull surface by simply copying the old one.
Linear transformation
In affine transformations, the coordinates are only scaled. Dimensions (L, B and/or T) of the
parent hull can be transformed either by entering the new absolute dimensions or by
entering the relative change.
Piecewise linear
Transformation is defined by a set of original coordinates and their transformed values. The
transformation function is linear between adjacent coordinates, and it is equivalent to a
translation beyond the given coordinates.
Example:
Selected direction is X.
Limits 40 60 -> 30 65
The aft part of the ship (behind x = 40) is moved aft wards to x = 30 and the fore part (in
front of x = 60) is moved to x = 65. The region between 40 and 60 meters is stretched in
the direction of the x-axis.

The parameters related to displacement (Displacement, longitudinal centre of buoyancy LCB


and bulk coefficient Cb) can be given separately for the transformation. One or two
parameters can be given at the same time, depending on the number of unknowns (degrees
of freedom) in the limit definition.
NOTE! Displacement and Cb cannot be given at the same time.
Lackenby transformation
This method alters the hull surface non-linearly on the basis of the given displacement
parameters. This function also allows the simultaneous transformation of the main
dimensions. The input can be the absolute target value or the relative change. The
transformation is based on the original work by H. Lackenby.
NOTE! Displacement and Cb cannot be given at the same time.
The transformation of the dimensions (L/B/T) can be done in the same transformation as
the change of the displacement. This is done by selecting 'Transform Dimensions', which will
open input fields for the main dimensions of the ship. The input can either be the new
absolute dimension or the actual change (example: Length +10).
Modify frames
The centreline is defined to be invariant in a displacement transformation where D (or Cb) or
LCB are changed. The transformation function generated is such that certain plane curves
are converted into general space curves. Of the three types of principal plane curves, only
two can simultaneously be invariant and preserve their type.
Translation
Translation moves the hull surface in the specified direction along a main coordinate axis.

Translation of the parent hull using the CDM


Frame area transformation

A transformation defined by modifying the frame area curve of a parent hull is actually a
special case of piecewise linear transformation.
This method performs the transformation of the hull according to the predefined frame area
curve. The frame area curve of the parent hull can easily be generated in the FRA task with
the command GEN name. A frame area curve for the resulting hull can be defined in the DEF
task by using the generated curve as the basis.
The inputs for this transformation are:

Parent frame area curve


New frame area curve
Optionally: limits for the transformation
Limits can be given for an approximate transformation in three pieces.

The continuous line represents the frame area curve before the transformation and the
dashed line the one after the transformation has been applied

Result of a frame area transformation


Figure 9 features two frame area curves. The continuous line represents the frame area
curve of the parent hull and the red dashed line is the target frame area curve. The top of
the target curve and the area it delimits are both shifted to the left. This means that the
resulting hull should have its LCB shifted backward.
The result of the transformation with the given input curves is illustrated in Figure 10. The
parent hull is plotted with green and the resulting hull with white colour. It is easy to confirm
that the resulting hull has a longer after body than the original one.

3.2.2.2.2 Contract Design Manager


The CDM can be accessed, either by choosing the Open Manager Application after the
project is created option when creating a new project, or through the NAPA main window ->
Tools -> Manager and then File -> Open and by choosing Manager CONTRACT_DESIGN
from NAPADB.

Transformations are located under the hull task of the CDM


The CDM helps to visualize the transformation task. It offers the necessary input fields and
notifies the user with pop-up windows if there is something wrong with the input parameters
or if the transformation was not able to be carried out.
Figure 12 depicts the Transformation task of the CDM. The parent hull is first chosen from
the list of available hulls and it is automatically shown on the graphics area. After specifying
the parent hull, the appropriate transformation is chosen by pressing one of the toggle
buttons and the input fields are filled to fit the transformation needs.
NOTE! All the fields that are left empty are treated as constant values. Forgetting this can
result in ugly results, if the system is forced to follow incompatible instructions.
After giving the parameters, transformation is carried out by clicking the Transform button in
the lower left corner of the window. Allow Overwrite button has to be enabled; otherwise,
the transformation is not allowed. This is a precaution to prevent unintended modification of
a hull surface.

Setting the transformation parameters is easy in the CDM


Before the actual transformation process is started, the system offers to save the macro
definition of the current hull. When the transformation is completed, the current project and
version will appear in the project and version drop-down lists in the upper part of the tool.
The current hull surface can be plotted on top of the parent hull form by selecting first the
hull surface and then clicking the Current result button in the lower part of the tool where
the drawing functions are located.

Backup dialog before the transformation


3.2.2.3 Importing curves from DXF/IGES files
NAPA offers many methods for importing geometry from external files. (Exporting to various
formats is also supported.) The CDM allows an easy import from DXF (AutoCAD Direct
Exchange Format) and IGES (Initial Graphics Exchange Specification). Importing is accessed
in the CDM through Hull -> Create Hull -> Import from a file -> Import curves from file. For
later checking, the workflow of the importing process is documented also in the NAPA Online
Manuals.

Importing from external file is started by clicking the Update button


3.2.2.3.1 Setting file path and format

The location of the external input file is entered into the File path field and the File format is
chosen (DXF/IGES). After the selections are finished, importing is started by clicking the
Update button in the left toolbar.
Imported curves are drawn to the graphics area by selecting the Check the imported curves.
Unnecessary and faulty curves can be removed from the set.
3.2.2.3.2 Boundaries
The next step is to find the boundary curves. If NAPA is not able to find the correct curves
automatically, they can simply be added to the table of potential boundaries. Curve names
have to be given by hand, but they can be easily checked by clicking on curves at the
graphics area.

Boundaries are listed in a table and also drawn in the graphics area
Finding the parallel midship is done the same way as the finding of boundaries.
By clicking the Update button in the Generate Boundary Curves item, nodes are generated
on the boundaries according to the given tolerance. A very tight tolerance results in a
massive number of definition points. This makes later modification and fairing harder. On
the other hand, if the tolerance is too large, important data can be lost. Curve shapes are
not as they should and there might be bad connections in the grid.
3.2.2.3.3 Ordering of points

There are three alternatives on how the points are ordered. The ordering methods are
related to the options of the DESCRIPTION command in the NAPA Definition task. The
methods and their DES counter parts are:

FORCED_FIXED: ORD = 3
FORCED_GENERAL: ORD = 0
GENERAL: ORD = 1
FORCED_FIXED is equal to adding * to the beginning of the curve definition, automatic point
sorting is cancelled. FORCED_GENERAL is equal to adding **, points are ordered in such a
way that a feasible curve can be fitted to the point set. Option GENERAL equals
FORCED_GENERAL if the original curve does not have a monotonically changing coordinate.
3.2.2.3.4 Adding primary and secondary curves
Primary and secondary sections are chosen depending on the hull type. Choosing frames as
primary sections and waterlines as secondary is the default method.
The generation of midship does not require any user input. The generation of the hull grid
and adding secondary curves is done as the generation of boundary curves. A usercontrolled tolerance is used to make a discrete approximation of the curves.

The final phase of the importing process


3.2.2.3.5 Checking the results
After the secondary curves are added, the hull surface is ready for preparation. The quality
of the imported surface can be checked and further modifications applied by using the HSE.
Because of the discretization of points, imported hull curves usually contain more points than
curves originally defined in NAPA.
3.2.2.4 Creating a hull using a table of offsets

Sometimes there are reasons to transfer the form of the hull surface without actually giving
away the NAPA model. This can be done by using offset tables. The following example
clarifies the use of the CDM in the definition of a hull surface using a table of offsets.
3.2.2.4.1 Opening the item and preparations
The table of offsets item is accessed in the CDM through Hull -> Create Hull -> From Offset
Tables. The first thing to do is to check the Main dimensions. The default values are taken
from the reference system of NAPA.
The fields in the Main Frame tab contain all the necessary information for the definition of
the parallel middle body. In the WATERLINES tab, the user can choose if the waterlines are
generated or not.
The locations of offset points are defined in the COORDINATES tab. The actual offset points
are entered into a table that has the number of rows equal to the number of different Zcoordinates and the number of columns equal to the number of X-coordinates. The values
that are entered to the table are the Y-coordinates of the frames.
NOTE! Only different X- and Z-values increase the number of rows and columns. By defining
multiple occurrences of the same value it is possible to have a different number of rows and
columns.
NOTE! X-values between the aft and fore end of the parallel midship are not taken into
account in the Enter Offset Table item.

Definition of a hull using offset tables begins by checking the main dimensions
In addition to the frames, the user has to give the edge curves: profile curve (STEM and
STERN), the flat of side (FSA and FSF), deck (DECKA and DECKF) and the flat of bottom
(FBA and FBF). The coordinates of these curves are given in a table. The order in which the
curves are defined is somewhat free, but it is a good practice to give the curves in the same
order as they appear in the CDM.
3.2.2.4.2 Creating the profile curve

The definition process is started by defining the intersection between the Y = 0 plane and
the hull. Even though most of the profile is located on the Z = 0 line, there should be
enough points near the areas where the flat of bottom curves meet the profile. This is due
to how the macro that is used to form FBA and FBF works. It seeks the closest point at
STEM and STERN and connects the ends of FBA and FBF to these.

Definition of the profile curve


3.2.2.4.3 Flat of side
Flat of side curves are automatically connected to the midship at the bilge radius. Angle at
the connection point is fixed to zero.
3.2.2.4.4 Deck
The deck curve is the first and only curve in the offset table task that is defined as a genuine
space curve by giving all three coordinates of each point. The ends of DECKA are connected
to STERN and aft-part of midship and the ends of DECKF to STEM and fore-part of midship.
3.2.2.4.5 Flat of bottom
The curves that define the flat of bottom connect to the midship with a Y-coordinate of half
breadth minus bilge radius. The other ends are connected to the profile curve.
NOTE! The definition macro seeks the nearest point of the profile curve, not the exact
coordinate in all cases.

The definition of the deck curve


3.2.2.4.6 Entering the offset table
The table containing offset data is generated according to the number of different X- and Zvalues in the COORDINATES tab. If there is a need to add more Z-values, this can be easily
done by clicking the right mouse button on the row numbers on the left side of the table and
choosing Add row.
Columns have to be added manually. For this task, the user can use, for example, the Table
Editor. The name of the table to edit is DSN.OFFSET. To update the table view in the

Contract Design Manager, the user has to click on some other item and then come back to
Enter Offset Table.
Entering the offset values is the most laborious part. To decrease the number of possible
errors, the resulting curves can be visualised at anytime by clicking the Update button.

Opening the Table Editor


3.2.2.4.7 Things to keep in mind
Curve references are used as much as possible. Instead of using exact coordinates, most of
the definitions are done using the nearest points. For this reason, distances between points
should be kept moderately short near regions where intersections are located. Forgetting
this can produce unexpected results.
3.2.2.4.8 Rest of the definition
After the offsets have been entered, the definition is practically ready. Creating the hull grid,
adding the waterlines and preparing the surface are automatic processes. The only thing the
user needs to do is to click the Update button at each item.
3.2.2.4.9 Importing the tables
Instead of manually typing in all the values, the user can also import the tables from, for
example, Microsoft Excel. The file extension to be used is CSV. Importing is done in the
Table Editor through File -> Import from CSV The names of the needed tables are:

DSN.OFFSET_PROFILE
DSN.OFFSET_FLATSIDE
DSN.OFFSET_DECK
DSN.OFFSET_FLATBOTTOM
DSN.OFFSET

Figure 21 features an example of an offset table in MS Excel. The first column contains the
Z-coordinate values and the first row the X-coordinate values. The values in the rest of the
table are the corresponding Y-coordinates.

A simplified example of an offset table (DSN.OFFSET) in MS Excel

3.2.3 Appendix 1 - Results of the HSE Template Macros


Example input parameters for the templates
Reference 185 X-position -4.1
length
m
of
m
transom
Beam of
ship

32
m

Aft end of 89
parallel
m
mid body

Design
draught

9 m Fore end 97.2


of parallel m
mid body

Height of 20
deck
m

Bilge
radius

Propeller
diameter

Propeller- 0.14
hub ratio

6.7
m

3.8
m

Propeller 0.15 X4.66


base line m
coordinate m
clearance
of the
propeller
hub

Result of HULLA1

Result of HULLA2

Result of HULLA3

Result of HULLF1

Result of HULLF2

Result of HULLF3

Result of HULLF_CONT1