Introducing HullDrag/32 (rel. 0.51-beta)



©Copyright 1996-2001 Hans G. Zwakenberg, Willich, Germany. All rights reserved.
Please read and respect the full copyright notice at the bottom of this document.


  Introduction

HullDrag/32 estimates the hull resistance of contemporary (round bilge, fin keel) sailing yachts. Multihulls, power boats and long-keel sailing yachts are not catered for, neither are chined hulls. This program uses formulae that were in part (the residual resistance part that is) derived from multiple towing tank research programs carried out by Delft University - The Netherlands. The formulae for the other resistance categories were taken from other sources.
   Just to let the point made above sink in a bit more: HullDrag/32 is only meant to process files that describe contemporary round bilged, fin keeled sailing yachts. Period. If your current project doesn’t fit this bill, don’t use HullDrag/32.
    Don’t expect HullDrag/32 to enable you to come up with the next winning America’s Cup yacht, though... The formulae that HullDrag/32 implements are of an empirical nature. The accuracy is therefore not as precise as that of an actual towing tank run, or of using sophisticated computational fluid dynamics (CFD) solutions. Use HullDrag/32’s results in a qualitative sense, i.e. to compare and rank different design proposals.


  What does HullDrag/32 do?

The program computes six resistance groups. By using about 20 variables and the empirical formulae, HullDrag/32 determines the resistance at discrete Froude numbers from 0.125 to 0.750 with 0.025 increments.
    The program saves the results in a resistance file. Note that the higher Froude number range (above 0.45) is always saved in the resistance file, even for medium to heavy displacement yachts that might never be able to operate within this speed range.
   For easy reference, the resistance file includes four columns that indicate speed: Froude number, m/s, f/s and knots. The computed resistance groups are:
  • Hull frictional resistance
  • Keel frictional resistance
  • Rudder frictional resistance
  • Heeling resistance (extra resistance owing to heel angle)
  • Residuary resistance (viscous pressure resistance plus wave resistance)
  • Surface roughness resistance (estimated to be about 10% of total frictional resistance)
  • Total resistance (summation of the above 6 resistance sources)
Frictional resistance is computed using the standard ITTC-57 friction line method. When calculating keel and rudder frictional resistance, the mean chord is used to determine the applicable Reynolds number. For the hull frictional resistance calculation, a reduction factor is applied to Lwl when determining the hull Reynolds number.
    The wave resistance component of the residuary resistance refers to the waves generated by the hull itself in smooth water. The calculations do not include the extra wave resistance that is caused by a seaway.
    It is commonly believed however, that a hull that is best in smooth water, is likely to perform best in a seaway too. This of course assumes that we ignore mass moment of inertia effects, but since hull shape in itself has limited influence on total moments of inertia, this seems to be a reasonable assumption.


  Design optimisation

In addition to creating a file containing the resistance values over a speed range, HullDrag/32 also suggests optimal values for two variables, CP (prismatic coefficient) and LCB (longitudinal centre of buoyancy) for the lower speed range, up to Froude number = 0.45. The optimal values that HullDrag/32 presents on your screen are valid for the speed that the user provided in the HullDrag description file (see below).


  Using HullDrag/32

Depending on how you invoke HullDrag/32, one of two possible things happens:
    If you call the program without a hull description file name as a command line argument, HullDrag/32 loads ‘
HullDrag.zvf ’ into memory and processes it.
    If you call HullDrag/32 with a hull description file name as a command line argument, HullDrag/32 loads the file you specified on the command line.
    Once a hull description file is read into memory, HullDrag/32 quietly goes on doing its thing, validating the hull description file, calculating and saving the resistance table in a file named ‘
drag.prn ’. In addition, HullDrag/32 calculates optimum values for CP and LCB and presents the results on your display. The data table that was generated to find the optimum values for CP and LCB is saved in a file named ‘optimum.prn ’.
    Both output files are of a standard comma separated ASCII structure and can consequently be imported in other applications with ease. Graphing all this data and turning it into solid information is a task best done in a spreadsheet program. Especially when your spreadsheet application supports drawing splines through the discrete data points calculated by HullDrag/32, you’ll be set up quite nicely for some serious analysis.
    After having finished the above, HullDrag/32 returns to DOS or the calling program. Note that this behaviour enables third parties to embed HullDrag/32 in larger applications.


  HullDrag/32 hull description file

