/ Title: Static and dynamic pipelay analysis with J-Lay method in 2000 m water
/ PLDYN test input file: SI units [m,N,sec]

/ Copyright 2022 Ibrahim Konuk
/ model number =<100>=
/ filename = pldynJ1rs_combocircl.pi


set_param(echo_OFF);


flow_director(to_output="Pipelay new analysis with J-Lay method in 2000 m water");
flow_director(to_console="Pipelay new analysis with J-Lay method in 2000 m water");

/.......................................................................................
/ ......... first load required data from databases and execute new analysis ...........
/.......................................................................................


/ initial pipe profile determined:
/   given departure angle =<-72>=
/   given overband length =<60>=
/          sagband length =<2649.99>=
/        jlay tower angle =<-90>=
/   overband profile type =<circle>=
/         overband radius =<200>=
/      total model length =<3542.82>=
/             tensioner.x =<70>=
/             tensioner.y =<17.5>=
/             touchdown.x =<1666.44>=
/             touchdown.y =<-1999.63>=


file_operation(open,FILE_NAME=pldynJ1rs_newcircl);


/.......................................................................................
/ .............................. modify model 100 for dynamic ..........................
/.......................................................................................


flow_director(to_output="Preparing for dynamic analysis");
flow_director(to_console="Preparing for dynamic analysis");

/ clean load set for conventrated force: force cannot be kept constant during dynamic analysis

 ELEMENT_DATA(delete,DISCRETE_FORCE);


 MODEL_SETUP(
/-------------------------------------------
 MODEL_NAME ="TEST_MODEL",
 TITLE ="Dynamic Analysis J-Lay with tensioner",
/-------------------------------------------
                  MODEL_NUMBER = 100      ,
                 ANALYSIS_TYPE = 2        ,
                   CASE_NUMBER = 103      ,
              OPTIMIZATION_SET = 100      ,
                   CONTROL_SET = 100      );
/-------------------------------------------
/ Total value fields =<10>=
/ Total alpha fields =<2>=
/ Total key fields   =<1>=


 PIPELAY_MODEL(
/-------------------------------------------
 LABEL ="TEST",
/-------------------------------------------
                  MODEL_NUMBER = 100      ,
                   CASE_NUMBER = 103      ,
               ANALYSIS_METHOD = 3        ,
                 EQUIPMENT_SET = 100      ,
                     OCEAN_SET = 100      ,
                      LOAD_SET = 100      ,
                    FIXITY_SET = 000      );
/-------------------------------------------


/ define bottom fixity to replace tension ...............................................

PIPE_FIXITY_SETS(
/-------------------------------------------------------------
  [FIXITY_SET,FIRST_NODE, LAST_NODE,FIXITY_CLA,     LABEL  ],
/-------------------------------------------------------------
  (       100,       100,       100,       100,    "TD#Z"  ) );
/-------------------------------------------------------------

 FIXITY_CLASS(
/-----------------------------------------------------------------------------------
  [CLASS_NUMB,       DOF,FIXITY_TYP, AMPLITUDE,    PERIOD,     PHASE,     LABEL  ],
/-----------------------------------------------------------------------------------
  (       100,         1,         1,       0.0,       0.0,       0.0,  "SEABED"  ) );
/-----------------------------------------------------------------------------------


/ assemble and execute ..................................................................

set_param(echo_ON); 

MODEL_SETUP(ASSEMBLE,MODEL_NUMBER=100);

MODEL_SETUP(EXECUTE,MODEL_NUMBER=100);


 / save some of the results from database to an OUTPUT databse ..........................

 set_param(echo_OFF);

/ gives number of record produced by this run:
NODAL_OUTPUT(SELECT,CASE_NUMBER=103);

NODAL_OUTPUT(delete,FROM_SELECTED);

/ gives time series for node position for one node:
NODAL_OUTPUT(SELECT,CASE_NUMBER=103,NODE_NUMBER=500);
NODAL_OUTPUT([save,TIME_STEP,NODE_NUMBE,X_COORD,DX_COORD,Y_COORD,DY_COORD,FROM_SELECTED]);

NODAL_OUTPUT(delete,FROM_SELECTED);

/ gives select nodal output for one time step and displays important fields:
NODAL_OUTPUT(SELECT,CASE_NUMBER=103,TIME_STEP=30.0);
NODAL_OUTPUT([save,TIME_STEP,NODE_NUMBE,X_COORD,DX_COORD,Y_COORD,DY_COORD,FROM_SELECTED]);
NODAL_OUTPUT([SAVE,NODE_NUMBE,X_COORD,DX_COORD,Y_COORD,DY_COORD,Z_COORD,DZ_COORD,FROM_SELECTED]);

/ gives select force output for one time step and displays important fields:
FORCE_OUTPUT(SELECT,CASE_NUMBER=103,TIME_STEP=30.0);
FORCE_OUTPUT([save,TIME_STEP,NODE_NUMBE,AXIAL,X_FORCE,Y_FORCE,MY_MOMENT,MZ_MOMENT,ARC_LENGTH,FROM_SELECTED]);


/ roller forces at time step 
ROLLER_FORCES(SELECT,CASE_NUMBER=103,TIME_STEP=30.0);
ROLLER_FORCES([save,ROLLER_ORD,X_FORCE,Y_FORCE,Z_FORCE,CONTACT_EL,LOCATION ,FROM_SELECTED,LABEL]);

ROLLER_FORCES(delete,FROM_SELECTED);

/ roller force time series for one roller
ROLLER_FORCES(SELECT,CASE_NUMBER=103,ROLLER_ORDER=8);
ROLLER_FORCES([SAVE,ROLLER_ORD,TIME_STEP,X_FORCE,Y_FORCE,Z_FORCE,CONTACT_EL,LOCATION ,FROM_SELECTED]);

ROLLER_FORCES(delete,FROM_SELECTED);

/ roller force time series for one roller
ROLLER_FORCES(SELECT,CASE_NUMBER=103,ROLLER_ORDER=12);
ROLLER_FORCES([SAVE,ROLLER_ORD,TIME_STEP,X_FORCE,Y_FORCE,Z_FORCE,CONTACT_EL,LOCATION ,FROM_SELECTED]);

NODAL_OUTPUT(SELECT,TIME_STEP=25.0);
NODAL_OUTPUT([SAVE,NODE_NUMBE,X_COORD,DX_COORD,Y_COORD,DY_COORD,Z_COORD,DZ_COORD,FROM_SELECTED]);

NODAL_OUTPUT(SELECT,TIME_STEP=30.0);
NODAL_OUTPUT([SAVE,NODE_NUMBE,X_COORD,DX_COORD,Y_COORD,DY_COORD,Z_COORD,DZ_COORD,FROM_SELECTED]);

 flow_director(to_output=" *** test with model 100 completed ***");
 flow_director(to_console=" *** test with model 100 completed ***");


 file_operation(close);

/........................................................................................
/........................................................................................
/- end of file