Sunteți pe pagina 1din 23

Project 114 Installation, Introduction and Use

Stephen M. Hollister

October, 2015
Quick Installation of Project 114
This is a simple explanation for how to install, start, and use the Project 114 Marine Design
Executive (MDE) and calculations. You should, however, read the following sections.

1. Download or copy the MDE.zip file to your top level C: folder


2. Unzip it there because internal links expect everything to be in C:\MDE folder structure
3. Go to the C:\MDE folder
4. Double click on the MDE1A.xlsm spreadsheet file to start the system

Project 114 has been developed and tested with Excel. It uses VBA code extensively and we
have not tested it with other spreadsheet software. There may be incompatibility problems.
Please let me know (Steve Hollister - shollist@newavesys.com) if you have any issues. This is
also the first release of the system and one might consider it to be in prototype form.

The MDE spreadsheet lists all of the calculation programs currently in the initial system.
(Selecting a hull database is not yet done – see the section below on hull databases for details.)
You can display the documentation for each calculation by right clicking on the name of the
calculation and you can start the application by double left-clicking on the name. Most all
calculation spreadsheet front ends work the same (because it’s the same open program that
can work with any calculation “engine”) where all of the input variables are displayed on
worksheet 1 (input goes in column ‘D’) and the results go on worksheet 2 after you select the
Calc 1, Loop 1, or Loop 2, macro buttons. Each GUI frontend has links to documentation for the
GUI and for the calculation. Note that currently the calculations don’t have default values so that
you have to enter a number in all input fields even if they are not needed or optional. This is
rather annoying and will be fixed in future versions.

Some may worry about the safety of zip files, but this one was tested for viruses and zipped up
with an official copy of WinZip. However, feel free to have your own anti-virus software examine
it. Note that Project 114 needs to be installed this way because it is not just one application that
will have a single install and uninstall Windows tool (like msi). It is an open system that allows
you to add in your own calculation programs or ones from other sources. A future goal is to
provide tools that make it easy to install and uninstall any particular calculation application.

Project 114 includes three main parts: the Marine Design Executive (MDE) spreadsheet which
lists all of the calculation programs currently available, a subfolder containing the “calculation
engine” programs for each of those calculations, and a subfolder containing the GUI front ends
(typically using a spreadsheet) for each of those calculation programs. The MDE system is an
open source (Apache V2.0 – a permissive license) tool system that allows you to share, use
with your own software, and make any changes you see fit. This includes the MDE spreadsheet
and all of the GUI spreadsheet front ends to the calculations. Most of the calculations, however,
are in fixed EXE form and only for your own use. Others will have to download any available
calculations from this site. This is an important point about Project 114. The calculations may be
fixed or proprietary and come from many different sources, but all spreadsheet macro frontend
code is open for user customization and sharing.
Quick Start - Sample Input

Project 114 includes three programs (calc engines) using the standard open spreadsheet GUI

1. HPower - calculates simple powerboat horsepower estimates. The source code (in
Visual C++) for the calc engine is also included
2. Hydro - calculates the intact hydrostatics and stability properties for a vessel defined
using any of the following hull station definitions: GHS, SHCP, NWS, and LFH. See the
documentation for details. The calculation condition can be selected using input of
Draft/Trim, Draft/LCG, Displ/Trim, and Displ/LCG. Hydro will first find the equivalent
Displ/LCG in the upright condition and then use those values to balance the boat at the
input heel angle.
3. Savitsky – calculates the Savitsky “Long Form” resistance and horsepower of planing
power boats and includes many additional lift and drag options.

To allow you to try out the programs quickly, the following sections shows sample input for each
calculation. After you start the program (spreadsheet GUI front end), you can select the
documentation button to link to the full documentation for either the spreadsheet GUI front end
or the calc engine.
HPower – Simple Powerboat Horsepower Estimates

These calculations include Crouch’s formula, Keith’s formula, Gerr-A & Gerr-B formulas, and
Wyman’s formula. See the documentation and original papers for details.

Sample input screen with sample input entered in column ‘D’.

Once you have entered the input, you can pick the Calc 1, Loop 1, or Loop 2 macro buttons.
Start with Calc 1 to see the results for this entered set of input. The spreadsheet will launch the
external calc engine and put the results into column 1 of the output grid worksheet 2 of the
spreadsheet, as shown below.
Worksheet 2 of the HPower application in the standard spreadsheet GUI.

