Python reference: OrcaFlexLineObject

The class OrcaFlexLineObject is the Python interface representation of an OrcaFlex line. This class subclasses OrcaFlexObject so offers the same attributes and methods, with the addition of line specific methods described here.

Construction

A new OrcaFlexLineObject is created from a Model object like this:

model = Model()

line = model.CreateObject(ObjectType.Line, "line2") # Create a new line object called "line2"

Or, where the OrcaFlex line already exists, like this:

line = model["line2"]

Attributes and methods

lineTypeAt

lineTypeAt(arclength)

This returns the line type corresponding to the line position defined by arclength.

EulerBucklingLimitExceeded

EulerBucklingLimitExceeded

A boolean property that indicates whether the line has exceeded its Euler buckling limit during the simulation.

NearestNodeArclength

NearestNodeArclength(targetArclength)

Returns the reference arc length of the nearest node to targetArclength.

NodeArclengths

NodeArclengths

Returns an array containing the reference arc length of each node in the line.

RangeGraphXaxis

RangeGraphXaxis(varName, arclengthRange=None, period=None)

Returns an array of the RangeGraph X values only. See the RangeGraph method below. The arclengthRange parameter can be omitted or set to None if values for the entire line are required. The period is only used when line payout is non-zero.

RangeGraph

RangeGraph(varName, period=None, objectExtra=None, arclengthRange=None, stormDurationHours=None)

The varName parameter is the name of the result variable required.

period is a Period object, if omitted or None then the default value depends on the model state, see Python interface: Results.

objectExtra is an ObjectExtra object that is only required for specific varNames, see C_RangeGraph4. If the parameter is not required it can be omitted or set to None.

arclengthRange is an ArclengthRange object that is used to specfiy a sub-section of the line. If the parameter is omitted then the range graph for the entire line is returned.

stormDurationHours is only used with frequency domain dynamics, and specifies the storm duration in hours used for the calculation of the MPM.

For static state, time domain dynamics or frequency domain dynamics for specified period, this method returns an object with the following attributes: X, Min, Max, Mean, StdDev, Upper, Lower. These are accessed like this:

rangegraph = line.RangeGraph("Effective Tension")

rangegraph_MaxValues = rangegraph.Max

For frequency domain dynamics of a specified period, the output is based on synthesised time histories.

For frequency domain dynamics, if the period specifies the whole simulation, this method returns an object with the following attributes: X, StaticValue, StdDev, Upper, Lower. If stormDurationHours is specified, then the returned object has an additional MPM attribute, calculated in the same manner as by the FrequencyDomainMPM method.

If a progressHandler has been set, it will be called during this operation.

RangeGraphCollated

RangeGraphCollated(varName, period=None, objectExtra=None, arclengthRange=None, restartModels=None)

Returns a range graph for the specified period, collated for the specified restart models.

The varName parameter is the name of the result variable required.

If period is omitted then all sample times are returned. For a specified period, a value of OrcinaDefaultReal() for FromTime or ToTime means the first sample of the first model or the last sample of the last model, respectively.

objectExtra is an ObjectExtra object that is only required for specific varNames, see C_RangeGraph4. If the parameter is not required it can be omitted or set to None.

arclengthRange is an ArclengthRange object that is used to specfiy a sub-section of the line. If the parameter is omitted then the range graph for the entire line is returned.

The restartModels argument is an iterable of integer indices specifying which models are to be included. You can use restartFileNames to obtain the file names of the models in the restart chain, and also the length of the restart chain. If restartModels is omitted, then all models in the restart chain are included.

If a progressHandler has been set, it will be called during this operation.

The return value is the same as for RangeGraph.

SaveShear7datFile, SaveShear7mdsFile, SaveShear7outFile, SaveShear7pltFile, SaveShear7anmFile, SaveShear7dmgFile, SaveShear7fatFile, SaveShear7strFile, SaveShear7curvFile, SaveShear7zetahystFile, SaveShear7sthFile, SaveShear7dthFile, SaveShear7out1File, SaveShear7out2File, SaveShear7allOutputFiles, SaveVIVAInputFiles, SaveVIVAOutputFiles, SaveVIVAModesFiles

SaveShear7datFile(filename)

SaveShear7mdsFile(filename, firstMode=-1, lastMode=-1, includeCoupledObjects=False)

SaveShear7outFile(filename)

SaveShear7pltFile(filename)

SaveShear7anmFile(filename)

SaveShear7dmgFile(filename)

SaveShear7fatFile(filename)

SaveShear7strFile(filename)

SaveShear7curvFile(filename)

SaveShear7zetahystFile(filename)

SaveShear7sthFile(filename)

SaveShear7dthFile(filename)

SaveShear7out1File(filename)

SaveShear7out2File(filename)

SaveShear7allOutputFiles(basename)

SaveVIVAInputFiles(dirname)

SaveVIVAOutputFiles(basename)

SaveVIVAModesFiles(dirname, firstMode=-1, lastMode=-1, includeCoupledObjects=False)

These methods call C_SaveExternalProgramFile to save SHEAR7 and VIVA input and output files. All of these methods require that the statics calculation has been performed.

With SaveShear7mdsFile and SaveVIVAModesFiles you must also specify the first and last transverse (or inline) modes to be exported. A value of -1 for the first mode is interpreted as the lowest numbered transverse (or inline) mode. A value of -1 for the last mode is interpreted as the highest numbered transverse (or inline) mode.

By transverse we mean that the modal analysis classifies the mode as either Transverse or Mostly Transverse. By inline we mean that the modal analysis classifies the mode as either Inline or Mostly Inline. Whether transverse or inline modes are exported is determined by the setting of the Response data item on the SHEAR7 data form. For SaveVIVAModesFiles, transverse modes are always exported because VIVA does not have the ability to perform inline VIV analysis.

Additionally, the includeCoupledObjects parameter determines whether or not coupled objects are included in the modal analysis.

These parameters are interpreted in exactly the same way as analogous parameters to the SHEAR7MdsFile batch script command.

SaveLineClashingReport

line.SaveLineClashingReport(filename, period=None)

Saves the line clashing report spreadsheet for the specified period to filename. If period is set to None or omitted then the whole simulation period is used. The file can be an Excel spreadsheet (.xlsx or .xls), a tab delimited file (.txt) or a comma separated file (.csv). The decision is taken based on the file extension that you specify. This method is implemented by calling C_SaveSpreadsheet.

SaveLineClashingReportMem

line.SaveLineClashingReportMem(spreadsheetFileType=SpreadsheetFileType.Xlsx, period=None)

Saves the line clashing report spreadsheet for the specified period, returning it as a bytearray object. If period is set to None or omitted then the whole simulation period is used. The spreadsheetFileType parameter can be either SpreadsheetFileType.Csv, SpreadsheetFileType.Tab or SpreadsheetFileType.Xlsx to specify the spreadsheet format. This method is implemented by calling C_SaveSpreadsheetMem.