// PLDYNA sample commands
// Copyright 2021 ibrahim konuk


MODEL_SETUP(display);
MODEL_SETUP([display]);

MODEL_SETUP(MODEL_NUMBER=100,CASE_NUMBER=101,MODEL_ASSEMBLE,show_steps);
MODEL_SETUP(MODEL_NUMBER=100,CASE_NUMBER=101,MODEL_ASSEMBLE);
MODEL_SETUP(MODEL_NUMBER=100,MODEL_ASSEMBLE);

MODEL_SETUP(MODEL_NUMBER=100,MODEL_ASSEMBLE,EXECUTE_STATIC,RESTART_STATIC,SHOW_STEPS);
MODEL_SETUP(MODEL_NUMBER=100,MODEL_ASSEMBLE,EXECUTE_STATIC,RESTART_STATIC);
MODEL_SETUP(MODEL_NUMBER=100,MODEL_ASSEMBLE,RESTART_STATIC,EXECUTE_DYNAMIC);

PIPELAY_MODEL(display);
PIPELAY_MODEL([display]);

PIPE_CLASS(display,fields=(2,3,4,5));
PIPE_CLASS(display,fields=(3,1,13));
PIPE_CLASS(display,fields=(13,1,3));

PIPE_CLASS(display);
PIPE_CLASS([display]);
PIPE_CLASS(select="test",from_col=label);
PIPE_CLASS(select=test,from_col=label);
PIPE_CLASS(select=0.8,from_col=INERTIA);
PIPE_Class([SHOW_SELECT]);
PIPE_Class(SHOW_SELECT);
PIPE_Class(subselect=2.3,from_col=SUBMERG);
PIPE_Class(delete=2.3,in_column=SUBMERG);
PIPE_CLASS(delete);
PIPE_Class([empty_SELECT]);COLUMNCHAR

PIPE_PROPERTIES([DISPLAY]);
PIPE_PROPERTIES(select=52.,from_col=GRADE);
PIPE_PROPERTIES(subselect=30.,from_col=DIAMETER);
PIPE_PROPERTIES(select=default,from_col=label);

NODE_DATA([DISPLAY]);
NODE_DATA(DISPLAY);

FIXITY_CLASS([DISPLAY]);
FIXITY_CLASS(DISPLAY);

ELEMENT_DATA([DISPLAY,FROM_SELECTED]);
ELEMENT_DATA([FROM_SELECTED]);
ELEMENT_DATA([empty_SELECT]);
ELEMENT_DATA([DISPLAY]);
ELEMENT_DATA(delete);
ELEMENT_DATA(delete,MODEL_NUMBER);
ELEMENT_DATA(select,ELEMENT_NUMBER);
ELEMENT_DATA(Display,PIPE_Class,Uniform_Load,Discrete_Force,Buoy_Class,Force_Location,Buoy_Location);
ELEMENT_DATA(Delete,PIPE_Class,Uniform_Load,Discrete_Force,Buoy_Class,Force_Location,Buoy_Location);


ELEMENT_DATA(display,fields=(2,3,4,5));
ELEMENT_DATA(display,fields=(5,3,4,2));

UNIFORM_LOAD_CLASS([DISPLAY]);
UNIFORM_LOAD_CLASS(DISPLAY);

DISCRETE_FORCE_CLASS([DISPLAY]);
DISCRETE_FORCE_CLASS(DISPLAY);

EQUIPMENT_SET(Display);
EQUIPMENT_SET([Display]);

EQUIPMENT_SET(Display);

BUOY_CLASS([DISPLAY]); 
BUOY_CLASS(DISPLAY); 

BUOY_SET([Display]);
BUOY_SET(Display);

LAYBARGE_DATA([DISPLAY]); 
LAYBARGE_DATA(DISPLAY); 

JLAYBARGE_DATA([DISPLAY]); 
JLAYBARGE_DATA(DISPLAY); 

BARGE_MOTION([DISPLAY]); 
BARGE_MOTION(DISPLAY);

STINGER_SETS([DISPLAY]);
STINGER_SETS(DISPLAY);
STINGER_SETS([save]);
STINGER_SETS([save,set_number,stinger_number,joint_type]);

STINGER_DATA([DISPLAY]);
STINGER_DATA(DISPLAY);