Each time you do a Calc 1 on worksheet 1, the “Calculation Index” will increment and the results
will go into the next column of the output grid. However, you can build a full output grid using
either the Loop 1 or the Loop 2 macro buttons. Once that is done, you can use the Graph or the
Contour macro buttons to generate a chart. This is just for convenience. You can do anything
that your spreadsheet software allows you to do. You can also turn on the “Developer” tab and
study or modify any of the VBA code you see. One of the major benefits of this approach is the
complete open code front end provided by a spreadsheet.
Hydro – Intact Hydrostatics and Stability Calculation
This program works with any of these four hull offsets file definitions: GHS, SHCP, NWS, and
LFH, so it requires that you enter the name of a file containing these offsets. See the input
screen below.

The hull file selected below is defined using the GHS format and is located in a library folder of
hulls provided. Pick the “Browse” button and go to the folder:C:\MDE\Library\Hull Files and
select one of the offsets files. The one selected here defines a 20’ TEU box boat that is 8.5 feet
in depth. The condition selected was Draft_Trim, which means that the program will use the
input in the Draft (distance from the baseline to the waterline at amidships) and Trim cells to do
the calculation. Since the standard GUI front end expects input in all of the cells, you have to
enter dummy (0.0) values for the other two defining input values: Displacement and LCG. The
program will use the input draft and trim values to calculate the upright displacement and lcg of
the vessel to use when it does the calculation at the input 25 degrees for heel angle.

Note that the program allows you to define a “hog distance” and a wave pattern to use to
calculate the (static) results. You can also define a heeling arm type (cosine or cosine-squared)
force to be applied. See the documentation for details. This works exactly like the HPower GUI
front end because it’s the exact same program. This GUI front end reads the data dictionary of
inputs and outputs for the calc engine and automatically does the rest.
Savitsky – Savitsky “Long Form Planing Calculation
This program has a lot of options that go beyond the standard calculation, but you have to fill in
a value for all of the input cells or else the standard GUI front end will complain. This is
annoying, but future versions will automatically fill them in with default values. Here is the input
screen for this program so you can give it a try with real input. See the calc engine
documentation (and the original references) for details. There are many input options, so the
input is captured in two pictures.
Like the HPower and the Hydro calculations, the Savitsky calculation also uses the standard
spreadsheet front end that gives you a Calc 1, Loop1, and Loop 2 macro calculation buttons.
You can vary any one or two input variables and create any one or two variable graph or 3D
contour. You can also customize the output and add in your own formulas.

Again, this is quick start set of input. Please see the documentation for more details.
Introduction and Overview of Project 114
Project 114 originated (with strong support, ideas, and push from Rik Van Hemmen) as a way to
have SNAME do something about basic boat and ship design computer tools that have been
“lost”, made too complex, become too costly, or become too inflexible over the years. The
marine market is also too small to support the independent software development of many
needed tools. The expectations for this project started small, but they have evolved into
something much larger. See my SNAME/WMTC paper (“A New Paradigm for Ship Design
Calculations” - Hollister) and other explanations in the “Documentation” subfolder after
installation for complete details.

In short, Project 114 encourages splitting calculation programs into two parts: the graphical user
interface (GUI) part and the calculations (Calc Engine or CE) part. This split has many
advantages. Calc Engines can be written by naval architects (content experts) who know about
the calculations but may not be expert GUI (or spreadsheet) programmers. The calculation
programs will read input from simple text files and write results to simple text files. They can be
compiled and linked into (batch) EXE files using any language and can be tested and verified
separately. They can be used for many different tasks and will be immune to virtually all
technological changes – a major reason for much of the lost code in the marine industry. They
will have a long “shelf life.”

Since calculations all behave like black boxes reading a set of input variables and producing a
set of results variables, one can use an open and customizable spreadsheet to launch any calc
engine. This open source GUI macro code spreadsheet has been created and included in this
download of Project 114. It is used as a front end to all of the included “calc engines.” It is
capable of launching any calc engine written by anyone as long as it uses a simple and
common format for the input and output and also provides a “data dictionary” (DD) text file of all
input and output variables. (There are full source examples of the text files, DD format,
Input/Output code, and a calc engine – in Visual C++ - in the download.) The standard GUI
displays the input variables on the first worksheet and offers macro buttons for doing one
calculation, looping calculations over a range of one variable, or looping calculations for two
variables. It builds a table of results on the second worksheet where the user can plot or
produce 3D contours. Many macro tools are built into the open source GUI frontend, but users
have access to all of the analysis and reporting tools of the spreadsheet.

