• No results found

Set the data using one or more commands of the form VariableName = Value

In document OrcaFlex Tutorial (Page 88-91)

Extend Simulation

2. Set the data using one or more commands of the form VariableName = Value

The object name is most easily found on the Model Browser. The variable name is found by opening the relevant data form, selecting the required data item and pressing F7.

Some examples of this procedure follow:

Select Link1

UnstretchedLength = 50 Select "3D Buoy1"

Mass = 4 Volume = 8

w

Automation, Batch Processing Height = 7.5

Select Line1

IncludeTorsion = Yes

Note: The name "3D Buoy" needs to be enclosed in quotes because it contains a space. If the name contains a double quote and spaces then it should be enclosed with single quotes.

Data in tables and indices

Some data in OrcaFlex appear in tables. For example consider the Structure page of the Line data form which specifies how a Line is made up of a number of sections. Each section is specified by its Line Type, length etc. The following example sets the number of sections of the line to be 2 and then sets data for both sections in turn.

Select Line1

NumberOfSections = 2 LineType[1] = Riser Length[1] = 75

TargetSegmentLength[1] = 4 LineType[2] = Rope

Length[2] = 200

TargetSegmentLength[2] = 20

Note that we use blank lines to lay out the script. This is not essential but makes reading the script easier.

Data which appear in tables are always set using the indexed notation used above. Having stated this rule, we immediately break it in the section below!

Line Type, Clump Type and Flex Joint Type data

These data are set by first selecting the type by name and then assigning the data as illustrated below:

Select "Line Type1"

OuterDiameter = 0.28 InnerDiameter = 0.21

On the Line Types data form there is an option to view the data for all Line Types at once or to view by individual Line Type. When viewing for all Line Types at once, the data appear in tables with one row per Line Type. However, the data must be set by first selecting the type by name and then assigning the data. You cannot set Line Type using index notation.

Similar rules apply to Clump Type data and to Flex Joint Type data.

Drag Chain Type and Wing Type data

These data are also set by first selecting the type by name and then assigning the data. For example:

Select "Drag Chain Type1"

Length = 12 Select "Wing Type1"

NumberOfAngles = 12 Angle[2] = -80 Lift[2] = 0.2 Drag[2] = 0.15 Moment[2] = 0.5

Data found on the General data form

Data found on the General data form can be set as follows:

Select General

InnerTimeStep = 0.01 OuterTimeStep = 0.1

Data found on the Environment data form

Data found on the Environment data form can be set as follows:

Select Environment SeaBedStiffness = 3000 SeaBedDamping = 80

For data specific to a particular wave train you must first select the Environment and then select the particular wave train. This makes use of the alternative syntax for Select which is Select <Object Type> <ObjectName>. For a wave

Automation, Batch Processing

w

train you replace <ObjectType> with WaveTrain and replace <ObjectName> with the name of the wave train as defined on the Environment data form. For example:

Select Environment

Select WaveTrain "Swell from SW"

WaveDirection = 135 WaveType = "Dean Stream"

WaveHeight = 2.5 WavePeriod = 18

Select WaveTrain "Local Wind Sea"

WaveDirection = 40 WaveType = JONSWAP WaveHs = 5.7 WaveTz = 9 Data for Current data sets

Multiple Current data sets can be defined. Again this requires the alternative syntax for Select as shown below:

Select Environment

MultipleCurrentDataCanBeDefined = Yes NumberOfCurrentDataSets = 2

CurrentName[1] = "120deg"

Some Vessel Type data are set in a straightforward manner as follows:

Select "Vessel Type1"

CurrentCoeffSurgeArea = 1200 CurrentCoeffSwayArea = 1100 CurrentCoeffYawAreaMoment = 120E3

To set data for displacement RAOs, wave load RAOs, wave drift QTFs and sum frequency QTFs you must also specify to which type of RAO the data apply. For example:

Select "Vessel Type1"

Select RAOs SumFrequencyQTF RAOOriginX = -3

RAOOriginY = 0 RAOOriginZ = 4

w

Automation, Batch Processing Note that the variable names are the same but different data are set depending on which type of RAOs has been selected.

In addition, when setting RAO table data (for displacement RAOs, wave load RAOs and wave drift QTFs) you must specify to which direction the data apply. For example:

Select "Vessel Type1"

However, it is worth pointing out that situations where you would wish to specify RAO table data in a batch script are rare. It is much more likely that you would import these data into OrcaFlex from some external source and then save it as part of the base case data file.

Multibody group data

Some multibody group data are set in a straightforward manner as follows:

Select "Multibody Group1"

NumberOfBodies = 2

VesselType[1] = "Vessel Type1"

VesselType[2] = "Vessel Type2"

To set the stiffness data you must first select the body:

Select "Multibody Group1"

SelectedStiffnessBody = "Vessel Type2, Draught1"

DisplacedVolume = 85e3

To set the added mass and damping data you must select the period and the row/column body:

Select "Multibody Group1"

NumberOfAddedMassAndDampingPeriodsOrFrequencies = 2 AddedMassAndDampingPeriodOrFrequency[1] = 11.0 AddedMassAndDampingPeriodOrFrequency[2] = 13.0 SelectedAddedMassAndDampingPeriodOrFrequency = 11.0

SelectedAddedMassAndDampingRowBody = "Vessel Type1, Draught1"

SelectedAddedMassAndDampingColumnBody = "Vessel Type2, Draught1"

AddedMassX[1] = 42.0 DampingX[1] = 35.0

The fact that it is possible to set this data through batch script does not necessarily make it a good idea to do so. This data is exceedingly unwieldy to manipulate in batch script. Should you find yourself doing so, it might be prudent to look for a more elegant solution to your problem.

In document OrcaFlex Tutorial (Page 88-91)