The hull description file HullDrag/32 uses is an ASCII text file that has the general structure of *.INI files known to most Windows users. Currently, HullDrag/32 supports five sections:
  • [SYSTEM]
  • [HULL_DATA]
  • [KEEL_DATA]
  • [RUDDER_DATA]
  • [ENVIRONMENT]
Each section contains a number of variables, one per line, formatted as follows: VariableName=value
    Lines beginning with a semi-colon ‘;’ are comment lines. HullDrag/32 ignores these lines. Please contact <hulldrag@zwakenberg.de> if you want to interface HullDrag/32 with another application. We can supply you with full details of the hull description file format, including variable names that are reserved for future use.
    The last page gives an example of a HullDrag/32 hull description file. Please consider the following section names to be reserved for future use: [RIG_DATA], [OPTIMISE] and [STABILITY]. The program will use these sections in a future release, once it gets embedded in a VPP (velocity prediction program). HullDrag/32 reads hull description files that use metric units. PFS units, including unit conversion between the two units supported, will be supported in a future release.


  HullDrag/32 resistance file

HullDrag/32 saves a comma-separated ASCII file containing the calculated resistance groups. Note that the program saves resistance values either in metric or PFS units (Newton or pounds). Many standard programs such as spreadsheets, databases and programs for graphical presentations can import this file. The author uses a spreadsheet application for post-processing and graphics.
   The last page gives an example of a HullDrag/32 resistance file. By calling HullDrag/32 with a different hull description file for every design alternative, you can build a multi dimensional spreadsheet that enables you to rank different design proposals.


  Technical details

Under the heading ‘Using HullDrag/32’ you read that the program validates a hull description file after loading it. Some extra elaboration on the tests the program performs is in order. This enables you to decide whether HullDrag/32 is suitable for your projects. HullDrag/32 performs three groups of sanity checks:
    Check for values that would result in a program crash. Possible division by zero errors and such are found here. HullDrag/32 issues an error message and quits.
    The program makes sure that the values in the hull description file are reasonable. For instance, HullDrag/32 will warn you if Boa (beam over all) is smaller than Bwl (beam on waterline). These type of situations will result in a warning, describing a possible unintended error.
    The program also checks whether the values in the hull description file are within valid ranges. This assures that the empirical formulae (particularly those that calculate the residual resistance) are only used within their valid parameter space. If your projects are extreme, HullDrag/32 may not be able to predict accurate resistance values. In that case the program issues an error message and quits. See the table below for the restrictions that apply:

ratio or variable

lower limit

upper limit

description

LWL / BWL

2.76

5.0

length on waterline, divided by beam on waterline

BWL / TC

2.46

19.32

beam on waterline, divided by draft of hull canoe body

LWL /DC1/3

4.34

8.5

length on waterline, divided by displacement of hull canoe body raised to a power of 1/3

LCB

-6.0

0.0

longitudinal centre of buoyancy

CP

0.52

0.60

prismatic coefficient




  HullDrag/32’s future

Jokingly, we could say that there might not be any, at least, not as an independent program! Hopefully, one day HullDrag/32 will be part of a VPP (velocity prediction program). Once the VPP is released, support for HullDrag/32 may be discontinued, since we feel that serious HullDrag/32 aficionados will want to use the newest technology available.
Until then however, the following improvements and extensions are in the pipeline:
  • optimisation of LCF (longitudinal centre of flotation) in addition to CP and LCB
  • Extending the optimisation speed range from Fn=0.45 to Fn=0.6.
  • the integration with an existing generalised function minimiser/maximiser module. This will enable HullDrag to optimise, within a reasonable time frame, more than just the currently planned three variables.
  • full PFS support, including unit conversion.
  • a Windows 32-bit user interface, with full splining between the calculated data points, to eliminate the necessity of using an external application (like a spreadsheet) for generating graphics and hardcopy output.
  • Support for the Linux operating system. This will most likely be implemented by actually running the Win-32 binary on the WINE emulator.
  • Multihull support. Currently, I'm researching ways to create polynomials to calculate the residual resistance for multihulls. Since I don't happen to have the resources to actually test a large number of systematically varied hulls in a towing tank, I'll probably have to resort to CFD (or CFD-like) software to get me there. It's still in the very early phases still, but I'll keep you posted on http://www.zwakenberg.de/hulldrag.