Therefore, naval architects can add their own calculations to this system just by writing a simple
batch calc engine. They don’t have to write a line of GUI code. Project 114 also includes the
complete source code for the calc engine that calculates five estimates for powerboat
horsepower requirements. This can be used as a guide for writing one’s own calc engine. When
set up properly, the open GUI frontend will launch any calc engine “behind the scenes” where it
is hidden. It appears to the user that the calculations are done inside of the spreadsheet.
Another advantage to this organization is that users can customize the spreadsheet to add in
any additional calculations. For example, one could add special stability rules into the results
from a general hydrostatics & stability calc engine. No 3rd party hydrostatics calculation
program can justify offering all of the rules from USCG, DNV, ABS, Lloyds, and others, but
users can make a copy of the generic GUI spreadsheet and put the formulas in themselves.

However, Project 114 goes far beyond the open GUI launching of individual calculations. Calc
engines can be combined and launched in sequence using simple spreadsheet VBA code. One
goal of Project 114 is to eventually provide open tools to do that automatically. The user will just
select the calc engines to launch in sequence and the open code will automatically feed the
needed results from one calc engine to the next. In effect, the sequence of calc engines are
“wrapped” into one larger calc engine with a new set of overall inputs and outputs. It can then be
launched and used just like any other single calc engine.

For example, one might sequence a calc engine that generates a Lackenby hull variation of a
parent hull form, a calc engine that performs hydrostatics, and a calc engine that calculates the
Holtrop ship resistance calculation. It could be wrapped together so that the user could vary
input like LWL and BWL to produce a 3D contour plot of Holtrop resistance without writing a line
of GUI front end code. Also, these separate calc engines are compiled and linked EXE files that
can come from any source. You do not have to have the source code for each part and build
one large traditional GUI/Calc program or one large spreadsheet where all of the formulas have
to be tied to cell locations or variable names that have to be coordinated and defined each time.

This open GUI front end idea can also extend to other classes of solutions that commonly occur.
Another solution type is a time-step iteration of any sequence of calc engines. An open
spreadsheet could sequence the calculations and offer different stopping criteria, like total time,
total distance, or any other user-customized criteria. A user might include a merit function and
the code could look for an optimum value. If the calculation tools are offered in an open
spreadsheet format, then users are free to customize it as they see fit. Philosophically, the goal
is to give industry-level calculation tools to engineers and make them problem solvers and not
just “users” of software that cannot possibly handle all possible calculations. Instead of asking
and waiting for a program update from an independent software developer, an engineer can
piece a custom solution together with high level flexible industry tools. The engineer might not
even have to write a line of code.

Another class of problems is a free-body diagram (FBD) solution where the spreadsheet GUI
could provide an easy way to launch external calc engines for any needed force or moment.
The forces and moments could be simple user formulas in the spreadsheet or complex results
of external FEM or CFD calc engines.

The keys to Project 114 are open tools, common formats, and a collection of separate,
reusable, and long-lasting calc engines that can be custom mixed by users, not computer
programming specialists. Independent software providers may charge for their calc engines, but
they should be at a lower cost because they are easier to create (no GUI), have a much larger
market, and they will have a long “shelf-life.” Others, however, may offer their own calc engines
for free, and SNAME can become a clearinghouse for both the open GUI solution code and calc
engines offered by others. Project 114 might not seem like much at this point, but it can be
much more when everyone in the marine industry is focused on one framework and is providing
their own small or large piece to the puzzle.
Project 114 Organization
Project 114 provides a file and folder hierarchical structure that contains all of the calc engines,
GUI front ends, the main executive spreadsheet called the “Marine Design Executive”, and other
example and documentation files. The top level MDE1a.xlsm spreadsheet file reads a text file of
available calc engines and GUI front ends. It gives you access to the documentation for each
application and a way to start each one. To access any calculation, start the MDE1A.xlsm
spreadsheet and double click any application you see there.

This file and folder organization is zipped up so that all you have to do to install it is to unzip the
files and folders. It will be created automatically. The zip file has been carefully tested, but you
can also test it with your own anti-virus software. The unzipped folder system is expected to be
located in your “C:” drive. This can be changed, but then you would have to update hard-coded
text file path links in some files. Future versions will include better installation and update tools.
For now, read the file and folder explanations in this write-up.

Since the files and programs of Project 114 are many, they do not have individual Windows
install and uninstall tools. New calc engines and GUIs can come from many sources, and users
may add in their own EXE and spreadsheet files without creating formal Windows
install/uninstall (MSI, etc.) tools. This is both good and bad. It’s good because of the simple
nature of adding new tools, but it’s bad because one has to understand the structure and what
is in each text file. Again, the goal is to eventually provide high level tools to manage those
changes.

The rest of this document describes the folders and files you see when you unzip Project 114.
C:\MDE Folder – The top level folder of the system