STINGER_SPRING_CLASS([DISPLAY]);
STINGER_SPRING_CLASS(DISPLAY);

STINGER_BUOYANCY_CLASS([DISPLAY]);
STINGER_BUOYANCY_CLASS(DISPLAY);

STINGER_TENSOR_CLASS([DISPLAY]);
STINGER_TENSOR_CLASS(DISPLAY);

STINGER_MEMBER_SET([DISPLAY]);
STINGER_MEMBER_SET(DISPLAY);

ROLLER_SETS([DISPLAY]);
ROLLER_SETS([DISPLAY,FROM_SELECT]);
ROLLER_SETS(DISPLAY);
ROLLER_SETS(select=2,from_col=ROLLER_NUM);

ROLLER_CLASS([DISPLAY]);
ROLLER_CLASS(DISPLAY);

TENSIONER([DISPLAY]);
TENSIONER(DISPLAY);

OCEAN_DATA([DISPLAY]);
OCEAN_DATA(DISPLAY);

CURRENT_DATA([DISPLAY]);
CURRENT_DATA(DISPLAY);

WAVE_DATA([DISPLAY]);
WAVE_DATA(DISPLAY);

SEABED_DATA([DISPLAY]);
SEABED_DATA(DISPLAY);

CONTROL_SET(DISPLAY);
CONTROL_SET([DISPLAY]);

CONTROL_SET(CONTROL_SET = 100, ACCURACY_EXPONENT = 6);

OPTIMIZATION_DATA(DISPLAY);
OPTIMIZATION_DATA([DISPLAY]);

LOAD_SETS(DISPLAY);
LOAD_SETS([DISPLAY]);

PIPE_FIXITY_SETS(DISPLAY);
PIPE_FIXITY_SETS([DISPLAY]);

NODAL_OUTPUT([DISPLAY]);
NODAL_OUTPUT([DISPLAY,FROM_SELECTED]);
NODAL_OUTPUT([DISPLAY,MODEL_NUMB,TIME_STEP,NODE_NUMBE, DZ_COORD,ARC_LENGTH,LABEL]);
NODAL_OUTPUT([DISPLAY,TIME_STEP,NODE_NUMBE, DZ_COORD,ARC_LENGTH,LABEL]);
NODAL_OUTPUT([SAVE,TIME_STEP,NODE_NUMBE, DZ_COORD,ARC_LENGTH,LABEL]);
NODAL_OUTPUT([delete,FROM_SELECTED]);
NODAL_OUTPUT(SELECT,CASE_NUMBER=101);NODAL_OUTPUT([DISPLAY,FROM_SELECTED]);
NODAL_OUTPUT(SELECT,CASE_NUMBER=102);NODAL_OUTPUT([DISPLAY,FROM_SELECTED]);
NODAL_OUTPUT(SELECT,CASE_NUMBER=103);NODAL_OUTPUT([DISPLAY,FROM_SELECTED]);
NODAL_OUTPUT(SELECT,CASE_NUMBER=103,TIME_STEP=21.2);
NODAL_OUTPUT([DISPLAY,NODE_NUMBE,X_COORD,DX_COORD,Y_COORD,DY_COORD,Z_COORD,DZ_COORD]);
NODAL_OUTPUT([SAVE,NODE_NUMBE,X_COORD,DX_COORD,Y_COORD,DY_COORD,Z_COORD,DZ_COORD]);
NODAL_OUTPUT(SELECT,CASE_NUMBER=103,NODE_NUMBER=500);
NODAL_OUTPUT(SELECT,CASE_NUMBER=103,NODE_NUMBER=330);NODAL_OUTPUT([DISPLAY,FROM_SELECTED]);

NODAL_VELOCITY(SELECT,CASE_NUMBER=103,NODE_NUMBER=330);NODAL_VELOCITY([DISPLAY,FROM_SELECTED]);
NODAL_VELOCITY([DISPLAY,FROM_SELECTED]);