Since I can't possibly implement all of this in parallel, these are the following steps I intend to take:
  • implement optimisation of LCF
  • Extending the optimisation speed range from Fn=0.45 to Fn=0.6.
  • implement PFS units
  • finally doing the Windows 32-bit user interface
If you have other suggestions, don’t hesitate to mail your ideas to <hulldrag@zwakenberg.de>.


  Programming details

HullDrag/32, currently requiring less than 40 KBytes of memory (program and data), was programmed in pure ANSI-C. The calculation engine compiles under 16- and 32-bit DOS, Windows and Linux/UNIX. I had LINT (a UNIX utility) check the code- and data structure portability, it was quite happy about the code.
    Although I seriously contemplated switching to another programming language, after I discovered the merits of LCC-Win32 I decided to stick with ANSI-C. No other Win32 compiler produces such tight code. The current 0.51-beta release executable shrunk from an already very compact 63 KBytes to an incredible tiny 21 KBytes after changing to LCC-Win32, even after extending the 0.51-beta release with extra error reporting functionality.
    Early tests showed that the next distribution (sporting the LCF optimisation) will still fit on a single 1.44" floppy disk with room to spare. RAM usage will increase vastly, though. Expect the next version to have a memory footprint of at least 4 MBytes. Apparently, there's a price to pay for extending the optimisation functionality.
As to DLL-dependency: the current version of HullDrag/32 needs the following Win32 system DLL's:
  • msvcrt.dll
  • kernel32.dll
  • crtdll.dll
HullDrag/32 doesn't need anything else. It doesn't touch the registry, access the internet, need an IP-stack or whatever.    'Lean and mean', no frills, that's what HullDrag/32 is all about.


  Example HullDrag/32 hull description file

; HullDrag/32, rel. 0.51Beta - (C) 1997-2001 Hans G. Zwakenberg
;        http://www.zwakenberg.de/hulldrag
; HullDrag data file, created April 07, 2001, 18:29
;
; Project: 6.50m MiniTransat yacht
[SYSTEM]
ProjectName=6.50m MiniTransat yacht
HullDrag/32_ChangedThisData?=No
InputUnits=Metric
OutputUnits=Metric
[HULL_DATA]
HullId=59
Lwl=6.5
Loa=6.5
Bwl=2.354
Boa=3
Tc=0.18
T=2
WettedArea=8
Aw=7.3
Cp=0.535
LCB=-3.4
DisplV=0.819
[KEEL_DATA]
KeelId=59
MeanChord=0.363
WettedArea=2.5
Volume=0
Weight=0
[RUDDER_DATA]
RudderId=59
MeanChord=0.21
WettedArea=0.75
Volume=0
[ENVIRONMENT]
HeelAngle=0
WaterDensity=1025
BoatSpeed=0.35



  Example HullDrag/32 resistance file

The ASCII output file shown below is based on the above data file, using optimised LCB and Cp values for Fn=0.35). Depending on your screen resolution and browser settings, it might show up with line wrapping. For this reason, the typeface chosen is a bit smaller. If this isn't helpful, please print this information with your printer's paper orientation set to 'landscape'.

