Sunteți pe pagina 1din 2

Advanced Automation, OrcaFlex User

Group 2009
The Advanced Automation presentation at the 2009 OrcaFlex User Group Meeting presented a
variety of automation techniques making use of the Python interface to OrcaFlex. The new MATLAB
interface was briefly introduced and all the examples presented could be implemented in a very
similar fashion using MATLAB.

It is important to stress that these more advanced automation techniques are not intended to
replace the traditional automation facilities (OrcaFlex batch script and Excel post-processing
spreadsheet). The Python and MATLAB interfaces should be viewed as complementary to the
traditional approaches and should be used when limitations of the traditional approaches are

Pre-requisites for running the examples

In order to run the examples you need the following:

 An installation of Python.
 The Python interface to OrcaFlex as supplied on the OrcaFlex installation disk.
 The Python add-on module matplotlib which is used for plotting.

Installing matplotlib can be quite tricky and so we would recommend the use of a Python
distribution which includes matplotlib, e.g. Python(x,y) [].

Example 1: Fatigue with varying wave direction
This example does not use Python and instead makes use of the traditional batch script and Excel
post-processing spreadsheet. The idea is to perform a full-factorial study where a uni-directional set
of sea-states is applied to a system for a number of different wave directions. Although this can be
performed using the traditional approaches it is rather clunky to do so.

Example 2: Fatigue with varying wave direction (more slick)

The first example which makes use of Python repeats the analysis of Example 1 but uses a more
efficient technique. Although Python is used the Python interface to OrcaFlex is not actually used.
Instead text data files (.yml) are output which specify the various load cases by applying the variation
in wave direction and sea-state.
Example 3: Lazy wave design (part 1)
The Python interface to OrcaFlex is introduced. This script is shows how to perform a very simple
parameter study where a single parameter (float pitch for a Lazy Wave system) is varied. The effect
of the variation is shown by plotting OrcaFlex output directly from the Python script.

Example 4: Lazy wave design (part 2)

This example continues the theme begun in the previous example. This time two parameters are
varied and a contour plot is produced. Note that there are actually two scripts for this example. The
first script ( must be run first to perform the calculations and output the results.
After this is complete is run which reads in the results and produces the contour plots.

Example 5: GUI programming

The final example introduces Graphical User Interface (GUI) programming using the Qt framework.
The beauty of this is that the bulk of the Python user interface code is actually produced by a GUI
designer program (Qt designer in this case).

David Heffernan, Orcina Ltd.

February 2010.