Author Topic: Naval Architecture Utilities - Demo  (Read 534 times)

Pavlos

  • Newbie
  • *
  • Posts: 15
Naval Architecture Utilities - Demo
« on: September 13, 2016, 03:36:49 AM »
This is the demo version of a program I have been working on an occasional basis during the past decade.  It was originally hurriedly attempted in using a VB6 environment, but at a later time it was redone from scratch, (only the fundamental ideas that worked reasonably well in VB6 remained the same}, using Visual Basic 2010 Express Edition.

The program uses {Microsoft Excel 7} as a structured input data storage, and a structured results storage facility, (converting most of the results also into properly formatted pdf files in the process), and it uses the Design CAD 3D drawing and distance measuring algorithms via their respective automation connections, to draw, workout and collect necessary measurements.  Then the required Hydrostatics, Cross Curves of Stability information, etc., are computed, by instructing Design CAD 3D to carry out all the drawing and measuring manipulation that a Shipyard Design Office Naval Architect / Draftsman would have done manually in order to achieve the intended goal.  Care has been taken to visually demonstrated how each step of a calculation  is in effect being carried out, so that anybody wishing to test any part of the calculation, he could do so using nothing more than a pocket calculator and the basic mathematics  that any Naval Architect must have.

The program may be downloaded from the following Dropbox link:

https://www.dropbox.com/sh/bbacvnfu8yt0lon/AAAL4tWvq_Camlr0ZLly4BuRa?dl=0

Once in the Dropbox simply copy the entire folder onto the desktop and click on the setup file.  The program will install itself and the interface will appear on the desktop and it may be uninstalled via the Control Panel as any other program would.   

Any interested persons kindly let me know of any problems in  the installation  or operation of the program.  At my end I have successfully tested it by using the above  Dropbox link to download it on a computer that had {Windows 7}, but in which {Microsoft Office 7}, {Design CAD 3D} and {Visual Basic 2010 Express Edition} had not been installed yet.  The whole process was repeated successfully on the same computer after it had been upgraded to {Windows 10}.

Best Regards
Pavlos Levantis






     
Pavlos

DrollTroll

  • Kindly Curmudgeon
  • Administrator
  • *****
  • Posts: 4092
Re: Naval Architecture Utilities - Demo
« Reply #1 on: September 13, 2016, 07:29:27 AM »
Hi Pavlos,

This sounds like an interesting project, and I congratulate you on getting it this far along!

I have some questions:

Exactly what are the requirements for your utility to run? For example:

  • Will any version of Excel do, or must it be Excel 7?
  • Will any version of DesignCAD do, or must it be a particular version?
  • Does VB Express 2010 also have to be installed?
Any one of those requirements, if they are version-specific, is potentially a deal-killer.
Also, requiring a development environment to be installed is quite unusual. Normally, if you've created a release build of your program, it shouldn't require the development environment (though the end-user may have to install updated runtimes for that environment).

Of course, if you are not planning to eventually sell the program, those requirements are much less of an issue.

Regards,

DrollTroll
2016 marks my 24th year in DesignCAD-Land!

Pavlos

  • Newbie
  • *
  • Posts: 15
Re: Naval Architecture Utilities - Demo
« Reply #2 on: September 14, 2016, 08:22:47 AM »
Hi DrollTroll.

May thanks for your prompt response to my post.

The program was developed on a {Windows 7} PC which had {Office 7} and {Design CAD 3D Max 23} installed.  It was then tested in another {Windows 7} PC which had just been formatted from scratch, in which {Office 7}, {Design CAD 3D Max 23} and {Microsoft Visual Basic 2010 Express} had not been installed yet.  The {Setup.exe} installed the program and the Demo part of the program run using Demo by use of the relevant libraries and Demo data embedded in the program.  Therefore although I am really a professional programmer, I think this should indicate that the program should run on any machine, simply because all that the program needs in way of {Office 7}, {Design CAD 3D Max 23} and {Microsoft Visual Basic 2010 Express} libraries have been compiled with in.

