01.12.2012 Views

OrcaFlex Manual - Orcina

OrcaFlex Manual - Orcina

OrcaFlex Manual - Orcina

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

User Interface, <strong>OrcaFlex</strong> Model Files<br />

3DBuoys:<br />

- Name: 3D Buoy1<br />

InitialPosition: [0, 0, 10]<br />

DragArea: [100, 100, 30]<br />

Pen: [4, Solid, Yellow]<br />

Without grouping the file would be significantly longer:<br />

3DBuoys:<br />

- Name: 3D Buoy1<br />

InitialX: 0<br />

InitialY: 0<br />

InitialZ: 10<br />

DragAreaX: 100<br />

DragAreaY: 100<br />

DragAreaZ: 30<br />

PenWidth: 4<br />

PenStyle: Solid<br />

PenColour: Yellow<br />

34<br />

w<br />

The majority of grouped data are X,Y,Z components and we adopt the convention that these components appear in<br />

that order when grouped.<br />

YAML files may contain comments which are introduced by a hash (#) character followed by a SPACE. All<br />

subsequent text on the same line is comment and is ignored when <strong>OrcaFlex</strong> reads a text data file. Comments are not<br />

preserved by <strong>OrcaFlex</strong> and any user comments in a manually edited YAML file opened with <strong>OrcaFlex</strong> will be lost if<br />

the file is saved. Comments are formatted in green in the following example:<br />

General:<br />

# Statics<br />

StaticsMethod: Whole System statics<br />

BuoysIncludedInStatics: Individually Specified<br />

# Dynamics<br />

StageDuration:<br />

- 8<br />

- 16<br />

TargetLogSampleInterval: 0.1<br />

# Integration<br />

SimulationIntegrationMethod: Implicit<br />

ImplicitConstantTimeStep: 0.1<br />

A text data file can be rather large, particularly if it contains vessel hydrodynamic data. Code folding editors can help<br />

somewhat, but even so such files can be awkward to work with. The IncludeFile identifier allows you to move<br />

data into a separate file which is then included in the main file:<br />

# File: C:\Desktop\main.yml<br />

VesselTypes:<br />

- Name: FPSO<br />

IncludeFile: FPSO.yml<br />

Vessels:<br />

- Name: Vessel1<br />

VesselType: FPSO<br />

The included file contains just the data for the vessel type:<br />

# File: C:\Desktop\FPSO.yml<br />

Length: 240<br />

RAOResponseUnits: degrees<br />

RAOWaveUnit: amplitude<br />

WavesReferredToBy: period (s)<br />

# ... remainder of large file omitted ...<br />

As well as making the main file shorter and more readable, using this approach can offer significant QA benefits.<br />

In this example we have used a relative path and so the program will look for FPSO.yml in the same directory as the<br />

main text data file.

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!