FORCE_OUTPUT(DISPLAY);
FORCE_OUTPUT([DISPLAY]);
FORCE_OUTPUT([DISPLAY,FROM_SELECTED]);
FORCE_OUTPUT([delete,FROM_SELECTED]);
FORCE_OUTPUT(SELECT,CASE_NUMBER=0);FORCE_OUTPUT([DISPLAY,FROM_SELECTED]);
FORCE_OUTPUT(SELECT,CASE_NUMBER=101);FORCE_OUTPUT([DISPLAY,FROM_SELECTED]);
FORCE_OUTPUT(SELECT,CASE_NUMBER=102);
FORCE_OUTPUT(SELECT,CASE_NUMBER=103);
FORCE_OUTPUT(SELECT,CASE_NUMBER=103,NODE_NUMBE=580);
FORCE_OUTPUT(SELECT,CASE_NUMBER=103,TIME_STEP=21.2);
FORCE_OUTPUT([DISPLAY,NODE_NUMBE,AXIAL,X_FORCE,Y_FORCE,Z_FORCE,MX_MOMENT,MY_MOMENT,MZ_MOMENT,ARC_LENGTH]);
FORCE_OUTPUT([DISPLAY,NODE_NUMBE,AXIAL,FROM_SELECTED]);
FORCE_OUTPUT([DISPLAY,TIME_STEP,AXIAL,FROM_SELECTED]);
FORCE_OUTPUT([SAVE,NODE_NUMBE,AXIAL,X_FORCE,Y_FORCE,Z_FORCE,MX_MOMENT,MY_MOMENT,MZ_MOMENT,ARC_LENGTH]);
FORCE_OUTPUT([DISPLAY,NODE_NUMBE,AXIAL,MX_MOMENT,MY_MOMENT,MZ_MOMENT,ARC_LENGTH,FROM_SELECTED]);
FORCE_OUTPUT(SELECT,CASE_NUMBER=103,TIME_STEP=21.2);FORCE_OUTPUT([DISPLAY,NODE_NUMBE,AXIAL,MX_MOMENT,MY_MOMENT,MZ_MOMENT,ARC_LENGTH,FROM_SELECTED]);

STINGER_POSITION([DISPLAY]);
STINGER_POSITION([DISPLAY,FROM_SELECTED]);
STINGER_POSITION([delete,FROM_SELECTED]);
STINGER_POSITION(SELECT,CASE_NUMBER=101);STINGER_POSITION([DISPLAY,FROM_SELECTED]);
STINGER_POSITION(SELECT,CASE_NUMBER=102);STINGER_POSITION([DISPLAY,FROM_SELECTED]);
STINGER_POSITION(SELECT,CASE_NUMBER=103);
STINGER_POSITION(SELECT,CASE_NUMBER=103,STINGER_ORDER=4);

STINGER_POSITION([DISPLAY,STINGER_OR,YAW_ANGLE,ROLL_ANGLE,TRIM_ANGLE,HINGE_X,HINGE_Y,HINGE_Z]);
STINGER_POSITION([SAVE,STINGER_OR,YAW_ANGLE,ROLL_ANGLE,TRIM_ANGLE,HINGE_X,HINGE_Y,HINGE_Z]);

STINGER_FORCES([DISPLAY]);
STINGER_FORCES([DISPLAY,FROM_SELECTED]);
STINGER_FORCES(SELECT,CASE_NUMBER=101);STINGER_FORCES([DISPLAY]);
STINGER_FORCES(SELECT,CASE_NUMBER=102);STINGER_FORCES([DISPLAY]);
STINGER_FORCES([DISPLAY,STINGER_ORD,X_FORCE,Y_FORCE,Z_FORCE,MX_MOMENT,MY_MOMENT, MZ_MOMENT]);
STINGER_FORCES([SAVE,STINGER_ORD,X_FORCE,Y_FORCE,Z_FORCE,MX_MOMENT,MY_MOMENT, MZ_MOMENT]);

STINGER_VELOCITIES([DISPLAY]);
STINGER_VELOCITIES([DISPLAY,FROM_SELECTED]);
STINGER_VELOCITIES(SELECT,CASE_NUMBER=103);
STINGER_VELOCITIES([DISPLAY,STINGER_ORD, YAW_ANGLE,ROLL_ANGLE,TRIM_ANGLE,HINGE_X,HINGE_Y,HINGE_Z,FROM_SELECTED]);
STINGER_VELOCITIES([SAVE,STINGER_ORD, YAW_ANGLE,ROLL_ANGLE,TRIM_ANGLE,HINGE_X,HINGE_Y,HINGE_Z]);