When I decided to redo the program in {Microsoft Visual Basic 2010 Express}, I was really planning to configure it as an "exe" that could be loaded from within {Design CAD 3D Max 23} and handled from within.  Not being an accomplished programmer however I encountered too many difficulties and the debugging proved to be nightmare, mostly because Naval Architecture drawings and calculations are extremely long and elaborate processes.  This is particularly true, because the basic purpose of the program was to make the computer simulate exactly what a human draftsman does during the drawing and calculating routines required in ship design, the benefit being that the computer high level of accuracy remains constant irrespective of complexity of a drawing or a calculation, and the speed by which such tasks are accomplished cannot be matched by any human.   

At its present stage of development, the program contains all the necessary handles to permit its further development is actually enabling to calculate the properties of all the compartments of a ship with some minimal additional {Design CAD 3D Max 23} data, and then draw a complete {Capacity Plan with Deadweight Scale}, a {Midship Section}, a {Profile & Decks}, and a {Shell Expansion}, assisted of course by {Design CAD 3D Max 23} drawings attributes to complete each of these drawings.  From the Midship Section a "Section Modulus" calculation may be carried.  Eventually all these information may be  combined to form the input of a "Trim & Stability Loading Manual for an Intact Ship or a Damaged Ship" which would include "Grain Loading" and "Upper Deck Timber Cargo", depending on the type of ship.  All that will be needed to complete the data package for that would be the {Lightship Data}, namely the empty ship's Light Weight and its Vertical and Longitudinal Centre of Gravity.

In short, once simple access has been gained to all the relevant properties derivable from a ship's geometry, (like Volume, Vertical Centre of Volume, Longitudinal Center of Volume, Transverse Centre of volume, Water Free Surface Moment, Grain Free Surface Effect, etc. all as a function of Sounding or Ullage), there is no limit to the number and type of subsequent drawings or ship stability / strength calculations that may be generated.

All I need to proceed further is for a number of people to try to install and run the program on their PC and let me know if it installs and runs smoothly or if it gets hung up somewhere.  AS I stated above the program should run without any problem on a {Windows 7} or later PC irrespective of whether {Office 7}, {Design CAD 3D Max 23} or {Microsoft Visual Basic 2010 Express} happen to be present.

Best Regards
Pavlos






 
Pavlos

Dr PR

  • Hero Member
  • *****
  • Posts: 5379
Re: Naval Architecture Utilities - Demo
« Reply #3 on: September 14, 2016, 10:01:48 AM »
Pavlos,

I doubt if there is anyone on the forum who has designed a ship based upon functional requirements and the ship's purpose. So we really have no idea where to start or what to do to use the program. Is the program useful for designing small boats or mega tankers, or both?

Several folks have done the reverse process - starting with hull data for existing or historic ships, such as frame drawings, the Table of Offsets and Table of Sight Lines - and creating a CAD model of the hull. But I suspect your program would not be useful for recreating historic ships unless the original design parameters were known (and they rarely are).

Phil
DesignCAD user since 1987

Pavlos

  • Newbie
  • *
  • Posts: 15
Re: Naval Architecture Utilities - Demo
« Reply #4 on: September 15, 2016, 06:08:58 AM »
Dr PR

