Home > User Interface > Results Processing > General Post-Processing > Batch file creation
Batch file creation
The batch file creation feature allows you to easily generate a batch file from a large amount of data. This batch file can then be used to export the post-processing results in text files or in a SQLite database.
To access the batch file creation functionality, you must open the DSK file on which the batch file will be run and then click on the Tools/Batch file creation menu item.
The following dialog box will open:
To create a batch file that will export graphs, you have to create a record as follows:
-
Define a record name in the Name edit box
-
Enter the data information needed to create the batch file in the Data tab (see section How to define your data for more details)
-
Enter function information (optional) in the Functions tab (see section How to define your functions for more details)
Click on the Create batch file button to create the batch file.
A batch file will be created in the same directory as the DSK file whose name has the form:
AnalysisName_RecordName_Batch.txt
Once the batch file has been created, your record will be automatically saved and will appear in the list box below the Name edit box.
The records will be saved to the DSK file only if you validate all your modifications with the OK button and then save the DSK file.
You may also create/update your record without generating the batch file by using the Add/Update record button. The Remove record button will delete the selected record. The Reset display button will clean the list and the Name edit box to allow you to create a new record.
The Split analysis set batch check box can be used to split a batch file using analysis sets into its analysis components (one batch for each analysis).
Export in SQLite database
Results can be exported in a SQLite database whose name will be of the form:
export_sql\AnalysisName_RecordName_Batch.db
The SQLite file is saved in the export_sql
folder under the model folder.
There are several ways to export results in database:
-
Load the batch file in the Batch processing tool and choose in the toggle menu of the Job type, the Export to DB with completion or Export to DB with overwritting item. If the database does not exist, choosing either item has the same effect, otherwise, the first one completes the existing database while the second item overwrites the database.
-
Launch on command line, the
DeepLinesGUI.exe
executable with the option-batch_sql
following by the batch file:DeepLinesGUI.exe -batch_sql AnalysisName_RecordName_Batch.txt
How to define your data
To enter the data information you can either:
-
Set the appropriate number of variables through the Number of variables edit box and then enter the data cell by cell for each line.
-
Build your data set in an Excel file (with the same number of columns as the dialog box) and then copy/paste it in the gray zone labeled "Paste your Excel data here". The number of lines will be automatically updated, and each cell will be filled with the values from your Excel sheet.
Field details
There are 19 fields that can be filled, some are mandatory and some are optional.
All these fields are listed below.
Object : name of the object (riser, floater, nacelle) on which the post treatment will be done. This is a mandatory field.
Type : type of post treatment that will run. This is a mandatory field. It can be one of the following values:
-
TEV: dynamic time evolution
-
SEV: static step evolution
-
TSN: dynamic snapshot
-
SSN: static snapshot
-
ENV: dynamic envelop
-
TWA: dynamic time evolution wave
-
RMS: spectral curve snapshot
-
RSP: spectral curve response spectrum
Variable : post treatment variable name (like, for example: YAW, POSITIONX, VELOCITYABS). This is a mandatory field. See the Possible variables list section for more details.
Position : a valid name (COG, Fairlead, ...) or TDP for envelop post treatment. This is an optional field.
Abscissa : abscissa, can be a number, TDP, a set of semicolon separated numbers (for example 0.0;0.2;0.4) or a start value<upper value:increment value (for example 0.0<1.0:0.1 for a set from 0.0 to 1.0 with a 0.1 step). This is an optional field.
Coefficient : a numerical value, used to multiply output values, default value is 1.0. This is an optional field.
Name : name of the post treatment export data you will choose. This is an optional field.
Static step : static step, can be a number, a set of semicolon separated
numbers (for example 0.0;0.2;0.4
) or a start<end:increment values
(for example 0.0<1.0:0.1
for a serie from 0.0 to 1.0 with a 0.1 step). Instead of the < symbol, you can use the > symbol. This is
an optional field.
Time step : time step, can be a number, two semicolon separated numbers or a set of semicolon separated numbers for TSN type only. This is an optional field.
Last period : number of last periods, can only be a number. This is an optional field.
Section point : number of section points used for stress post treatments, can only be a number. This is an optional field.
Period : period for frequency domain analysis. Values can be All, index of frequency or no value. This is an optional field.
Stat/TDP only : Statistics and TDP only, can only be Stat, TDP or Stat;TDP. This is an optional field.
Overlapping percentage : can only be a number. This is an optional field. Default: 50 %.
Weight window type : can only be rectangle, bartlett, triangle, hanning, hamming or blackman. This is an optional field. Default: hanning.
Weight window size : can only be a number. This is an optional field. Default: 1024.
Analysis : Analysis name on which the post treatment will be executed.
Analysis set : Analysis set name on which the post treatment will be executed.
Analysis and Analysis set fields cannot be filled both at the same time, but one of them must be filled.
Table name : Specific database table name in which the post treatment data will be saved. This is an optional field.
More details about the batch keywords can be found in the Batch files format section.
How to define your functions
This tab allows the user to define functions and up to 6 input parameters. These functions will be automatically called on the batch execution and their output results stored in the database. Storage will be done in the same table as the input variables table. A column name for the output data can be specified ("Output column name"), else one will be automatically generated.
Hereafter is an example of an offset function that will be applied on the parameter named R5_Acurv:
This parameter refers to the data filled in the "Data" tab at the line where the "Name" column is "R5_Acurv".
By default, the available functions are implemented in the post_functions.py
file located in
your Deepines\Exec\PRIPythonScript\Scripts
folder.
A click on the "Create custom post treatment python file" will create a copy of the post_functions.py
file in a folder of your choice. The python file path will be updated accordingly.
The refresh button can be used to reload the python file and update the python functions list in the grid display.
If the python file path is modified, all dss files must be regenerated to make sure the dss will be using the correct python file.
Example of the "Offset" function:
import sys
def Offset(listAbscData, listVar1Data, listVar2Data, listVar3Data, listVar4Data, listVar5Data, listVar6Data, fCoeff):
# Build an array of non empty input data
arrInput = []
if(len(listVar1Data) > 0):
arrInput.append(listVar1Data)
if (len(listVar2Data) > 0):
arrInput.append(listVar2Data)
if (len(listVar3Data) > 0):
arrInput.append(listVar3Data)
if (len(listVar4Data) > 0):
arrInput.append(listVar4Data)
if (len(listVar5Data) > 0):
arrInput.append(listVar5Data)
if (len(listVar6Data) > 0):
arrInput.append(listVar6Data)
# Output array
listOutput = []
# Dummy offset value
offsetValue = 1000000
# Get the number of non empty input vectors
nbInputVectors = len(arrInput)
# Iterate on non empty input vectors
for i in range(nbInputVectors):
listOutput.append([])
# Iterate on data of input vectors
for x in arrInput[i]:
# Build output array from input data and offset value
listOutput[i].append(x + offsetValue)
# Return output array
return listOutput
Whatever the function code is, it should take this exact number of parameters. Results should be put in a list which is returned by the function.
Possible variables
POSITIONABS | POSITIONX | POSITIONY |
POSITIONZ | THETAABS | THETAX |
THETAY | THETAZ | ROLL |
PITCH | YAW | DISPABS |
DISPX | DISPY | DISPZ |
DISPRX | DISPRY | DISPRZ |
SURGE | SWAY | HEAVE |
VELOCITYABS | VELOCITYX | VELOCITYY |
VELOCITYZ | VELOCITYRX | VELOCITYRY |
VELOCITYRZ | ACCELERATIONABS | ACCELERATIONX |
ACCELERATIONY | ACCELERATIONZ | ACCELERATIONRX |
ACCELERATIONRY | ACCELERATIONRZ | CURVABS |
CURVGLOBX | CURVGLOBY | CURVGLOBZ |
CURVGLOBVEC | CURVLOC1 | CURVLOC2 |
CURVLOC3 | CURVLOCVEC | STRAINSHEARABS |
STRAINAXIAL | STRAINTORSION | STRAINGLOBX |
STRAINGLOBY | STRAINGLOBZ | STRAINGLOBVEC |
STRAINLOC1 | STRAINLOC2 | STRAINLOC3 |
STRAINLOCVEC | STRESSAXIAL | STRESSRADIAL |
STRESSHOOP | STRESSAXIALBENDEXTERNAL | STRESSAXIALBENDINTERNAL |
STRESSBENDEXTERNAL | STRESSBENDINTERNAL | STRESSVONMISESEXTERNAL |
STRESSVONMISESINTERNAL | FORCESHEARABS | TENSIONEFFECT |
TRUETENSION | FORCELOC1 | FORCELOC2 |
FORCELOC3 | FORCEGLOBX | FORCEGLOBY |
FORCEGLOBZ | MOMENTBEND | MOMENTTORSION |
MOMENTLOC1 | MOMENTLOC2 | MOMENTLOC3 |
MOMENTGLOBX | MOMENTGLOBY | MOMENTGLOBZ |
REACFORCEABS | REACFORCEX | REACFORCEY |
REACFORCEZ | REACMOMENTABS | REACMOMENTX |
REACMOMENTY | REACMOMENTZ | VERTANGLEABS |
VERTANGLEAROUNDX | VERTANGLEAROUNDY | VERTANGLEXAROUNDZ |
BUILTINABS | BUILTINAROUNDX | BUILTINAROUNDY |
BUILTINZPROJ | VIVVIBRATIONAMP | VIVACCELERATION |
VIVFATIGUE | VIVSTRESS | VIVCURVATURE |
VIVLOCKIN | VIVFREQMODAL | VIVFLUIDVELOCITY |
VIVRENUMBER | VIVSTNUMBER | VIVEFFSTRAKES |
VIVDRAG | VIVDEFMODE | VIVCURVMODE |
WAVEELEVATION | WAVEVELOCITYX | WAVEVELOCITYY |
WAVEVELOCITYZ | WAVEACCELERATIONX | WAVEACCELERATIONY |
WAVEACCELERATIONZ | AUXILIARYEFFECTIVETENS | AUXILIARYAXIALSTRESS |
AUXILIARYRADIALSTRESS | AUXILIARYCIRCUMSTRESS | AUXILIARYAXIALBENDINGSTRESS |
AUXILIARYBENDINGSTRESS | AUXILIARYVONMISESSTRESS | DAMAGE_SEASTATES |
DAMAGE_OVERALL | TENSIONEFFECTMAINTUBE | RELATIVEVELOCITYABS |
RELATIVEVELOCITYX | RELATIVEVELOCITYY | RELATIVEVELOCITYZ |
RELATIVEVELOCITYRX | RELATIVEVELOCITYRY | RELATIVEVELOCITYRZ |
ENERGY_INTERNALSTRAIN_ELEMENT | ENERGY_POTENTIAL_ELEMENT | ENERGY_KINETIC_ELEMENT |
ENERGY_MECHANICAL_ELEMENT | ENERGY_INTERNALSTRAIN_LINEAR | ENERGY_POTENTIAL_LINEAR |
ENERGY_KINETIC_LINEAR | ENERGY_MECHANICAL_LINEAR | ENERGY_INTERNALSTRAIN_TOTAL |
ENERGY_POTENTIAL_TOTAL | ENERGY_KINETIC_TOTAL | ENERGY_MECHANICAL_TOTAL |
LOCAL_BUILTINAROUNDX | LOCAL_BUILTINAROUNDY | PSEUDOCURVATUREABS |
GLOBAL_PSEUDOCURVATUREAROUNDX | GLOBAL_PSEUDOCURVATUREAROUNDY | LOCAL_PSEUDOCURVATUREAROUNDX |
LOCAL_PSEUDOCURVATUREAROUNDY | STRESSHOSE | TENSIONEFFECTHOSE |
DRAG_LOADS | EXCITATION_LOADS | RESTORINGFORCE |
LINEARDAMPING_LOADS | QUADRATICDAMPING_LOADS | INERTIA_LOADS |
NORMAL_FORCE | LATERAL_FORCE | INDUCED_MOMENT |
FRICTION_FORCE_LOCAL1 | FRICTION_FORCE_LOCAL2 | FRICTION_FORCE_LOCAL3 |
FRICTION_FORCE_GLOBAL_X | FRICTION_FORCE_GLOBAL_Y | FRICTION_FORCE_GLOBAL_Z |
INDUCED_MOMENT_LOCAL1 | INDUCED_MOMENT_LOCAL2 | INDUCED_MOMENT_LOCAL3 |
INDUCED_MOMENT_GLOBAL_X | INDUCED_MOMENT_GLOBAL_Y | INDUCED_MOMENT_GLOBAL_Z |
CONTACT_ENERGY | CONTACT_VERTICAL_REACTION | CONTACT_AXIAL_FRICTION_FORCE |
CONTACT_LATERAL_FRICTION_FORCE | CONTACT_TRENCH_RESISTANCE | CONTACT_FRICTION_MOMENT |
REACTION_FORCE_X | REACTION_FORCE_Y | REACTION_FORCE_Z |
REACTION_FORCE_LOCX | REACTION_FORCE_LOCY | REACTION_FORCE_LOCZ |
REACTION_FORCE_ABS | REACTION_MOMENT_X | REACTION_MOMENT_Y |
REACTION_MOMENT_Z | REACTION_MOMENT_LOCX | REACTION_MOMENT_LOCY |
REACTION_MOMENT_LOCZ | REACTION_MOMENT_ABS | STRESSVONMISESSINTERNALGAL |
STRESSVONMISESSEXTERNALGAL | STRAIN_ELONGATION | STRAIN_ELONGATION_SPEED |
STRAIN_ROTATION, | STRAIN_ROTATION_SPEED, | DNV_81_INTERNAL |
DNV_81_EXTERNAL | DNV_96_C203_HOOP_STRESS | DNV_96_C203_AXIAL_STRESS |
DNV_96_C203_VONMISES_STRESS | DNV_F201_ULS_LOW | DNV_F201_ULS_HIGH |
DNV_F201_ULS_NORMAL | DNV_F201_ALS_LOW | DNV_F201_ALS_HIGH |
DNV_F201_ALS_NORMAL | PRESSURE_INTERNAL | PRESSURE_EXTERNAL |
STRAIN_BENDING_EXTERNAL | STRAIN_BENDING_INTERNAL | STRAIN_AXIALBEND_EXTERNAL |
STRAIN_AXIALBEND_INTERNAL | DNV_F101_ULS_LOW | DNV_F101_ULS_HIGH |
DNV_F101_ULS_NORMAL | DNV_F101_ALS_LOW | DNV_F101_ALS_HIGH |
DNV_F101_ALS_NORMAL | ||
Specific type of requests for a rigibody associated with a mesh | ||
DIAGNOSTICS_DISPL | DIAGNOSTICS_IXX | DIAGNOSTICS_IYY |
DIAGNOSTICS_BG | DIAGNOSTICS_GML | DIAGNOSTICS_GMT |
DIAGNOSTICS_GZX | DIAGNOSTICS_GZY | DIAGNOSTICS_OWNMASS |
DIAGNOSTICS_BUOYANCY | DIAGNOSTICS_APPW | DISP_OFFSET |
DISP_AZIOFF | STRAINHOSE | POSITIONVER |
VELOCITYVER | ACCELERATIONVER | STRESS_FACTOR_HOSE |
TDP_ABSCISSA | TDP_LYING_LENGTH | REL_DISPX |
REL_DISPY | REL_DISPZ | ABS_REL_DISP |
REL_LOC_DISPX | REL_LOC_DISPY | REL_LOC_DISPZ |
REL_VELX | REL_VELY | REL_VELZ |
ABS_REL_VEL | REL_LOC_VELX | REL_LOC_VELY |
REL_LOC_VELZ | REL_ACCX | REL_ACCY |
REL_ACCZ | ABS_REL_ACC | REL_LOC_ACCX |
REL_LOC_ACCY | REL_LOC_ACCZ | DISPHOR |
DISPHORAZ | VELOCITYHOR | VELOCITYHORAZ |
ACCELERATIONHOR | ACCELERATIONHORAZ | REACFORCEHOR |
REACFORCEHORAZ | REACMOMENTHOR | REACMOMENTHORAZ |
SIDEWALL_PRESSURE | LOC_ACCX | LOC_ACCY |
LOC_ACCZ | LOC_ACCRX | LOC_ACCRY |
LOC_ACCRZ | LOC_VELX | LOC_VELY |
LOC_VELZ | LOC_VELRX | LOC_VELRY |
LOC_VELRZ | ACCELERATIONABS_WITH_GRAVITY | ACCELERATIONX_WITH_GRAVITY |
ACCELERATIONY_WITH_GRAVITY | ACCELERATIONZ_WITH_GRAVITY | LOC_ACCX_WITH_GRAVITY |
LOC_ACCY_WITH_GRAVITY | LOC_ACCZ_WITH_GRAVITY | ACCELERATIONHOR_WITH_GRAVITY |
ACCELERATIONHORAZ_WITH_GRAVITY | PRESSURE_SST | END_CAP |
TURB_LSPEED | TURB_HSPEED | TURB_PITCH |
TURB_GEN_TORQUE | TURB_ELEC_POWER | TURB_AZIMUTH |
TURB_OPDEFLOECT | TURB_IPDEFLECT | TURB_VELX |
TURB_VELY | TURB_VELZ | TURB_ROTATION |
TURB_ROT_VEL | TURB_THRUST | TURB_MOMENT |