Hull Form Design and Optimization
Hull Form Design and Optimization
Carderock Division
NSWCCD-CISD-2012/004 / July 2012 / Hull Form Design and Optimization Tool Development
Form Approved
OMB No. 0704-0188
Public reporting burden for this collection of information is estimated to average 1 hour per response, including the time for reviewing instructions, searching existing data
sources, gathering and maintaining the data needed, and completing and reviewing this collection of information. Send comments regarding this burden estimate or any other
aspect of this collection of information, including suggestions for reducing this burden to Department of Defense, Washington Headquarters Services, Directorate for Information
Operations and Reports (0704-0188), 1215 Jefferson Davis Highway, Suite 1204, Arlington, VA 22202-4302. Respondents should be aware that notwithstanding any other
provision of law, no person shall be subject to any penalty for failing to comply with a collection of information if it does not display a currently valid OMB control number. PLEASE
DO NOT RETURN YOUR FORM TO THE ABOVE ADDRESS.
1. REPORT DATE
September 7 2012
2. REPORT TYPE
Final
6. AUTHOR(S)
Brendan White
Lacy Thomas
8. PERFORMING ORGANIZATION
REPORT NUMBER
NSWCCD-CISD-2012/004
10. SPONSOR/MONITORS
ACRONYM(S)
b. ABSTRACT
UNCLASSIFIED
c. THIS PAGE
UNCLASSIFIED
17. LIMITATION
OF ABSTRACT
SAR
18. NUMBER
OF PAGES
34
Team
Brendan White
Lacy Thomas
Acknowledgements
Chi Yang - GMU
Max Harper - CISD
Bob Lamb - CISD
Colen Kennell - CISD
Jack Offutt CISD
Steven OuimetteCISD
Siu Fung NSWCCD
Matthew Knobloch - SEAP
Center for Computational Fluid Dynamics GMU
Table of Contents
Team ................................................................................................................................................ i
Acknowledgements .......................................................................................................................... i
Table of Contents ............................................................................................................................ ii
List of Figures ................................................................................................................................ iv
List of Tables .................................................................................................................................. v
Abbreviations ................................................................................................................................. vi
Abstract ........................................................................................................................................... 1
Introduction ..................................................................................................................................... 1
Background and Objectives ........................................................................................................ 1
Deliverables ................................................................................................................................. 1
Hull Optimization Tool Development ..................................................................................... 2
Hullform Generation Tool Development ................................................................................ 2
Resistance and Powering Prediction Tool Development ........................................................ 2
Hull Optimization Tool Development ............................................................................................ 2
Background ................................................................................................................................. 2
Objective ..................................................................................................................................... 3
Algorithm Validation .................................................................................................................. 3
Greiwank Function .................................................................................................................. 4
Algorithm Implementation .......................................................................................................... 6
Single Speed Input Files .......................................................................................................... 7
Multiple Speed Input Files ...................................................................................................... 8
Optimization Tool Validation ..................................................................................................... 8
ii
iii
List of Figures
Figure 1: TriSWACH Model .......................................................................................................... 3
Figure 2: Rosenbrock's Saddle Function ........................................................................................ 4
Figure 3: Greiwank Function .......................................................................................................... 4
Figure 4: Contour of Greiwank Function........................................................................................ 5
Figure 5: Greiwank Convergence History ...................................................................................... 6
Figure 6: Sidehull Positions for TriSWACH .................................................................................. 7
Figure 7: Contour with 1,200 Points ............................................................................................... 9
Figure 8: Drag Convergence Using Differential Evolution .......................................................... 10
Figure 9: DE Optimal Sidehull Location Plotted on Contour Plot for Froude Number .31 ......... 12
Figure 10: Wave Drag at Optimized Positions ............................................................................. 13
Figure 11: SWATH ship ............................................................................................................... 14
Figure 12: HulGen Main Interface ................................................................................................ 15
Figure 13: Baseline Hull Interface ................................................................................................ 19
Figure 14: Baseline Ship Type Selection Menu ........................................................................... 20
Figure 15: SWAD12 Main Interface............................................................................................. 21
Figure 16: SWAD12 Input Interface............................................................................................. 22
Figure 17: SWAD12 Import and Export Menu ............................................................................ 23
Figure 18: SWAD12 Output Interface .......................................................................................... 24
Figure 19: SWAD12 Coefficients of Resistance Curves .............................................................. 25
Figure 20: SWAD12 Graph of Hull .............................................................................................. 25
iv
List of Tables
Table 1: DE Results for Optimal Sidehull Location ..................................................................... 11
Table 2: Comparison of Optimal Sidehull Locations from Contour Plot and DE ........................ 11
Table 3: HulGen Parameters ......................................................................................................... 16
Table 4: HulGen Parameter Categories ........................................................................................ 18
Table 5: HulGen Main Parameters ............................................................................................... 19
Abbreviations
CISD Center for Innovation in Ship Design
CFD Computational Fluid Dynamics
DE Differential Evolution
DWL Design Waterline
EHP Effective Horsepower
GMU George Mason University
NREIP Naval Research Enterprise Intern Program
NSWCCD Naval Surface Warfare Center Carderock Division
NURBS Non Uniform Rational B-Spline
ONR Office of Naval Research
SSF Steady Ship Flow
SWATH Small Waterplane Area Twin Hull
TriSWACH Trimaran Small Waterplane Area Center Hull
UI User Interface
UNREP Underway Replenishment
vi
Abstract
George Mason Universitys (GMU) Center for Computational Fluid Dynamics (CCFD) is
working with the Naval Surface Warfare Center's (NSWC) Center for Innovation in Ship Design
(CISD) under a five year grant from the Office of Naval Research (ONR) aimed at developing
and validating hull form design and hydrodynamic optimization tools. These tools will be used
for early stage ship design and education of junior naval engineers. The categories of the tools
can be further broken down into tools for hull form generation, representation and modification,
design-oriented simple Computational Fluid Dynamic (CFD) tools, and hull form optimization
tools. This paper will discuss the further development of these tools including the implementation
and testing of a new optimization algorithm, the improvement of a rapid hull form generation
tool (HulGen), and the creation of a user interface for a SWATH resistance and powering
prediction program (SWAD). The work was performed under the 2012 Naval Research
Enterprise Intern Program.
Introduction
Background and Objectives
Hydrodynamic design of ships involves several stages, from early-stage and preliminary design
to final design. It has become increasingly important to evaluate multiple hydrodynamic aspects
of performance simultaneously and efficiently during the early stage of the design process.
The Center for Computational Fluid Dynamics (CFD) at George Mason University has an
ongoing research project sponsored by the Office of Naval Research (ONR) on the development
of hull form design and hydrodynamic optimization tools. These tools are comprised of three
main components. One component consists of design-oriented CFD tools. The second consists of
hull form generation, representation, and modification tools. The final component consists of
optimization tools.
The 2012 Naval Research Enterprise Intern Program (NREIP) intern team was tasked with the
further development of the tools. As part of this task the team was to implement and validate an
optimization algorithm, improve a rapid hull form generation tool called HulGen, and create a
user interface for a SWATH ship total resistance and powering prediction tool, called SWAD.
Deliverables
The summer work consists of three individual sections. Each of these sections has its individual
set of associated deliverables.
1
Objective
The goal was to integrate the DE algorithm into a hull
form optimization tool used to find the location of the
sidehull of a TriSWACH with minimum wave drag. A
picture of the TriSWACH model can be seen in Figure
1. The algorithm was to be validated before it would be
accepted for use in an optimization tool. This was to be
done with a variety of analytical functions. Upon the
algorithms validation, a new optimization tool was to
Figure 1: TriSWACH Model
be created by integrating the DE algorithm with two
already existing hydrodynamic optimization programs developed at George Mason University.
These programs include a small geometry generation program and the Steady Ship Flow (SSF)
program used for calculating wave drag. Upon completion of this tool, a separate tool was
developed to validate the results.
Algorithm Validation
To validate the DE algorithm, input files were written for nine different analytical functions
including Rosenbrocks Saddle Function, shown in Figure 2 and the Greiwank Function shown
in Figure 3. Two input files are required for each function. One input file contains a computer
coded function representing the mathematical function. The other input file contains the
parameters for running the function code with the algorithm. These parameters include the
number of inputs (dimensions), the minimum value the algorithm is trying to obtain, minimum
bounds for the points, maximum bounds for the point, and a maximum number of iterations. It
should be noted that the minimum and maximum bounds are not constraints, but rather an initial
guess as to where the minimum may be found. This gives the algorithm bounds to generate an
initial guess to find the minimum. The algorithm will still search outside these bounds if
necessary. If the user wishes to put actual limitations on where the algorithm can search, as seen
in Rosenbrocks Saddle Function in Figure 2, constraints can be added to the function file which
can force the algorithm to remain strictly within the given bounds.
Only functions for which the global minimum was already known were used for validation. The
algorithm searches for the global minimum given by the user and will stop when either a value
less than or equal to the specified minimum is found or when the algorithm has reached the
maximum number of iterations. The algorithm was able to find the global minimum of each
tested function.
Greiwank Function
When testing the DE algorithm, one function was used more than others. This is the Greiwank
Function. It has some special properties that made it a beneficial test function for the algorithm.
Figure 3 shows the general Greiwank Function. For testing purposes, an n value of two was
used.
Global Minimum
Local Minima
For testing purposes, the program was set to find zero with a precision of six decimal places.
This was to ensure a fairly accurate result with a reasonable number of iterations. The program
generates a random number between the given bounds for the first attempt at finding the
minimum. This causes the DE algorithm to require a different number of iterations for every run
because it generates a different path for finding the minimum each time. The algorithm was able
to find the minimum very quickly, which is a feature beneficial for the future implementation of
the algorithm as a hydrodynamic optimization tool. A sample test result is shown in Figure 5,
which presents a convergence history of the function and the location with reference to the
number of iterations.
F(X1,X2)
X1
X2
The algorithm was successful in finding the global minimum each time it was run. The results
provided evidence that the algorithm would be valid for the optimization tool.
Algorithm Implementation
After validating the DE algorithm, the next step was to implement the algorithm as a
hydrodynamic optimization tool. Upon completion of this tool, it was to be applied to a
TriSWACH model to investigate the effects of longitudinal and transverse spacing of the
sidehull on the wave drag of the model, and to find the optimal position of the sidehull for low
wave drag. The sidehull spacing definition is shown in Figure 6 which defines the three different
longitudinal positions and three different transverse positions considered in the experiment.
6
The first input file for the optimization tool contains a coded representation of a function with the
return value being the value the user is trying to minimize. The tool was being used to minimize
drag, thus code had to be written to implement a function with drag as the return value. This was
done by coding the wave drag as a function of the longitudinal position and the transverse
position of the sidehull. The tool generates longitudinal and transverse position values to be used
as input values for this coded function. This code then writes an input file for the geometry
generation program with the new position coordinates. The geometry generation program is
executed and an output file containing the new ships geometry is generated. Upon generation of
this output file, SSF is called and a wave drag output file is produced. The code then reads this
new output file and adds the current drag values to an array containing all drag values from
previous iterations. The current drag value is the coded functions return value.
The basic information contained in the optimization tools parameter file, the second input file, is
similar to the information used in the parameter files for the analytical functions, with the only
real difference being the minimum value. With the analytical functions, the minimum value is
known, so that value can be input and the algorithm will stop once that value is reached. The
minimum wave drag is unknown, but there is a simple way to work around this problem. The
optimal position of the sidehull is the position with the least amount of drag. Therefore the
minimum value is set to zero. Knowing there was not going to be a location where the drag will
equal zero, the intent is to have the algorithm find the closest value to zero within the maximum
number of iterations.
Multiple Speed Input Files
Once the input files were created and results were obtained using a single speed, the first input
file was changed slightly to accommodate multiple speeds. The optimization tool can find the
optimal position when a ship is traveling at a specific speed, but it is not always the case that
only one ship speed is of interest. This creates the need to incorporate multiple speeds into the
tool. The relative importance of each speed is implemented with different weights. If the user
wants the optimal position for a ship that runs at one speed seventy-five percent of the time and
another speed twenty-five percent of the time, the weights of the numbers can be adjusted. For
the summer work, the weights were assumed to be equal across all speeds. This required only a
simple average calculation. The additional speed values must also be added to the SSFs input
data file before the average calculations can be done.
The longitudinal and transverse points are not generated for the contour tool in the same way
they are generated when using the optimization tool. The contour tool has to generate its points
autonomously rather than having the points generated by the DE algorithm. The points are
generated by using a minimum and maximum variable in both the longitudinal and transverse
directions. The user then specifies the number of points desired in each direction and the tool
evenly divides the given dimensions into the correct number of points. The tool iterates through
the points calculating drag at each possible combination of longitudinal and transverse points and
stores these values in an array similar to how the values are stored in the DE implementation.
This array is then stored in a text file. There is a separate plotting tool written for the actual
plotting to allow the user to plot existing values without having to run the entire contour tool.
The plotting tool simply opens the text file where the output is stored and creates a contour plot
with the longitudinal points on the x-axis and the transverse points on the y-axis. The contour
plot has colors ranging from red for the higher values to dark blue and black for the lowest
values. By using the contour plots, the results from the DE algorithm can be validated. The
contour plots provide a visual from which the minimum value can easily be estimated. This value
can be compared to that which was obtained using the DE algorithm.
Several cases were tested and the contour plot results were compared against the results from the
DE algorithm. In Figure 7 the minimum is represented by the circle towards the middle of the
contour plot. This contour plot was created using sixty longitudinal points and twenty transverse
points for a total of 1,200 points. A Froude Number of .31 was used for these calculations.
Global Minimum
Once the contour plot was created, the results were compared with those from the optimization
tool. The results from the tool were consistently close to the minimum after 30 iterations. Trials
were run using up to 60 iterations, but it was found that accurate results were achieved by 30
iterations as demonstrated by Figure 8. To obtain accurate results in a reasonable amount of time,
the optimization tool was configured with a maximum iteration limit of 30.
10
Table 1 presents the optimal sidehull positions obtained using the optimization tool for Fn =
0.31, 0.25, and the average Fn, respectively.
As shown in the second row of Table 1, the optimization tools results for a Froude Number of
.31 agree with the results from the contour plot. This demonstrates that the tool was successful in
finding the optimal position.
Longitudinal Position
0.580 (48.7 ft)
0.411 (34.5 ft)
0.943 (79.2 ft)
Transverse Position
0.052 (4.4 ft)
0.114 (9.6 ft)
0.052 (4.4 ft)
Table 2 compares the contour plot results to the DE algorithm results for each of the speeds to
further validate the optimization tool.
11
Differential Evolution
0.580
0.411
0.943
Differential Evolution
0.052
0.114
0.052
Figure 9 shows the last iteration of the DE algorithm plotted on the contour plot when a Froude
Number of .31 was used. This provides a visual form to show that the results agree. The point
representing the last iteration from the DE algorithm is located in the global minimum circle on
the contour plot.
DE
Figure 9: DE Optimal Sidehull Location Plotted on Contour Plot for Froude Number .31
After finding the optimal positions at different speeds using the optimization tool, those positions
were examined over a range of speeds. Using the previously mentioned SSF program from
GMU, the wave drag for three optimal positions was calculated over a wide range of speeds.
Fifty Froude Numbers between 0.18 and 0.48 were used for these calculations. Figure 10 shows
the calculated wave drag for the geometry created when the sidehull is in the optimized location
determined by the Froude Numbers shown in the legend.
12
It can be observed from Figure 10 that the optimization performed for a single design speed will
result in a large drag reduction at the given speed, but might have a drag increase at off-design
speeds. It would be beneficial to consider multi-design-speed optimization.
6.00E-03
Optimized with Fn = .31
5.00E-03
Drag
4.00E-03
3.00E-03
2.00E-03
1.00E-03
0.00E+00
0.18
0.21
0.24
0.27
0.3
0.33
0.36
0.39
0.42
0.45
0.48
Froude
Figure 10: Wave Drag at Optimized Positions
Alternate Applications
After use of the DE algorithm for optimizing the
TriSWACH had been validated, other uses for the
algorithm were considered. The DE algorithm is a
general optimization algorithm and therefore it
can be implemented with a variety of different
programs. Again attempting to use the algorithm
to optimize drag, the algorithm was applied to
SWAD90, which is a power and resistance
Figure 11: SWATH ship
prediction tool for SWATH (Small Waterplane
Area Twin Hull) ships. An example of a SWATH ship is shown in Figure 11. The input files
required to use the algorithm with SWAD90 are similar to those for the TriSWACH
optimization. When attempting optimization for the TriSWACH, the position of the sidehull was
variable in the equation. When optimizing with SWAD90, the variable to optimize was
unknown. The first attempts to optimize with SWAD90 involved trying to optimize the nose and
midbody lengths of the strut to minimize drag, but after several trial runs the algorithm seemed
to have trouble finding a minimum. The results from both the algorithm and the contour plots
were inconclusive. This was interpreted to mean that the drag value predicted by SWAD90 is not
sensitive to the nose and midbody lengths of the strut. Due to time constraints, experimenting
with other variables was left as a future project.
Summary
The Differential Evolution algorithm was implemented into a new hydrodynamic optimization
tool. The algorithm was thoroughly tested with several different analytical functions before the
development of the optimization tool began. Once the DE algorithm was validated, the
optimization tool was implemented. A contour tool was developed to create contour plots to
show the wave drag of the sidehull of a TriSWACH in various locations. The contour tool
calculates wave drag at a specified number of points between given bounds in the transverse and
longitudinal directions. It then creates a contour plot of these points. The contour plots were used
to find the optimal position of the sidehull of a TriSWACH in terms of the wave drag. The plots
created by this tool were used to help validate the results of the new optimization tool by
comparing the minimum found by the optimization tool to the minimum in the contour plots.
Finally, the optimization tool was integrated with SWAD90 to explore the tools versatility and
confirm that the tool could be used for other applications.
14
Parameter name
Number of Stations
Ship Length (LBP)
Ship Beam
Ship Draft
Maximum Section Coefficient (Cx)
Number of Segments
Area at FP (SAC)
Slope of Curve at FP (SAC)
Location of Desired Station of Maximum Area (Xmax) (SAC)
Slope of Curve at Xmax (SAC)
Length of Parallel Sections (Lmid) (SAC)
Area at AP (Ctran)
Slope of Curve at AP
Prismatic Coefficient (Cp)
Longitudinal Center of Buoyancy
Offset at FP (LWC)
Slope of Curve at FP (LWC)
Location of Desired Station of Maximum Area (Xmax) (LWC)
Slope of Curve at Xmax (LWC)
Length of Parallel Sections (Lmid) (LWC)
Offset at AP (LWC)
Slope of Curve at AP
Waterplane Coefficient (Cwp)
Longitudinal Center of Floatation (LCF)
Offset at FP (FDEC)
Slope of Curve at FP (FDEC)
16
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
17
65
66
67
68
Parameter #s
1 to 6
7 to 15
16 to 24
25 to 32
33 to 35
36 to 37
38 to 45
46 to 53
54 to 61
62 to 68
Each curve is defined by a polynomial with a specific order. The polynomials are calculated in a
non-dimensional coordinate system and translated afterwards. The coordinates of the
polynomials are normalized using different hull parameters.
Output
HulGen has the ability to create a NURBS surface in Rhinoceros, a commercial 3D modeling
software widely used at the Naval Surface Warfare Center. HulGen is also able to export hull
offsets and diagrams.
Parameter Name
Ship Length
Ship Beam
Ship Draft
Maximum Section Coefficient
Prismatic Coefficient
Depth at Midships
The 6 main parameters can easily be adjusted within the user interface. The algorithm for
determining each of the 62 remaining parameters is unique to the parameter and dependent on
the type of ship. The user must specify the ship type using a drop down menu. The interface for
this feature can be seen in Figure 13.
19
The input reduction formulas implemented within HulGen, Figure 14, support the following
types of ships:
Summary
A new feature has been implemented in HulGen which will allow an inexperienced user to
generate, modify, and export a hull form using only 6 parameters. The user is still able to use the
20
other HulGen features to modify hull forms to a greater degree. HulGen is suitable for future
integration with the CFD tools under development at George Mason University.
21
SWAD12 Input
An interface similar to that of HulGen has been implemented to provide an intuitive layout. The
input parameters are divided among labeled tabs which the user can easily navigate through.
Example hulls have been included in the program, which may serve as a baseline for the user to
modify. Parameters that have a limited quantity of discrete possible values are represented as
dropdown menus. All other parameters may be easily adjusted through the use of slider bars or
by entering exact parameter values into textboxes. One tab of parameters including a dropdown
menu and several slider bars is shown in Figure 16. Any change to the value of either the slider
bar or the textbox automatically triggers an update to the other. Each slider bar has an associated
function which translates from the slider bars range of integer values to the parameters range of
valid values. Each slider bars function was designed to provide the slider bar with a reasonable
resolution as well as an appropriate minimum and maximum. Most parameters require a linear
scaling function, but some parameters use an exponential scaling function. For example, when
manipulating the slider bar for ship length, the parameter value will increase faster as the slider
bar moves towards the larger values. In previous versions of SWAD, all parameter values were
manually entered into a text file in a specific format and order before running SWAD and could
not be altered as easily. The dropdown menus and slider bars are useful when quickly adjusting
parameter values.
A key feature in the functionality of SWAD12 is backwards compatibility with previous versions
of SWAD. SWAD12 was implemented to allow the user to import original SWAD input files
compatible with the FORTRAN versions. This import feature is located in the menu bar as
shown in Figure 17.
SWAD12 Output
The output interface for SWAD12 can be seen in Figure 18. SWAD12 is concerned primarily
with the portions of the ship below the Design Waterline (DWL). Portions above the waterline
are included for completeness and because they may be useful when moving the data to another
tool.
SWAD12 estimates the resistance and powering of a user specified SWATH hull form for a
given set of speeds. Coefficients of residuary resistance, coefficients of frictional resistance, and
the effective horsepower are calculated for hulls and struts. SWAD12 also calculates displaced
volume and wetted surface area for hulls, struts, and appendages. All of the output data is
displayed in Imperial units.
The user has the option to export import data compatible with previous versions of SWAD. The
user can export the output data in the same format as FORTRAN versions of SWAD. This
feature may useful in the event that individuals have designed scripts to read in data from
previous SWAD versions. The user can also export the output data to Excel in the same format
as the Excel implementation of SWAD. These options can be seen in Figure 17.
23
Hull Representation
SWAD12 will model twin hulls or a single demi-hull. It allows one strut per hull or two struts
per hull. SWAD12 can model simple or bulged hulls with either circular or elliptical cross
sections. Hulls are modeled as an elliptical nose cone and a parabolic tail cone with a variable
number of cylindrical or conical sections between. The strut waterplane shape is modeled as an
elliptical or parabolic nose section, a rectangular parallel mid-section, and a parabolic tail
section. Struts are assumed to be wall sided with vertical leading and trailing edges.
Graphic Feedback
Previous versions of SWAD lacked graphic feedback on the users entered information. With the
new interface for SWAD12, valuable feedback is now presented to the user. Coefficients of
resistance curves are calculated and graphed with the output. An example can be seen in Figure
19. The user can specify whether the curves should be graphed as a function of the Froude
Number or the speed in knots. This is significant as in previous versions of SWAD the user must
manually graph the performance curves from the raw output data after exiting SWAD.
24
Summary
A new tool, SWAD12, has been implemented in Visual Basic. SWAD12 is a SWATH resistance
and powering prediction tool which uses a graphic user interface to facilitate user input and to
provide graphic feedback. The outputs include plan and profile views of the SWATH, geometry,
resistance curves, and EHP data. SWAD12 is a remake of an old FORTRAN SWAD tool.
Features have been implemented which will allow backwards compatibility with FORTRAN
versions of SWAD.
26