/ Title: Pipelay new analysis with S-Lay method with fixed stinger
/ PLDYN test input file: SI units [m,N,sec]

/ Copyright 2021 Ibrahim Konuk
/ model number =<100>=
/ filename = pldynS1a_newcircl.pi

 set_param(echo_OFF);


flow_director(to_output="Pipelay new analysis with S-Lay method with fixed stinger (Loadcase#101)");
flow_director(to_console="Pipelay new analysis with S-Lay method with fixed stinger (Loadcase#101)");


/ first load required data from barge, ocean, control, and spar buoy databases ..........

file_operation(open,FILE_NAME=pldynS1_barge);
file_operation(open,FILE_NAME=pldynS1a_ocean);
file_operation(open,FILE_NAME=pldynS1_control);
file_operation(open,FILE_NAME=pldynS1_buoy);


/ uppdate case number ...................................................................

 MODEL_SETUP(
/-------------------------------------------
 MODEL_NAME ="TEST_MODEL",
 TITLE ="32 inch pipe 4 Sec Fixed Stinger",
/-------------------------------------------
                  MODEL_NUMBER = 100      ,
                 ANALYSIS_TYPE = 1        ,   / 1=S-Lay , 2=J-Lay
                   CASE_NUMBER = 101      ,
              OPTIMIZATION_SET = 100      ,
                     DIMENSION = 3        ,
                 ELEMENT_COUNT = 48       ,
            DEFAULT_PIPE_CLASS = 3212     ,
                   CONTROL_SET = 100      );
/-------------------------------------------
/ Total value fields =<10>=
/ Total alpha fields =<2>=
/ Total key fields   =<1>=


 PIPE_CLASS(
/-------------------------------------------
 LABEL ="32 OD x 1.125 WT",
/-------------------------------------------
                  CLASS_NUMBER = 3212     ,
              OUTSIDE_DIAMETER = 0.8128   ,
              SUBMERGED_WEIGHT = 400.00   ,
                    DRY_WEIGHT = 5886.00  ,
                       INERTIA = 861.85   ,
                          DRAG = 750.00   ,
                          MASS = 600.00   ,
                    ADDED_MASS = 400.00   ,
             FLEXURAL_RIGIDITY = 1.12E+09 ,
            CRITICAL_CURVATURE = 200.000  ,
            CURVATURE_EXPONENT = 2.500    );
/-------------------------------------------
/ Total value fields =<11>=
/ Total alpha fields =<1>=
/ Total key fields   =<1>=


 PIPELAY_MODEL(
/-------------------------------------------
 LABEL ="TEST",
/-------------------------------------------
                  MODEL_NUMBER = 100      ,
                   CASE_NUMBER = 101      ,
               ANALYSIS_METHOD = 1        ,
                 EQUIPMENT_SET = 100      ,
                     OCEAN_SET = 100      ,
                BATHYMETRY_SET = 100      ,
                      LOAD_SET = 100      ,
                    FIXITY_SET = 0        ,
            ELEMENTS_ON_SEABED = 8        ,
                BOTTOM_TENSION = 5.0e+05  );  
/-------------------------------------------
/ Total value fields =<14>=
/ Total alpha fields =<1>=
/ Total key fields   =<2>=


/ seabed bathymetry parameters ..........................................................

 BATHYMETRY_DATA(
/-------------------------------------------
 LABEL ="Test",
/-------------------------------------------
                BATHYMETRY_SET = 100      ,
                  SEABED_SLOPE = 5.0      ,
                 SLOPE_HEADING = 20.00    ,
               BATHYMETRY_FILE = "testing");
/-------------------------------------------


/ define bottom tension .................................................................

 DISCRETE_FORCE_CLASS(
/-------------------------------------------
 LABEL ="TEST",
/-------------------------------------------
                  CLASS_NUMBER = 100      ,
                       X_FORCE = 480000.0 ,
                       Y_FORCE = 0.000    ,
                       Z_FORCE = 0.000    ,
                        PERIOD = 0.000    ,
                         PHASE = 0.00     );
/-------------------------------------------
/ Total value fields =<7>= 517120.0
/ Total alpha fields =<1>=
/ Total key fields   =<1>=


 LOAD_SETS(
/-------------------------------------------------------------------------------------------------------------
  [  LOAD_SET,FIRST_ELEM,LAST_ELEME,PIPE_CLASS,UNIFORM_LO,DISCRETE_F,BUOY_CLASS,FORCE_LOCA,BUOY_LOCAT,LABEL  ],
/-------------------------------------------------------------------------------------------------------------
  (       100,       100,       100,         0,         0,       100,        0,      0.000,0.0,"Bottom Tension") );
/-------------------------------------------------------------------------------------------------------------
/ Number of rows     =<2>=
/ Total value fields =<10>=
/ Total key fields   =<3>=

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

set_param(echo_ON);

 / MODEL_SETUP(ASSEMBLE,VERBOSE,MODEL_NUMBER=100);
 MODEL_SETUP(ASSEMBLE,MODEL_NUMBER=100);
 / model 100 assembled

EXIT(CLOSEIFERROR);

 MODEL_SETUP(EXECUTE,MODEL_NUMBER=100);
 / first run

 DISCRETE_FORCE_CLASS([DISPLAY]);

 set_param(echo_OFF);

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

FORCE_OUTPUT(SELECT,TIME_STEP=0.11);
FORCE_OUTPUT([SAVE,NODE_NUMBE,AXIAL,X_FORCE,Y_FORCE,Z_FORCE,MX_MOMENT,MY_MOMENT,MZ_MOMENT,ARC_LENGTH,FROM_SELECTED]);

STINGER_POSITION(SELECT,TIME_STEP=0.11);
STINGER_POSITION([SAVE,STINGER_OR,YAW_ANGLE,ROLL_ANGLE,TRIM_ANGLE,HINGE_X,HINGE_Y,HINGE_Z,FROM_SELECTED]);

STINGER_FORCES(SELECT,TIME_STEP=0.11);
STINGER_FORCES([SAVE,STINGER_ORD,X_FORCE,Y_FORCE,Z_FORCE,MX_MOMENT,MY_MOMENT, MZ_MOMENT,FROM_SELECTED]);

ROLLER_FORCES(SELECT,TIME_STEP=0.11);
ROLLER_FORCES([SAVE,ROLLER_ORD,  X_FORCE,Y_FORCE,Z_FORCE,CONTACT_EL,LOCATION ,FROM_SELECTED]);


flow_director(to_console="a new static analysis is completed. results are in OUTPUT");

/........................................................................................

 set_param(echo_OFF);
 file_operation(close);

/- end of file