ROLLER_FORCES([DISPLAY]);
ROLLER_FORCES([DISPLAY,ROLLER_ORDER,ROLLER_SET,X_FORCE,Y_FORCE,Z_FORCE,FROM_SELECTED]);
ROLLER_FORCES([DISPLAY,FROM_SELECTED]);
ROLLER_FORCES([DELETE,FROM_SELECTED]);
ROLLER_FORCES(SELECT,TIME_STEP=20.0);
ROLLER_FORCES(SELECT,CASE_NUMBER=101);ROLLER_FORCES([DISPLAY,FROM_SELECTED]);
ROLLER_FORCES(SELECT,CASE_NUMBER=102);ROLLER_FORCES([DISPLAY,FROM_SELECTED]);
ROLLER_FORCES(SELECT,CASE_NUMBER=103);ROLLER_FORCES([DISPLAY,FROM_SELECTED]);
ROLLER_FORCES(SELECT,CASE_NUMBER=103,TIME_STEP=2.1);
ROLLER_FORCES([DISPLAY,ROLLER_ORD,  X_FORCE,Y_FORCE,Z_FORCE,CONTACT_EL,LOCATION ,FROM_SELECTED]);
ROLLER_FORCES([SAVE,ROLLER_ORD,  X_FORCE,Y_FORCE,Z_FORCE,CONTACT_EL,LOCATION ,FROM_SELECTED]);
ROLLER_FORCES(SELECT,CASE_NUMBER=103,ROLLER_ORDER=5);ROLLER_FORCES([DISPLAY,FROM_SELECTED]);

BUOY_POSITION([DISPLAY]);
BUOY_POSITION([delete,FROM_SELECTED]);
BUOY_POSITION([DISPLAY,FROM_SELECTED]);
BUOY_POSITION(SELECT,CASE_NUMBER=101);
BUOY_POSITION(SELECT,CASE_NUMBER=102);BUOY_POSITION([DISPLAY,FROM_SELECTED]);
BUOY_POSITION(SELECT,CASE_NUMBER=103);BUOY_POSITION([DISPLAY,FROM_SELECTED]);
BUOY_POSITION(SELECT,CASE_NUMBER=104);
BUOY_POSITION(SELECT,CASE_NUMBER=104,TIME_STEP=20.0);
BUOY_POSITION(SELECT,CASE_NUMBER=104,TIME_STEP=20.0);
BUOY_POSITION(SELECT,CASE_NUMBER=104,BUOY_NUMBER=32);BUOY_POSITION([DISPLAY,FROM_SELECTED]);
BUOY_POSITION(SELECT,CASE_NUMBER=104,BUOY_NUMBER=36);BUOY_POSITION([DISPLAY,FROM_SELECTED]);


OUTPUT_TENSIONER(SELECT,CASE_NUMBER=101);
OUTPUT_TENSIONER(SELECT,CASE_NUMBER=102);
OUTPUT_TENSIONER(SELECT,CASE_NUMBER=103);OUTPUT_TENSIONER([DISPLAY,TIME_STEP,stroke,FROM_SELECTED]);
OUTPUT_TENSIONER(SELECT,CASE_NUMBER=104);
OUTPUT_TENSIONER(SELECT,TIME_STEP=30.0);
OUTPUT_TENSIONER([DISPLAY,stroke,FROM_SELECTED]);
OUTPUT_TENSIONER(DISPLAY);
OUTPUT_TENSIONER([DISPLAY]);

RUN_SUMMARIES([DISPLAY]);

EXIT(IFERRORENCOUNTERED);
MODEL_SETUP(RESET);

set_param(NOT_OVER_WRITE);
set_param(OVER_WRITE);

set_param(verbosity=-2);
set_param(verbosity=0);
set_param(verbosity=2);

set_param(echo_flag=OFF);
set_param(echo_flag=ON);
set_param(LINE_WIDTH=80);
set_param(LINE_WIDTH=80,EPSILON=0.00001);
set_param(LINE_WIDTH=80,verbosity=1);
set_param(EPSILON=1.0e-4);
set_param(EPSILON=0.001);
set_param(EPSILON=0.00001);

flow_director(to_console=" testing 12345 ...");
flow_director(to_output=" testing 12345 ...");

file_operation(open,FILE_NAME=filetest);
file_operation(open,FILE_NAME=filetest,file_path="C:\AArea\ik19a\PLDYN\CPPFort\PLDYNA\Release\");

// end of file