This is what you will see in Windows Explorer when you look at the main MDE file.

To start the system, just double click on MDE1A.xlsm and it will display the current set of
calculations on worksheet 1. If you double click on one of the calculations, the MDE will
automatically load the GUI spreadsheet for that calc engine. Here is the basic set of three
calculations provided with the system.
The MDE shows three applications provided with the initial system: HPower1B, Hydro2A, and
Savitsky2A. The number and letter at the end of the name indicates the version and revision of
the application. Double click on the name to start the calculation spreadsheet and right click on
the name to see documentation links. Once you load the spreadsheet for a calculation, you will
see two buttons there for documentation for the GUI and the specific calculation. Right now,
each GUI is tied to one calc engine, but in the future, one GUI might use several different calc
engines.

Inside the c:\MDE folder


Folder “CE” contains all of the calc engine subfolders

Folder “Documentation” contains various documents explaining Project 114

Folder “GUI” contains all of the GUI front end folders for different applications

Folder “HPower1B” contains the Microsoft VC++ project and source code for that application

Folder “Library” contains subfolders for various data files, such as offsets for Hydro2A

Folder “OpenGUIfiles” contains the generic GUI spreadsheet for any one calc engine

File “CElist.csv” contains a list and paths to all calc engine folders

File “GUIlist.csv” contains a list and paths to all GUI front ends for applications

File MDE.ico is an icon file to use if you want to set up a desktop start icon for MDE1A.xlsm

File MDE1A.xlsm is the spreadsheet file to start the MDE system

File ReadMe.txt gives simple information about how to get started


Inside the C:\MDE\CE Folder

This folder contains one subfolder for each new calc engine.

Each subfolder has the same type of files, so only the HPower1B subfolder will be explained.
HPower1B.exe – executable file calc engine that reads an input file (HPower1B_IN.csv) and
writes one output file (HPower1B_OUT.csv). These are Comma-Separated-Files as used by
spreadsheets. They are text files that can be opened in Notepad or if you double click on them,
they will open up in your spreadsheet program. The HPower1B source code example (see
C:\MDE\HPower1B folder) contains an open source Visual C++ program (solution file) where
you can find C++ code to read and write these two files. All calc engine programmers will have
to write this code. The hope is that this code will be provided in many different programming
languages.

The “Abstract” and “Documentation” files are required and should be provided by the calc
engine writer.

The “DD” or Data Dictionary CSV text file defines the set of input and output variables used by
the calc engine. All calc engine EXE files have to create one of these. The goal is to have
appropriate SNAME groups define (strongly suggest?) a naming convention for variables in
many different areas. Otherwise, it will be difficult or impossible to get calc engines to easily
work together. Double click on the DD file to load it into your spreadsheet. It is reasonably self-
explanatory, but a DD definition document will be made available, hopefully with industry
naming suggestions. Note that the DD also allows variable types such as menus and filenames.

Note that one can run a calc engine EXE without a GUI front end. You can just use Notepad to
enter the input in the “_IN” file and then double click on the “exe” calc engine. It will read the
input file and produce the _OUT file in the same folder. You can then edit the OUT file with
Notepad or double click on the file to load it into your spreadsheet. This allows users to develop
and test their new code without having any sort of GUI test front end. When I develop a calc
engine using Visual C++, I keep the “Release” folder open and just double click on the exe file
to run it. You can debug the calc engine using simple “print” commands.
Inside the C:\MDE\Documentation Folder

This folder contains this document and many others. The original “Initiative” document is:
SNAME Marine Computing Initiative. Some of the documentation may be out of date in part, but
my WMTC Paper Hollister – Nov 2015.pdf is current.

Please note that Project is a prototype work in progress, and the only way for it to be successful
is by providing good explanations and tools. Success will depend on adoption by others. In its
easiest sense, all one has to do is to write a good calc engine that reads input data from a text
file and writes data to a text file. The goal of Project 114 is to automate the rest.
Inside the C:\MDE\GUI Folder
This folder contains one subfolder for each application. All individual calc engines will have one
of these to allow users to interactively run the calculations. However, one might (in the future)
have a GUI application that launches several different calc engines, so don’t think of these
folders as being tied one-to-one with calc engines. One can also have multiple GUI front ends
for one calc engine. This could adapt the program to different needs or market segments. A
user could also make a copy of a GUI front end to add in custom calculations. Keep in mind that
this spreadsheet front end is all open source (VBA) macro code that you can examine and
change as needed.

