# Variable data

Most OrcaFlex data are constant – i.e. a value, $y$ say, is a fixed specified value. But for some numerical data items you can choose to instead specify variable data. Typically the data item's value $y$ is then specified as being a function of some other quantity $x$, and the actual value $y(x)$ used by OrcaFlex then depends on the value of $x$ at the time. If $x$ varies during the simulation then $y$ varies accordingly.

As an example, consider the drag coefficient of a line. In the real world this is not a fixed constant value – it depends on the Reynolds number. For many applications this variation is not significant, so a constant drag coefficient is sufficient. But sometimes the Reynolds number dependency is important, in which case you may specify the drag coefficient to be a function of Reynolds number. Then, each time the drag coefficient is needed, OrcaFlex will first calculate the Reynolds number $x$ and then derive and use the corresponding drag coefficient $y(x)$.

Some variable data are defined in a slightly different way. For example, the axial stiffness of a line type is the slope of the tension-strain curve, so in this case constant data specifies $\small{dy/dx}$, rather than $y$, where $y$ is tension and $x$ is axial strain. In this context constant means constant slope, i.e. linear, and the constant value you specify is $\small{dy/dx}$, whereas variable means nonlinear and you specify $y$ as a function of $x$. Special cases like this are documented in the description of each data item where they apply.

## Using variable data

Variable data can only be used for certain data items. These are the numerical data items, indicated by a small down-arrow button to the right of the data item value. For these data items, you can give either a fixed constant numerical value in the usual way, or the name of a variable data source (which you do by typing in the name or by selecting it using the down-arrow button). The named data source must already have been defined – see the next section.

Different data items can use the same variable data source, in much the same way that, for instance, different sections of a line can use the same line type.

## Setting up variable data sources

All variable data sources are defined on the variable data form, which can be opened using the model browser or the popup menu on any data form.

Each table on the variable data form is given a name and the tables are grouped according to the type of data they contain: data for drag coefficients and for axial stiffness, for example, are in different groups.

This structure is indicated by the layout of the form, which is designed to be used from left to right. So first select the type of data you want, using the tree view in the left-hand section of the form.

The centre section of the form then shows how many data sources have already been defined for that selected type of data, and lists their names. To add a new source, increment the number of data sources. To edit the name of a data source, double-click the name or select it and press F2. To delete a data source, select it and press the DELETE key.

The right-hand section of the form is where the data for the data source are entered. The different forms these data may take are described below.

## Tabular data sources

These are specified by giving a table of pairs of values $(x_1,y_1),(x_2,y_2),\ldots,(x_\mathrm{n},y_\mathrm{n})$, where the table's left-hand column is the independent variable $x$ and its right-hand column is the dependent variable $y$. The data will be automatically sorted in order of increasing $x$ when they are used or when you use the profile button.

This table defines a function $y(x)$. Intermediate values of $x$ are obtained by interpolation. For values of $x$ outside the range of the values given, OrcaFlex either extrapolates or truncates. By truncation we mean that OrcaFlex uses $y_1$ for all $x{\leq}x_1$ and $y_\mathrm{n}$ for all $x{\geq}x_\mathrm{n}$, the table already having been sorted so that $x_1{\lt}x_2{\lt}\ldots{\lt}x_\mathrm{n}$. The variable data form reports the method of interpolation and whether extrapolation or truncation is used.

The profile button displays a graph of the currently selected data. This is useful for data checking purposes. Where appropriate, log scales are used.

## Horizontal variation factor data sources

These data sources specify a variation along a user-prescribed axis. This axis is defined by the X,Y coordinates of an origin and an azimuth direction. Associated with this axis is a table of values defining the horizontal variation factor $(y(x))$ as a function of distance along the axis $(x)$. This table is specified in the same way as for tabular data sources.