$@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
$@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
$@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
$
$     ----------              COMMAND FILE               ---------
$     ----------                                         ---------
$     ----------          FOR USE IN J-LAYING            ---------
$     ----------                                         ---------
$     ----------                 ANALYSIS                ---------
$
$@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
$@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
$@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
$
$  This file (and companion file .dat) are used as a sample
$  for analysing the J_Laying operation from a vessel.
$
$  This file contains all commands needed for the analysis
$
$  After the model is described, the hydrodynamic pressures are claculated
$  and a time domain analysis is performed. Last the results concerning
$  motions, forces in tensioner and rollers are reported.
$
$  In order to simplify the lecture of the file, a number of
$  variables are defined at the top of it and are explained hereafter.
$
$  ramp    : If a ramp is needed after the tensioner, the value is .true.
$  trumpet : If a trumpet is described at the end of the ramp, the value is .true.
$            By 'trumpet' we mean a row of rollers for which we describe a distance
$            envelope between the roller itself and the pipe (see Manual for more
$            information).
$  des_ten : Desired initial tension at the tensioner
$  i_range : Range of allowable tensions
$  angle   : Angle of the ramp in body system, used to define the roller's positions
$  open1 & 2 : Give the lateral gap between the rollers and pipe for the 2 rollers
$              defined in the trumpet
$  mom      : If 'YES' then moment will be applied at the tensioner, if 'NO' then
$             only forces will be applied
$  r_mst    : Stiffness of the rollers
$  botfric  : the lateral friction applied between the pipe and the bottom
$  len      : Length of mooring lines
$
$  ALL OTHER VARIABLES ARE SELF-EXPLAINED
$
$
$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$
$
$ PARAMS AND VARIABLES
$
$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$
$
&set device     = device
$
$ +++++++++++++++++++   Ramp Configuration
$
&set ramp       = .true.
&set trumpet    = .false.
&set des_ten    = 219                $ KN
&set i_range    = &number(real %des_ten%*0.95) &number(real %des_ten%*1.05) %des_ten
&set angle      = 49.19
&set open1      = 101                $ MM
&set open2      = 406                $ MM
&set mom        = NO
&set r_mst      = 9109               $ 560 KIPS/INCH   ALWAYS !!
&set botfric    = 1
$
$ +++++++++++++++++++++++++++++++   Environnement
$
&set cvel       = 0
&set wdepth     = 200                $ M
&set Hs         = 1.75               $ M
&set t          = 6.20               $ Secondes
&set time       = 100                $ Secondes
&set tbeg       = 0
&set inc        = 0.125
$
$ +++++++++++++++++++++++++++++++   Barge and pipe
$
&set draft      = 8.30
&set len        = 2000
&set hor        = 3000
&set dia        = 406.4
&set thic       = 17.47
&set buoyd      = 412.4
&set wtpl       = 1.6791
$
$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$
$
$ basicsNING OF ANALYSIS
$
$
$
&device -g_default %device%  -oecho no
$
$*********************************************      SET
$
&dimen -DIMEN METERS K-NTS
&title PIPELAYING ANALYSIS SAMPLE
$
$*********************************************      PARAMS
$
&default -depth %wdepth%+1
$
$*********************************************      read model
$
inmodel
$
&pb_parm -hbre yes
$
$*********************************************      ENVIRONMENT
$
&data curves  c_profile current   0             0      \
                   &number(real %wdepth%-1.1)   0      \
                   &number(real %wdepth%-1.0)   %cvel% \
                   &number(real %wdepth%-0.5)   %cvel% \
                   &number(real %wdepth%-0.4)   0      \
                   %wdepth%                     0
&data environment
 environment env -sea ISSC 90. %hs% %t% -time %time% %inc% %tbeg%
end_&data
$
$*********************************************      EQUILIBRIUM
$
&insta -loc 0 0  -%draft% 0 0 0
&equi
&status
&status draft
$
$*********************************************      FREQUENCY DOMAIN
$
 hydro
  g_pressure vessel
 end
&describe body vessel -md_name none
$
$*********************************************      VARIABLES FOR CONNECTING
$
&set prop       = -depanc %wdepth% -wtplen %wtpl% -buoydia %buoyd%  \
                  -dragdia %buoyd% -amasdia %buoyd% -fy 448  -emod 207000 \
                  -botfric %botfric%
$
$*********************************************      CONNECTING
$
medit
   ~wire b_cat 150 -len %len% -depanc %wdepth%
   connector moorpby   ~wire *bowport -anc 180+90 &number(real %len%*0.5)
   connector moorpbx   ~wire *bowport -anc 180    &number(real %len%*0.5)
   connector moorpbxy  ~wire *bowport -anc 180+45 &number(real %len%*0.5)
   connector moorsbx   ~wire *bowstbd -anc 180    &number(real %len%*0.5)
   connector moorsby   ~wire *bowstbd -anc  90    &number(real %len%*0.5)
   connector moorsbxy  ~wire *bowstbd -anc  90+45 &number(real %len%*0.5)
   connector moorssy   ~wire *stestbd -anc  90    &number(real %len%*0.5)
   connector moorssx   ~wire *stestbd -anc      0 &number(real %len%*0.5)
   connector moorssxy  ~wire *stestbd -anc  45    &number(real %len%*0.5)
   connector moorpsx   ~wire *steport -anc      0 &number(real %len%*0.5)
   connector moorpsy   ~wire *steport -anc    -90 &number(real %len%*0.5)
   connector moorpsxy  ~wire *steport -anc -45    &number(real %len%*0.5)
   &connect @ -a_horiz 3000
