Orca3D News


Friday, July 30, 2010

Computing Righting Arms with Fixed Trim

We recently had a question from an Orca3D user about how to compute righting arm curves, but with a fixed trim. While this doesn't reflect the true physics of a vessel heeling, some regulatory bodies still require the calculation to be done this way.

Orca3D doesn't have an option to automatically compute fixed-trim righting arms, but we quickly developed a series of steps that would accomplish the goal:
  1. Run free-float hydrostatics with zero trim for each heeled condition needed for the righting arm curve. This can be done in a single run by specifying a weight, zero trim and a range of heel angles (not rollover angles) in the hydrostatics input dialog.
  2. Record the resultant LCB for each condition.
  3. Then for each heel angle, input the weight, VCG, TCG, recorded LCB as LCG and the desired righting arm angle and run to get the righting arm for that angle.
As a repetitive series of steps, this is an obvious candidate for scripting. Rhino has excellent facilities for scripting (for example, the Orca3D Offset Table function is actually a script). Scripts can be as simple as a series of Rhino commands, or can be complex VBScript programs, with different variable types, logical constructs, and data input and output.

We've developed a script that allows the user to enter the displacement, LCG, TCG, VCG, desired heel angles, and to select the surfaces to be included in the calculation. The righting arm data is then computed, and displayed in a text window, where it can be saved as .txt file. This file is easily opened in Microsoft Excel, and the righting arm curve is easily created (in Excel 2010, it takes just one click).
To use this macro:
  1. Download the macro by clicking here, and save it in a convenient directory.
  2. Start Rhino, and click on Tools/RhinoScript/Load.
  3. Click Add, browse to the script, and click Open.
  4. Click Close
  5. Click Tools/RhinoScript/Run, select the script, and click OK.
  6. Follow the prompts.
  7. When the script completes, the data will be displayed in a window. Click SaveAs, and save the file with a .txt extension.
  8. Open the file in Excel, with a comma delimeter. Select the Heel Angle and Righting Arm data, and create the plot.
If you'd like to learn more about scripting, there is an excellent reference guide included with Rhino. Click on Help/Plug-ins/RhinoScript, and follow the examples.