Free Hull Balance Script for Rhino

Discussion in 'Software' started by Karsten, Feb 8, 2015.

  1. Karsten
    Joined: Jun 2004
    Posts: 184
    Likes: 8, Points: 0, Legacy Rep: 33
    Location: Sydney

    Karsten Senior Member

    I wrote a quick script which balances a hull in Rhino based on volume displacement and centre of gravity.

    The hull surface is moved vertically until the displacement matches the specified value and rotated around the transverse axis until the centre of buoyancy matches the centre of gravity.

    I have tested it with the English version of Rhino 5. It might work with other versions as well but this has not been tested. The script can be adjusted to work with very small or very large hulls. The default settings should be suitable for most medium sized boats.

    A demo video is here:

    http://www.youtube.com/watch?v=36EML56WCY8

    You can download the script and all instructions here:

    http://www.kj-engineering.com.au/current-projects/rhino-hull-balance-script

    Enjoy!
     
  2. joz
    Joined: Jul 2002
    Posts: 166
    Likes: 0, Points: 16, Legacy Rep: 10
    Location: Melbourne, Australia

    joz Senior Member

    Karsten,

    Just out of curiosity has your program been approved by the makers of Rhino as an attachment to their program and does this effect it in any way?
     
  3. Kailani
    Joined: Apr 2013
    Posts: 113
    Likes: 8, Points: 18, Legacy Rep: 59
    Location: Hawaii

    Kailani Senior Member

  4. Karsten
    Joined: Jun 2004
    Posts: 184
    Likes: 8, Points: 0, Legacy Rep: 33
    Location: Sydney

    Karsten Senior Member

    The script works by executing standard Rhino commands from a simple text file. The text file is part of the available download and you can read it before executing it if there are any doubts.

    The commands are the same as the ones which are available via pressing buttons in Rhino. So instead of pressing a sequence of buttons you simply run a script file to automate a sequence of steps in Rhino. There is no compiled code and nothing has to be approved by Rhino. More info here:

    http://wiki.mcneel.com/developer/rhinoscript

    The hull balance script is based on the standard "Hydrostatics", "Rotate" and "Move" commands plus two nested loops. There is not much magic about it. You could do this all by hand with the help of a calculator but it would take a lot longer.
     
  5. TANSL
    Joined: Sep 2011
    Posts: 7,369
    Likes: 699, Points: 123, Legacy Rep: 300
    Location: Spain

    TANSL Senior Member

    Congratulations, Karsten. This was missing in Rhino. This is the first step of many other that must be taken in order to calculate the stability in various load conditions. Thanks.
     
  6. Kailani
    Joined: Apr 2013
    Posts: 113
    Likes: 8, Points: 18, Legacy Rep: 59
    Location: Hawaii

    Kailani Senior Member

    Yes thank you Karsten.
     
  7. GIOVD
    Joined: Nov 2009
    Posts: 9
    Likes: 1, Points: 3, Legacy Rep: 10
    Location: Canada

    GIOVD Junior Member

    Thanks you Karsten. Next step should be to include the tanks and its free surface effect.
     

  8. Karsten
    Joined: Jun 2004
    Posts: 184
    Likes: 8, Points: 0, Legacy Rep: 33
    Location: Sydney

    Karsten Senior Member

    That was actually the reason why I started this project. I wanted to check out Rhino's programming interface. The end goal is to create panel method plug - ins to calculate the flow around 3d sails, free surface waves and wave drag.
    Before I get carried away I have to justify spending time on this. Selling my plug-in a few more times would be a good start. So if you like my work, buy the naval architect toolbox plug-in here

    http://www.food4rhino.com/project/na-toolboxpro?ufh

    It will pay for itself in a few hours.
     
Loading...
Forum posts represent the experience, opinion, and view of individual users. Boat Design Net does not necessarily endorse nor share the view of each individual post.
When making potentially dangerous or financial decisions, always employ and consult appropriate professionals. Your circumstances or experience may be different.