end_medit
&equi -maxit 200 -tol 0.00001 0.00001
&status draft
&status -hard
 &env env
 &status env
 &status env -hard
 &status force
 repo
  select @
  do_repo
 end
 &equi -tol 0.00001 0.00001 -maxit 200
 &status config
$
&type
&cutype COORDINATES OF  CG AND ROLLERS (GLOBAL COORDINATES)
&type
 &type CDG   = &point(coor *cdg  -global)
 &type TENS  = &point(coor *tens -global)
 &type ROL1  = &point(coor *rol1 -global)
 &type ROL2  = &point(coor *rol2 -global)
 &if %trumpet% &then
  &type ROL3  = &point(coor *rol3 -global)
  &type ROL4  = &point(coor *rol4 -global)
 &endif
$
&type
&cutype COORDINATES OF  CG AND ROLLERS (VESSEL COORDINATES)
&type
 &type CDG   = &point(coor *cdg  -body)
 &type TENS  = &point(coor *tens -body)
 &type ROL1  = &point(coor *rol1 -body)
 &type ROL2  = &point(coor *rol2 -body)
 &if %trumpet% &then
  &type ROL3  = &point(coor *rol3 -body)
  &type ROL4  = &point(coor *rol4 -body)
 &endif
$
medit
   ~pipe rod %dia% %thic%  -len 30    -refine 10 %prop%
   ~pipe rod %dia% %thic%  -len 991   -refine 86 %prop%
   ~tens roller
   connector rol-tens  ~tens *tens
&if %ramp% &then
   ~rollers roller y %r_mst z %r_mst -y_roller 0 0 -z_roller 0 0
   connector rol1  ~rollers *rol1
   connector rol2  ~rollers *rol2
 &if %trumpet% &then
   ~trump1  roller -y_roller -%open1% %open1% -z_roller -%open1% %open1%
   ~trump2  roller -y_roller -%open2% %open2% -z_roller -%open2% %open2%
   connector rol3  ~trump1  *rol3
   connector rol4  ~trump2  *rol4
   assembly pipe  ~pipe rol4 rol3 rol2 rol1 rol-tens -pipe_tens %i_range%
 &else
   assembly pipe  ~pipe rol2 rol1 rol-tens -pipe_tens %i_range%
 &endif
&else
   ~roller  roller y 121 z 121 -y_roller -10000 10000 -z_roller -10000 10000
   connector rol1  ~roller *rol1
   assembly pipe  ~pipe rol1 roltens -pipe_tens %i_range%
&endif
end_medit
&status pipe
&conn &pipe  -pipe_tens 00 %des_ten   -top_ %mom
&status pipe
&conn &pipe  -pipe_tens %des_ten 1e5
&status pipe
&conn &pipe  -pipe_tens -1e10 1e10
&status pipe
&event_store 1
&status pipe
&status dg_connector &pipe@
&status f_rod
&status s_rod
&status f_connector
&status f_c -hard
&status pipe -hard
&status dg_connector &pipe@ -hard
&status f_r -hard
&status s_rod -hard
$
conn
 move 0 10 25
  report
 end
 move 90  10 25
  report
 end
end
$
$*********************************************      finish?
$
&fini  %time .le. 0
&describe interest
&status motion
&if &logical(%cvel% .ne. 0) &then
 &env env -current current 270
 &status env
&endif
&set deltat  = &number(real %time%-%tbeg%)
&set inc_1   = &number(real 1/%inc%)
tdom -newm y .33 .66 -save &number(real %deltat%*%inc_1%/20) -store %inc_1%
$
prcpost
&if &logical(%inc% .le. 0.25) &then
 &set inc = 0.25
&endif
$
$*********************************************      r_envel
$
r_envel &pipe
plot 1 22 23 24 25 -rax 26 27 -t_left 'Moments min & max (KN.m)'     \
                              -t_right 'Stresses min & max (Mpa)' \
                        -n
report
extreme 1 6 7 14 15 19 20 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37  -hard
end
$
$*********************************************      cf_mag
$
cf_mag r@ -event %tbeg% %time% %inc%
 &if %trumpet% &then
  plot 1 2 4 6 8 10  \
        -t_left 'Magnitude of forces at tensioner and rollers (KN)' -n
  extreme 1 2 4 6 8 10  -hard
  statistic 1 2 4 6 8 10  -hard
 &else
  plot 1 2 4 6 \
        -t_left 'Magnitude of forces at tensioner and rollers (KN)' -n
  extreme 1 2 4 6  -hard
  statistic 1 2 4 6  -hard
 &endif
end
$
$*********************************************      point
$
point *tens -event %tbeg% %time% %inc%
$vlist
 &set cols = 24 25 26
 plot 1 %cols -rax 2    -t_left 'Motion of tentioner (M)'  -n
 extreme 1 %cols    -hard
 statistic 1 %cols 2 -hard
end
$
$*********************************************      traj
$
traj -cg -event %tbeg% %time% %inc%
 plot 1 8 -rax 9  -n
 extreme 1 8 9 -hard
end
end
$
$*********************************************      all done
$
&finish