"Froude","m/s","f/s","knots","Hull frict.","Keel frict.","Rudder frict.","Heeling","Residuary","Roughness","R_Total"
0.125, 1.00, 3.27, 1.94, 14.1, 7.6, 2.6, 0.0, 3.1, 2.4, 29.8
0.150, 1.20, 3.93, 2.33, 19.7, 10.4, 3.6, 0.0, 4.5, 3.4, 41.5
0.175, 1.40, 4.58, 2.72, 26.0, 13.7, 4.7, 0.0, 7.8, 4.4, 56.6
0.200, 1.60, 5.24, 3.10, 33.2, 17.3, 5.9, 0.0, 10.5, 5.6, 72.5
0.225, 1.80, 5.89, 3.49, 41.1, 21.3, 7.3, 0.0, 17.0, 7.0, 93.6
0.250, 2.00, 6.55, 3.88, 49.8, 25.7, 8.8, 0.0, 23.3, 8.4, 116.0
0.275, 2.20, 7.20, 4.27, 59.3, 30.4, 10.4, 0.0, 32.0, 10.0, 142.1
0.300, 2.40, 7.86, 4.66, 69.5, 35.5, 12.1, 0.0, 43.6, 11.7, 172.4
0.325, 2.59, 8.51, 5.04, 80.5, 41.0, 13.9, 0.0, 61.0, 13.5, 209.9
0.350, 2.79, 9.17, 5.43, 92.2, 46.8, 15.9, 0.0, 86.5, 15.5, 256.8
0.375, 2.99, 9.82, 5.82, 104.6, 52.9, 17.9, 0.0, 122.8, 17.5, 315.7
0.400, 3.19, 10.48, 6.21, 117.7, 59.3, 20.1, 0.0, 175.8, 19.7, 392.6
0.425, 3.39, 11.13, 6.60, 131.5, 66.1, 22.4, 0.0, 227.9, 22.0, 469.9
0.450, 3.59, 11.79, 6.98, 146.0, 73.2, 24.7, 0.0, 302.8, 24.4, 571.3
0.475, 3.79, 12.44, 7.37, 161.3, 80.7, 27.2, 0.0, 598.3, 26.9, 894.4
0.500, 3.99, 13.10, 7.76, 177.2, 88.4, 29.8, 0.0, 764.1, 29.5, 1089.1
0.525, 4.19, 13.75, 8.15, 193.8, 96.5, 32.6, 0.0, 879.7, 32.3, 1234.8
0.550, 4.39, 14.41, 8.54, 211.0, 104.9, 35.4, 0.0, 975.4, 35.1, 1361.9
0.575, 4.59, 15.06, 8.92, 229.0, 113.6, 38.3, 0.0, 1072.1, 38.1, 1491.1
0.600, 4.79, 15.72, 9.31, 247.6, 122.6, 41.3, 0.0, 1144.7, 41.2, 1597.4
0.625, 4.99, 16.37, 9.70, 266.9, 132.0, 44.4, 0.0, 1128.6, 44.3, 1616.2
0.650, 5.19, 17.03, 10.09, 286.8, 141.6, 47.6, 0.0, 1139.8, 47.6, 1663.5
0.675, 5.39, 17.68, 10.48, 307.5, 151.5, 51.0, 0.0, 1167.2, 51.0, 1728.2
0.700, 5.59, 18.34, 10.86, 328.7, 161.8, 54.4, 0.0, 1195.4, 54.5, 1794.8
0.725, 5.79, 18.99, 11.25, 350.6, 172.3, 57.9, 0.0, 1149.8, 58.1, 1788.8
0.750, 5.99, 19.65, 11.64, 373.2, 183.2, 61.5, 0.0, 1257.4, 61.8, 1937.1
(Newton)


  Feedback

Please contact <hulldrag@zwakenberg.de> for any comment or constructive critique you might have. Do tell me about your projects and about the role HullDrag/32 played in those projects.
   If you like the idea of some extra promotion, I could include a description about or link to your project on the HullDrag/32 website: <http://www.zwakenberg.de/hulldrag>. Tell me what you would like and let’s get some form of co-operation going.


  Revision history

  • 0.50 alpha
    Win32 console application, first public release.
  • 0.51 beta
    Win32 console application, error reporting added; changed to the LCC-Win32 ANSI-C developer environment.

  Copyright Notice & Disclaimer

HullDrag/32, © Copyright 1997-2001 Hans G. Zwakenberg, Willich, Germany.
All rights reserved.

This document describes ‘HullDrag/32 freeware release 0.51 Beta’. You’re free to evaluate this program and use the included hull description files for your evaluation and entertainment. In case you like this software, or intend to continue to use it, find a creative way to give me a warm feeling. By all means, keep me motivated to continue the engineering and coding of HullDrag/32.

   As is usual with freeware software, the author accepts no responsibility for any result, consequence or damage, be it direct or indirect, that may arise out of the use of HullDrag/32. I urge you to assume that the author knows nothing at all about hydrodynamics and even less about programming computers. Assume that this software isn’t fit for anything at all.

   By using this software, you acknowledge that this copyright notice pertains to ‘HullDrag/32 freeware release 0.51 Beta’ only. Future releases may be released under different licences at the author’s discretion.

    You are hereby granted the permission to distribute this release of HullDrag/32, as long as you don’t make any money with it, but only if you distribute the entire HULLDRAG.ZIP file unaltered, including all document files that came with the ZIP file.