Like the calc engine subfolders, each of these contain the same file types, so only the
HPower1B subfolder will be examined.
The “Abstract” and “Documentation” files are exactly the same as those in the Calc Engine
subfolders because this GUI is tied to just that one calc engine. These files will change for GUI
front ends that launch several calc engines. The “_CE” file is small and contains a list of all of
the calc engines used by this GUI. In this case, the _CE file has only one entry. The
“OpenGUI.xlsm” is exactly the same as the version in the C:\MDE\OpenGUIfiles folder. It is put
here because it reads the OpenGUIname.txt file that lists the name of the calc engine it will use.
The OpenGUI.xlsm file will read the DD file of the calc engine and automatically adapt the input
and output to the needs of that calc engine. The DD file allows the OpenGUI.xlsm spreadsheet
to work with any one calc engine. This OpenGUI program cannot be used for launching several
different calc engines in a row. The goal is to provide another free/open tool that will
automatically “wrap” multiple calc engines together into a larger calc engine.
Inside the C:\MDE\HPower1B Folder

This folder contains a Microsoft Visual C++ program folder containing the “solution” and all of
the source code for the HPower1B application. These files will only be meaningful for a Visual
C++ programmer. You can select the HPower1B.sou file to load all of the source code into
VC++.

Included in the source code are routines to read and write the “_IN” and “_OUT” CSV files
required by all calc engines. If you can see and open the “.h” and “.cpp” files in the “HPower1B”
subfolder with the Notepad editor.
Inside the C:\MDE\Library Folder
This folder contains library files that you can use with the applications. It currently consists of
only one folder: Hull Files, as shown below.

These files contain offsets in different formats (GHS, LFH, NWS, and SHCP) that can be used
with the Hydro2A application. It is hoped that in the future, others will contribute many more hull
files of different types and SNAME can become a clearinghouse of open hull geometries.
Inside the C:\MDE\OpenGUIfiles Folder
This folder contains the open source spreadsheet front end for any standard calc engine. All
that you have to do to customize it for your calc engine is to edit the OpenGuiname.txt file and
enter the name of the calc engine.

For example the openGUIname.txt file here has the name of the HPower1B calc engine.

The OpenGUIdocs.docx contains the documentation for this standard one calc engine front end.
This spreadsheet contains the code that automatically provides the VBA macro code to do one
calculation, looping over one variable, looping over two variables, and the generation of plots
and contour graphs of the results. Study this VBA code to see how a macro can launch a calc
engine and return the results.
Boat and Ship Databases
When the Marine Design Executive is started, one sees two (not yet working) input fields:
“Database Folder” and “Operating Condition”. Some of the biggest needs of a design system
are the saving and retrieving of design data so that one does not have to reenter the same input
for each calculation. The database system to be provided by Project 114 will deal with variables
and data structures that are meaningful to conceptual and preliminary design (those calculations
that are part of this system) and will not impose any standards for design office or corporate
detailed construction data. Philosophically, this is an interesting point. Conceptual and
preliminary design data and geometry are not necessarily scaled down versions or compatible
with detailed design and construction definitions. It is also unlikely to impose any one corporate
or general detailed CAD design structure on this early phase of design – especially one that is
supposed to support all parts of the market. The two ends of design cannot be incompatible, but
the database needs for Project114 can be handled independently and geared towards the
needs of conceptual and preliminary design analysis.

For example, the geometry definition of a hull and compartments in preliminary design is not
necessarily compatible with a simplified version of any one definition provided by a general
large ship CAD detailed design definition. One might want to define a compartment as a simple
bulkhead and deck subdivision of a station definition of a hull, not as a complex 3D solid
modeling definition. One wants tools and variables to explore different design options that do
not require the need for detailed part definition and the skills of an expert in 3D solid modeling.

Therefore, Project 114 will use spreadsheets to collect and define conceptual and preliminary
design data for any number of operating conditions. Each spreadsheet will contain information
about each different geometry version of a vessel and each worksheet will contain different
information about each operating condition. For example, the first worksheet will be used for any
early working design condition, and the following worksheets will contain design data for each
specific operating condition, like “Light Ship” and “Full Load.” This is needed because one might
want to be able to take one database and re-run all of the operating conditions through a
defined set of code and rule calculations. Since hydrostatics and stability calc engines can have
customized GUI front ends, a naval architect can create different versions of the GUI front end
to apply any and all of the special code calculations for any special rule. These different front
ends can be saved separately and rerun at any time.

This is the goal of the proposed database system for Project 114. Open tools will be provided to
make it easy to store and retrieve any variable data to and from a spreadsheet database. Users
can also load the database and make changes directly to the data.

S-ar putea să vă placă și