The program was built exactly in the reverse process you mentioned.  Namely using the Line’s Plan / Relevant Offsets Table, and other drawings of three existing ships of different size, (with which I happened to have been involved with, in some other capacity).
First I worked out the code that would read all the necessary numerical data input, (either as tabulated offsets figures, or as worked out numerical input derived from {Design CAS 3D} drawing and measuring capabilities.  Then for the sake of visual confirmation that {Design CAS 3D} was rendering correctly each hull, I synthesized the code that would draw various views and aspects of each hull.  Some of these drawings were the type of drawings that a Draftsman would need to generate, in order to carry on with the derivation of numerical data, required for the calculation of the corresponding {Hydrostatic Curves}, {Cross Curves of Stability}and {Bonjean Curves}, to begin with. 

The next logical step would be to use the same type of drawings in order to derive all the numerical data required to compute all the various compartments properties, (Volumes, Coordinates of Volume Cancroids, Water Free Surface Moments, Grain Free Surface Moments, etc), of each ship.  This has not been achieved yet.

Looking further into the future, the next logical step to take would be, to synthesize the piece of software that will enable the extrapolation from an existing ship’ hull, the hull of a new ship, satisfying some client’s requirements for larger or smaller Deadweight, Cargo Capacity, Speed, etc.  I think that this is the most cost effective and efficient method to use in designing any contemporary commercial ship.

I believe the program should respond well in the design of any mono hull which has no longitudinal knuckle line between the light waterline and the main deck at side.  This is a temporary limitation imposed by the fact that when I first embarked on the project, none of the ships whose drawings were in hand had such a feature.  If however it proves necessary, the reading module may be reconfigured to allow for the existence of a knuckle line of the type described.

The program has not been tried in the design of a boat, simply because it is practically impossible to find a prototype boat that would have comprehensive coverage of drawings and calculations that would assist by being used a calibration hull model.  Furthermore, motor boats of the cabin cruiser type may have several longitudinally running knuckle lines, for which the program, at its present stage of development, is not ready to deal with yet.  Therefore any commercial ship shape above, say 1000 tons, should pose no problem.

Finally I must point out that the DEMO version currently released, works only with any of the three ships, whose input data has been embedded in the program.  Consequently if the “New Or Existing Project Files” option of the “SET UP PROJECT FILES” button is used, a message will appear explaining matters and the program will reset itself.  After I receive some confirmation that everything runs well on other PCs, development will be continued, until the first version of the fully operational program is made available.

Best Regards
Pavlos
Pavlos

Dr PR

  • Hero Member
  • *****
  • Posts: 5379
Re: Naval Architecture Utilities - Demo
« Reply #5 on: September 15, 2016, 11:00:20 AM »
Pavlos,

Thanks for the clarification. You have started an ambitious project!

I have attached images of a 40' boat hull showing how I divided it up into several grid surfaces. First, I created one side of the forward part (light blue/cyan) and mirrored it for the opposite side (orange). The keel/stem is two separate surfaces (red and magenta). The sudden transition at the rear of the skeg was a MAJOR problem! After numerous attempts to create a single hull surface from bow to stern I concluded that this is impossible with DesignCAD's "Surface Connect" function. The resulting surface was severely warped in all cases, no matter how many grid segments and intermediate breaks were used (more about that later).

So I ended the forward surface grid at the skeg and generated a single surface for the aft part of the hull (green). The aft surface of the skeg is a separate plane (blue). The transom (red) is another grid.

The result is pretty good. It might be possible to create the entire forward part of the hull (sides and keel/stem) as one surface but you will encounter surface wrinkles where all of these lines converge at the bow.

One very significant problem with this design is that you have to be VERY careful with the join between the forward (cyan/orange) grids and the aft green grid. If the points on the front/rear grids do not align exactly there will be "leaks" between these surfaces that will cause 3D printing algorithms to have fits. It will be necessary to run the design through a "leak fixer" program, and this could introduce surface irregularities. By carefully defining the number of planes/line in the grids and using the points in the curves you can achieve perfect alignment of the points, but this will take a lot of trial and error work to find the perfect number of planes per line for the grids!

****

I understand the problem with knuckles in ship's hulls. The ship I have been modeling (USS Oklahoma City CLG-5) had knuckles running about 2/3 the ship's length, and at the junction of the transom and hull bottom. I have attached two images of this hull.

If your program is generating frame lines to be used with the DesignCAD's "Surface Connect" function, keep in mind that you can put a kink/knuckle in a Curve by placing two points in the curve at the same location. However, the Surface Connect function does not propagate these kinks at intermediate breaks along the length of the grid, and you will find the grid has smooth curves where the grid wraps over the knuckle between the template grid lines. A possible solution is to create many template lines and use no intermediate breaks.

My solution was to create separate grid surfaces above (cyan. green and blue) and below (yellow, red and orange) the knuckle. And as before I created one side of the hull and mirrored it to get the opposite side.

The upper sides of this hull are divided into two bands. The lower band just above the knuckle represents the black "waterline" and the upper part is the gray hull above the waterline. This is an artificial division only for the purpose of having a black waterline and gray upper hull sides. Instead of six surfaces I could have used three if I didn't care about the color of the surfaces.

I did encounter one significant problem with the "Surface Connect" function - it can generate a very limited number of points. I don't recall the actual number but there is a detailed discussion of this limit elsewhere on the forum. If you increase the number of planes per line or the number of intermediate breaks you reduce the total number of segments along the length of the grid. Of course when you reduce the number of planes and number of breaks you get a coarser surface that may not be the desired surface. After I found the minimum number of these elements necessary to generate the desired curves the "Surface Connect" function failed to  generate a grid the full length of the hull. This is why the upper surface is broken into two shorter grids (cyan and green).

The  bulbous bow surface (red) was somewhat complex, but I was pleased to create it with a single surface. Causing the top/end edges of a grid to come together in a smooth curve is quite a challenge, but it can be done by using the right number of planes per line and intermediate breaks (a lot of them).

The stern was a fairly complex surface because the bottom of the transom was "squared off" and the top was a semicircle. In addition, the knuckle at the bottom of the transom blended smoothly with the upper curved surfaces. Also, the knuckle in the forward part of the hull disappeared into a smoothly curved hull above and below the water line. Many trial and error attempts were necessary to tame this blending of these sharp knuckles into the complex smooth upper surfaces.

Again, I ran into severe surface irregularity problems at the rear of the skeg. I had to break the surface into several different grids to accommodate these drastic surface variations. And again the keel, fairwater and stem are separate grids.

I hope these two examples will be helpful to you as you refine your program.

Phil

PS: The cruiser hull was created from the Table of Offsets and Table of Sight Lines. These were in the "feet-inches-eighths +" format in use at the time the hull was designed. The "+" meant a bit more than the 1/8" dimension but less than another 1/8" - I just converted the eighths numbers into sixteenths and added an extra 1/16" for the "+" values. Then I converted all values to decimal inches. So 10-4-3+ became 120" + 4" + 6/16" + 1/16" and that became 124.4375".
« Last Edit: September 15, 2016, 11:14:29 AM by Dr PR »
DesignCAD user since 1987

Pavlos

  • Newbie
  • *
  • Posts: 15
Re: Naval Architecture Utilities - Demo
« Reply #6 on: September 16, 2016, 07:41:16 AM »
Dr PR

The work described is understood to vary the boat’s moulded shape by manipulating its surface as such.  At some stage I attempted that type of hull manipulation on one of the three hulls embedded in my program and I did get quite close to establishing a workable fair solid, (using Surface Connect function and other similar).  As however all the calculation modules relied entirely on the traditionally tabulated data, and as I was informed from “Design CAD 3D” that the package does not in effect contain what was described to me as a “solid generation engine”, after I satisfied all my “What If” curiosity, I saw no reason to continue development in that direction.  I can only remember that the resulting algorithms were very cumbersome and their debugging proved to be nightmare. I simply removed the relevant module in it entirety.

I have encountered other CAD packages that are designed to specifically permit such type of hull shape variation.  They are all quite expensive and I was never entirely certain that at the end of the day, the description of the resulting hull could be adequately rendered back, in the traditional offsets table with all the customary trimmings and information.

The issue of the knuckle line in my program will not be dealt at this time, at least not until I can get my hands on some Ro-Ro or Passenger Ferry Drawings and Calculations.  When debugging such software and testing how well the resulting drawing conforms to an already existing fair Lines’ Plan, it is far better to use a hull that is much larger than a boat.  The longitudinally extending knuckle lines are likely to be far fewer and less pronounced and cramped, than those usually found in a Cabin Cruised type of hull.  Once everything works out satisfactorily with the 3D drawing of such a hull, it may be tried on the smaller variety of hulls, and the working algorithms refined as necessary.

At this point I have to explain that my primary professional occupation is that of a Marine Consultant, (Marine Insurance Claims and Marine Disputes), rather than that of a Design Consultant.   Throughout all my years in the business I have mostly dealt with all kinds of Casualties and Damage Surveys, Marine Disputes, etc., and several times I was also consulted in relation to new building specifications and relevant contracts.  It was in connection with such work that I found out that there were advantages to be gained by never straying too far away from the scientific component of Naval Architecture.  My program therefore is an assembly of many types of drawings and calculations that I had to carry out under pressure in the past, using VB6 programming, Visual Basic for Applications under Excel, often having to rely on manual drawing rather any type of CAD. 

Finally I would be most grateful, if you could you let me know at you earliest convenience, if my program installed and run well at your end.  This is my very first attempt to distribute software in an “exe” form away from Piraeus, Greece, namely a release built for m of a program that should work completely outside the Visual Basic 2010 Express Development Environment.

Best Regards
Pavlos
Pavlos

Bob P

  • Hero Member
  • *****
  • Posts: 1139
    • Era Replica Automobiles
Re: Naval Architecture Utilities - Demo
« Reply #7 on: September 16, 2016, 09:21:29 AM »
This dates back to 1996. My race boat from back then.

DrollTroll

  • Kindly Curmudgeon
  • Administrator
  • *****
  • Posts: 4092
Re: Naval Architecture Utilities - Demo
« Reply #8 on: September 16, 2016, 09:25:47 AM »
After some initial difficulty I managed to install it and run it on a clean Windows 10 Virtual Machine, with no VB Express, Excel or DesignCAD installed.

When I tried to run the demo data, I got this exception:

"Retrieving the COM class factory for the component  with CLSID {00024500-0000-0000-C000-000000000046} failed due to the following error: 80040154 Class not registered (Exception from HRESULT: 0x80040154 (REGDB_E_CLASSNOTREG)."

Googling it tells me that it's because Excel isn't installed on the system. That's about as far as I got.

Suggestion for future deployment: rather than posting individual files for download, zip the whole mess up into one hierarchical zip file :D
My difficulties were due to the piecemeal downloading from dropbox -- I misnamed a folder. If I could have simply downloaded and extracted a zip file it would have been much faster and easier.
 
DT
« Last Edit: September 16, 2016, 09:29:04 AM by DrollTroll »
2016 marks my 24th year in DesignCAD-Land!

Pavlos

  • Newbie
  • *
  • Posts: 15
Re: Naval Architecture Utilities - Demo
« Reply #9 on: September 19, 2016, 03:16:49 AM »
Many thanks for your feedback.  I believe this communication ought to resolve all problems.  I have therefore attached herewith the zipped folder as instructed which should be possible to extract onto your desktop in a manner that would render the installation folder identical to what I have on my desktop.

Furthermore, in order to provide an indication of how things ought to be working at your end, I have included two videos, namely “Unpacking and Instalation.wmv” and “Sample Running.wmv”.   The two videos were recorded by screen capture using the {Corel VideoSturdio X7} software.  They should play well at your end.  As I found out that the two video files cannot be attached to the forum correspondence like an ordinary file, I have placed relevant copies in my Dropbox.  The respective links are:

https://www.dropbox.com/s/m9tiu7og7zvgifn/Sample%20Running.wmv?dl=0

https://www.dropbox.com/s/9wmwpi7t3xnmwov/Unpacking%20and%20Instalation.wmv?dl=0

These demonstrate the unpacking onto a Desktop and a sample running of the program on the basis of one of the embedded ship’s data, respectively.  The very first run of each ship will take longer as it will go through the entire setup procedure for the ship chosen visually. This way, the operator can visually confirm that the computer is interpreting the submitted data in the manner the operator intended it to be interpreted.

Regarding the problem with Excel, I tried unpacking and running the program on my oldest laptop which runs on {Windows XP} and had an {MS Office 2002} installation, (where the Excel files have an “xls” name second part, instead of the contemporary “xlsx”).  The program failed to read the embedded data.  Therefore to be on the safe side, the program will require a {Windows 7} environment or later and an Excel whose name second part is “xlsx”, (which I believe was established in the {MS Office 7} suit).

Best Regards
Pavlos
Pavlos

Pavlos

  • Newbie
  • *
  • Posts: 15
Re: Naval Architecture Utilities - Demo
« Reply #10 on: September 21, 2016, 03:46:41 AM »
Dear all

Can someone please inform me if my last post has been looked into and perhaps confirm that everything run satisfactorily at your end, in much the same manner shown in the attached videos.

Best Regards
Pavlos
Pavlos

DrollTroll

  • Kindly Curmudgeon
  • Administrator
  • *****
  • Posts: 4092
Re: Naval Architecture Utilities - Demo
« Reply #11 on: September 21, 2016, 06:31:47 AM »
Sorry, I haven't yet had a chance to dig into it any further. I will do so when I get the free time.
2016 marks my 24th year in DesignCAD-Land!