$
$*********************************************      basics
$
&title Test of String Functions w/Connectors
&dimen -dimen feet kips
&device -oecho no
$
$*********************************************      read model
$
inmodel
&env -depth 500
&instate fwd_brg -condition 9 \
         aft_brg -locate    400+100 0 -9
$
$*********************************************      define  connectors
$
medit
   ~b_cat  b_cat    3          -len 2900 -depanc 500 -bot 1 -clump  2
   ~b_cat  b_cat    3.25       -len  150 -depanc 500 -bot 1
   ~h_cat  h_cat    1 exact    -len 230
   ~tense  sl_elem  1 tension  -len 230
   ~rodel  rod      3 1.5      -len 3000 -depanc 500 -bot 1 -refine 20
   ~sling  sling    4          -len 400
   ~boomm  sling    4          -len 200
$
   ~tugbt  tug_boat 400 -damp 10 -t_dyn 10 45
   ~gspri  gspr x 1e5 z 1e5
   ~sprin  spr x 1e10  y  1e10 z 1e10  ry 100  rx  1e4 rz 100
   ~fixxx  fix X Y Z Rx Ry Rz
   ~gappp  gap
   ~linkk  link
   ~prop prop prop 300  1 10 10 -r_angle_limits -60 60
$
   connector thrus ~prop   *f_apd
   connector ps_bc ~b_cat  *f_apd -anc  -45   20
   connector pb_bc ~b_cat  *f_bpd -anc -135   20
   connector sb_bc ~b_cat  *f_bsd -anc  135   20
   connector ss_ro ~rodel  *f_asd -anc   45   20
   connector hs_hc ~h_cat  *f_acd *a_fcd
   connector pile1 ~pile1  *j1104 *p1104
   connector tense ~tense  *f_acd *a_fcd
   connector sl_ap ~sling *f_apd
   connector sl_bp ~sling *f_bpd
   connector sl_bs ~sling *f_bsd
   connector sl_as ~sling *f_asd
   &describe part ground
   *boom 200 0 400
   connector boomm ~boomm  *boom
   assembly t-h_definition   boomm sl_ap sl_bp sl_bs sl_as -init
$
   connector tugbt ~tugbt *f_apd -anc  -45   20
   connector gspri ~gspri *f_apd
   connector sprin ~sprin *f_apd
   connector fixxx ~fixxx *f_apd
   connector gappp ~gappp *f_apd *a_bpd
   connector linkk ~linkk *f_apd *a_bpd
end
$
$*********************************************      tension connectors
$
&connector p@     -a_tension 100
&connector s@     -a_tension 400
&connector hs_hc  -l_ten 0.2
&connector tense  -l_ten 0.2
&connector thrus  -set_prop 1 30 -40
&instate fwd_brg -condition 10
$
$*********************************************      most status
$
&type
&cutype Checking Most Connector Status
&type
s_loop  CONNECTO F_CONNEC G_CONNEC \
        CL_FLEX  F_LWAY   G_LWAY  \
        SPREAD   PIPE     TIP-HOOK LINES    PILE
$
$*********************************************      dg_connector status
$
&type
&cutype Checking &status dg_connector
&type
&set s = dg_connector
&loop c &names(conn)
   &set w =  &status %s %c -hard
   &type     %w
   %w
&endloop
$
$*********************************************      Rod status
$
&type
&cutype Checking Rod Statuses
&loop s dg_connector S_ROD   F_ROD
   &loop c ( ss_ro )
      &set w =  &status %s %c -hard -plot
      &type     %w
      %w
          plot 1 2 3 4  -rax 5 6 7 -no
          end
   &endloop
