Python external function examples: Introduction

Writing external functions can be a complex task with a steep learning curve. We provide a number of examples of external functions which are intended to make the learning process more accessible:

Each example is contained in a separate directory. Initially you should start with the current function examples. These start with the simplest possible example of an external function, and progressively introduce more functionality. The remaining examples cover more complex aspects of external function coding.

The ZIP file contains the code for all of the examples. Each individual example, or collection of related examples, is described in one of the following topics in this section:

Running or writing Python external functions

Our recommendations for Python set up are different for these two external function use cases:

For both cases we direct you to our documentation for Python interface installation. However, users who do not intend to edit any Python code may find that the section on OrcaFlex embedded Python is the most relevant section.

For users who wish to create or edit Python external functions, we recommend that you do not install the OrcaFlex embedded Python, and instead follow the general instructions so that the end result is a Python installation on your machine that both users and OrcaFlex will share.