&endloop
$
$*********************************************      class string functions
$
&type
&type Excluding Roller Tensioner Davit Lmu Foundation Lleg Vgap
&type
&type Class String Function
&type =====================
&type
&loop action  ( 'CLUMP   ','SOIL    ','PYMULT  ','TZMULT  ','QWMULT  '  \
                'SEND    ','SLOPE   ','DEPANC  ','IG_STIF ','X_PY    '  \
                'Y_PY    ','Z_PY    ','X_DAMPIN','Y_DAMPIN','Z_DAMPIN'  \
                'PR_M_THR','PR_EFFIC','PR_T_ALI','PR_R_ALI','RR_ALPAH'  \
                'PR_GAMMA','PR_R_DIS'                                   \
                'ELEMENTS','N_SEGMEN','TYPE    ','DIMENSIO','FRICTION'  \
                'DENSITY ','EMODULUS','SPGRAVI ','ALPHA   ','FYIELD  '  \
                'POI_RATI','TENSTREN','B_TENSI ','WTPLEN  ','DISPLEN '  \
                'BUOYDIA ','DRAGDIA ','WINDDIA ','AMASDIA ','SECTION '  \
                'PERLENG ','LENGTH  ','REFINE  ','RDES    ',            \
                'POINTS  ','REFEREN ','T_STIFFN','L_STIFFN','CFB     '  \
                'F_TYPE  ','R_SPACE ','P_FY    ','M_P     ','ETA     '  \
                'P_N     ','SCF     ','SN      ','PLATE_DI','NAME_DIM'  \
                'NAME_SEG'                                              \
                'CONEPY  ','DAMPING '                                   \
             )
   &loop c ( ~b_cat ~h_cat ~tense ~rodel ~pile1 ~sling ~tugbt ~gspri \
             ~sprin ~fixxx ~gappp ~linkk ~prop )
      &set first   = class &format(a8 %c) &format(a8 %action)
      &set num_seg = &class(n_segmen %c)
      &type %first &class(%action %c 1)
      &if %num_seg .gt. 1 &then
         &if  %action .eq. DIMENSIO .or. %action .eq. CLUMP &then
            &if %num_seg .eq. 2 &then
               &type %first &class(%action %c 2)   <<== 2nd Seg
            &endif
            &if %num_seg .eq. 3 &then
               &type %first &class(%action %c 2)   <<== 2nd Seg
               &type %first &class(%action %c 3)   <<== 3rd Seg
            &endif
         &endif
      &endif
   &endloop
&endloop
$
$*********************************************      element string functions
$
&type
&type Element String Function
&type =======================
&type
&loop action  (           'RATIO   ' 'stress' 'CDR     ' 'LENGTH  ' \
               'NODES   ' 'CLASS   ' 'L_OD_T  ' 'CFB     ' 'BLENGTH ' \
               'KFACT   ' 'LAMBDA  ' 'SN      ' 'RELEASES' 'HAS_P-D ' \
               'FLOODED ' 'CM      ' 'STRW_USE' 'E_COORDI' 'OFFSETS ' \
               'SEG_LENG' 'WEIGHT  ' 'BUOYANCY')
   &loop ele ( ps_bc pb_bc sb_bc ss_ro hs_hc tense pile1 \
               boomm sl_ap sl_bp sl_bs sl_as tugbt \
               gspri sprin fixxx gappp linkk )
      &set first =  ele &format(a8 %ele) &format(a8 %action)
      &set sec   = &element(%action %ele)
      &type %first %sec
   &endloop
&endloop
$
$*********************************************      connector string functions
$
&type
&type Connector String Function
&type =======================
&type
&loop action  ( '-anchor' '-tension' '-horizon' '-length' '-heading'  \
                'g_head' '-force' -ratio -t_mult -t_angle -r_angle    \
                hp_anchor vp_anchor l_on_bottom )
   &loop ele ( ps_bc pb_bc sb_bc ss_ro hs_hc tense pile1 \
               boomm sl_ap sl_bp sl_bs sl_as tugbt       \
               gspri sprin fixxx gappp linkk )
      &set first =  conn &format(a8 %ele) &format(a8 %action)
      &set sec   = &connector(%ele %action)
      &type %first %sec
   &endloop
&endloop
$
$*********************************************      all done
$
&fini
