$ $@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@ $@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@ $@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@ $ $ $ -------------- macros ------------- $ $ $@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@ $@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@ $@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@ $ $ $@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@ $ $ ---------- Comparison of shapes ------------ $ $@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@ $ ¯o c_shapes $ $*************************************** save $ &default -save $ $*************************************** bodies $ &title Comparison of Wind/Current Force &subtitle Bodies Used &set bodies = round square wedge &loop k ( 1 2 ) &loop l 1 &token(n %bodies) &set fmw%(k)%(l) = &set fxw%(k)%(l) = &set fyw%(k)%(l) = &set fmc%(k)%(l) = &set fxc%(k)%(l) = &set fyc%(k)%(l) = &endloop &endloop $ $*************************************** locate $ &instat -loc round -50 0 -50 \ -loc square 100 0 -50 \ -loc wedge 250 0 -50 $ $*************************************** set weight $ &weig -comp round 0 \ -comp square 0 \ -comp wedge 0 $ $*************************************** picture and summ $ &channel gra_dev -file %(ans)/wc_shapes.eps &pict iso &summ compart_sum e_piece panel end $ $*************************************** compute $ &stat config -hard &loop k 1 2 &if %k .eq. 1 &then &set tit = Wind, Current Check - MOSES Method ¶meter -af_env no &else &set tit = Wind, Current Check - Projected Area Method ¶meter -af_env yes &endif &title %tit &type %tit &loop hed ( %ang ) &set env = -wind 100 %hed -curr 5 %hed -w_profile api &subtitle %env &env %env &stat force -hard &loop l 1 &token(n %bodies) &set bod = &token(%l %bodies) &set fc = &body(f_v_drag %bod) &set fw = &body(f_wind %bod) &set fc = &token(1:2 %fc) &set fw = &token(1:2 %fw) &set fmc = &number(norm %fc) &set fxc = &token(1 %fc) &set fyc = &token(2 %fc) &set fmw = &number(norm %fc) &set fxw = &token(1 %fc) &set fyw = &token(2 %fc) &set fmc%(k)%(l) = %(fmc%(k)%(l)) %fmc &set fxc%(k)%(l) = %(fxc%(k)%(l)) %fxc &set fyc%(k)%(l) = %(fyc%(k)%(l)) %fyc &set fmw%(k)%(l) = %(fmw%(k)%(l)) %fmw &set fxw%(k)%(l) = %(fxw%(k)%(l)) %fxw &set fyw%(k)%(l) = %(fyw%(k)%(l)) %fyw &endloop &endloop &endloop $ $*************************************** build table $ $ &channel tab -p_devi htm &buildg -csv &set row = "Headings" &loop k ( 1 2 ) &if %k .eq. 1 &then &set method = MM &else &set method = PAM &endif &loop l 1 &token(n %bodies) &set bod = &token(%l %bodies) &set row = %row "%method %bod Fwind Mag" &set row = %row "%method %bod Fwind X " &set row = %row "%method %bod Fwind Y " &set row = %row "%method %bod Fcurr Mag" &set row = %row "%method %bod Fcurr X " &set row = %row "%method %bod Fcurr Y " &endloop &endloop %row &loop n 1 &token(n %ang ) &set row = &token(%n %ang) &loop k ( 1 2 ) &loop l 1 &token(n %bodies) &set row = %row &token(%n %(fmc%(k)%(l)) ) &set row = %row &token(%n %(fxc%(k)%(l)) ) &set row = %row &token(%n %(fyc%(k)%(l)) ) &set row = %row &token(%n %(fmw%(k)%(l)) ) &set row = %row &token(%n %(fxw%(k)%(l)) ) &set row = %row &token(%n %(fyw%(k)%(l)) ) &endloop &endloop %row &endloop end vl store -sel @ &channel gra -file %(ans)/wc_wfx.eps &title Computed via MOSES Method &subtitle X Component of Wind Force plot 1 3 9 15 -legend 1 Round \ -legend 2 Square \ -legend 3 Wedge \ -clean -t_left "Force (kips)" \ -t_x "Heading (Deg)" \ -add 4 &channel gra -file %(ans)/wc_wfy.eps &subtitle Y Component of Wind Force plot 1 4 10 16 -legend 1 Round \ -legend 2 Square \ -legend 3 Wedge \ -clean -t_left "Force (kips)" \ -add 4 &channel gra -file %(ans)/wc_wfmag.eps &subtitle Magnitude of Wind Force plot 1 2 8 14 -legend 1 Round \ -legend 2 Square \ -legend 3 Wedge \ -clean -t_left "Force (kips)" \ -t_x "Heading (Deg)" \ -add 4 $ &channel gra -file %(ans)/wc_cfx.eps &subtitle X Component of Current Force plot 1 6 12 18 -legend 1 Round \ -legend 2 Square \ -legend 3 Wedge \ -clean -t_left "Force (kips)" \ -t_x "Heading (Deg)" \ -add 4 &channel gra -file %(ans)/wc_cfy.eps &subtitle Y Component of Current Force plot 1 7 13 19 -legend 1 Round \ -legend 2 Square \ -legend 3 Wedge \ -clean -t_left "Force (kips)" \ -t_x "Heading (Deg)" \ -add 4 &channel gra -file %(ans)/wc_cfmag.eps &subtitle Magnitude of Current Force plot 1 5 11 17 -legend 1 Round \ -legend 2 Square \ -legend 3 Wedge \ -clean -t_left "Force (kips)" \ -t_x "Heading (Deg)" \ -add 4 $ &channel gra -file %(ans)/wc_wmethod.eps &subtitle Magnitude of Wind Force plot 1 8 32 -legend 1 "MOSES Method" \ -legend 2 "Projected Area Method" \ -clean -t_left "Force (kips)" \ -t_x "Heading (Deg)" \ -add 4 &channel gra -file %(ans)/wc_cmethod.eps &subtitle Magnitude of Current Force plot 1 11 35 -legend 1 "MOSES Method" \ -legend 2 "Projected Area Method" \ -clean -t_left "Force (kips)" \ -t_x "Heading (Deg)" \ -add 4 end $ $********************************************* remember $ &default -remember $ $********************************************* all done $ &endmacro $ $@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@ $ $ ---------- Comparison with TANAKA ------------ $ $@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@ $ ¯o c_tanaka $ $*************************************** save $ &default -save $ $********************************************* read model $ &title Comparison of Roll RAO with TANAKA vs -CS_CURR &dimen -DIMEN feet kips &device -auxin ndai.dat INMODEL $ $********************************************* set condition $ &instate -cond 9 &weight -total 19946 212.8 0 32 51.9 123 123 &status &set cs = 1 1 1 $ $********************************************* pressures $ hydro g_press -period %period -heading 90 end $ $********************************************* loop steep $ &loop steep ( 20 75) &loop k 1 4 &if %k .eq. 2 &then &set tan = -tanaka 0 &else &set tan = -tanaka 1 &endif &if %k .eq. 1 &then &set cp = -cs_curr 0 0 0 &elseif %k .eq. 3 &then &set cp = -cs_curr 1 1 0 &elseif %k .eq. 4 &then &set cp = -cs_curr 1 1 0 &else &set cp = -cs_curr %cs &endif &describe piece barge %cp %tan &set lab = a|%(k)|%(steep) &SUBTITLE Using %cp and %tan freq_resp rao -steep %steep -heading 90 fr_point 212 0 32 report $ vl set_var per -column 2 set_var %lab -column 9 end end &endloop &endloop $ $********************************************* graph them $ &buildg -csv Period 'TANAKA, Steep=20' 'CS 1 1 1, Steep=20' \ 'BOTH, Steep=20' 'CS 1 1 0, Steep=20' \ 'TANAKA, Steep=75' 'CS 1 1 1, Steep=75' \ 'BOTH, Steep=75' 'CS 1 1 0, Steep=75 &loop k 1 &token(n %per) &token(%k %per) &token(%k %(a|1|20) ) &token(%k %(a|2|20) ) \ &token(%k %(a|3|20) ) &token(%k %(a|4|20) ) \ &token(%k %(a|1|75) ) &token(%k %(a|2|75) ) \ &token(%k %(a|3|75) ) &token(%k %(a|4|75) ) &endloop end vl &channel gra_dev -file %(ans)/wc_tanaka.eps &SUBTITLE Using -CS_CURR %cs plot 1 2 3 6 7 -t_l 'Roll Rao (Deg/Ft)' &channel gra_dev -file %(ans)/wc_both.eps &SUBTITLE BOTH is TANAKA + -CS_CURR 1 1 0 plot 1 2 4 6 8 -t_l 'Roll Rao (Deg/Ft)' end $ $********************************************* remember $ &default -remember $ $********************************************* all done $ &endmacro $ $@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@ $ $ ---------- Comparison with #TUBE ------------ $ $@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@ $ ¯o c_tube $ $*************************************** save $ &default -save $ $********************************************* read model $ &device -auxin 3ddif.dat inmodel $ $********************************************* set condition $ &instate -loc 0 0 -22.5 &weight -compute balder 22.13 34.70 40.90 47 &status -hard $ $********************************************* frequency domain $ &set steep = 20 &set ra = .03 &set cs = 1 1 1 &set wn = .306 &set cd = &number(real %ra*2*%wn) &describe piece BALDER -cs_curr 0 0 0 &loop k 1 3 &if %k .eq. 1 &then &apply -load -fraction tube 1 drag 0 &describe piece BALDER -cs_curr 0 0 0 &subtitle Using Tube &elseif %k .eq. 2 &then &apply -load -fraction tube 0 drag 0 &describe piece BALDER -cs_curr %cs &subtitle Using -cs_curr %cs &else &apply -load -fraction tube 0 drag %cd &describe piece BALDER -cs_curr 0 0 0 &subtitle Using Drag with %cd &endif &instate -loc 0 0 -22.5 freq rao -steep 50 -heading 90 fr_point &body(cg balder) report $ vl set_var per -column 2 set_var hea%k -column 7 set_var ans%k -column 9 end end d_heave %k $ d_roll $ d_pitch &endloop $ $********************************************* model test heave $ &set fr = .2793 .304 .33 .37 .42 .5 .55 .6 .65 .7 .8 &set hr = 1.2 1.25 .70 .72 .75 .65 .5 .3 .10 .025 .03 &set p_h = &loop k 1 &token(n %fr) &set f = &token(%k %fr) &set p = &number(real 2*3.1415927/%f) &set p_h = %p_h %p &token(%k %hr) &endloop $ $********************************************* model test roll $ &set fr = .275 .304 .32 .35 .40 .45 .50 .60 .65 .75 .8 &set hr = 1.0 .75 .50 .24 .30 .37 .50 .625 .65 .37 .25 &set p_r = &loop k 1 &token(n %fr) &set f = &token(%k %fr) &set p = &number(real 2*3.1415927/%f) &set p_r = %p_r %p &token(%k %hr) &endloop $ $********************************************* graph fdom $ &title Comparison of BALDER Beam Sea, Frequency Response &SUBTITLE STEEPNESS %steep and -CS_CURR %cs &buildg -csv Period ROLL_#TUBE ROLL_CS_CURR HEAVE_#TUBE HEAVE_CS_CURR HEAVE_3\% &loop k 1 &token(n %per) &token(%k %per) &token(%k %ans1) &token(%k %ans2) \ &token(%k %hea1) &token(%k %hea2) &token(%k %hea3) &endloop end $ add_col "Model Test Heave" -input 1 %p_h $ add_col "Model Test Roll " -input 1 %p_r vl &channel gra_dev -file %(ans)/wc_tube_roll.eps plot 1 2 3 -t_l 'Roll Rao (Deg/M )' $ -lim 7 21 &channel gra_dev -file %(ans)/wc_tube_heave.eps plot 1 4 5 -t_l 'Heave Rao (M/M)' $ -lim 7 21 end $ $********************************************* graph decay $ &title Comparison of BALDER Decay using #TUBE vs -CS_CURR &SUBTITLE -CS_CURR %cs &set points = 20.5 -1.5 103 -.63 206 -.4 308.5 -.25 &set p = -5 3.5 -3 2.5 -2.2 2 -1.7 1.5 -1.45 1.4 -1.2 1.1 &set points = &loop k 1 &token(n %p) &set points = %points &number(real (%k-1)*10.125) .5*&token(%k %p) &endloop &buildg -csv TIME HEAVE_#TUBE HEAVE_CS_CURR HEAVE_3\% &loop k 1 &token(n %time ) &set line = &token(%k %time ) &token(%k %heave1) &token(%k %heave2) \ &token(%k %heave3) %line &endloop end add_column "Model Test Heave" -input 1 %points vl store 1 3 4 5 &channel gra_dev -file %(ans)/wc_heave_decay.eps plot 1 3 4 5 -lim 0 105 -t_l 'Heave Decay (M)' -clean $-point "Model Tests" %points $ plot 1 4 5 -t_l 'Roll Decay (Deg)' $ plot 1 6 7 -t_l 'Pitch Decay (Deg)' $ $********************************************* remember $ &default -remember end $ $********************************************* all done $ &endmacro $ $@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@ $ $ ---------- Comparison with #TANKER ------------ $ $@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@ $ ¯o c_tanker $ $*************************************** save $ &default -save $ $********************************************* set variables $ &SET hgen = .true. $ $********************************************* read model $ &dimen -DIMEN METERS M-TONS &device -auxin fishtail.dat &default -depth 82.5 INMODEL $ $********************************************* initial state $ &INSTATE -LOC 0 0 -7.00 0 0 0 $ $********************************************* environment $ &env s1 -cur 1.00 00 &apply -load -fraction t_drag 1 &names load $ $********************************************* loop types $ &loop k 1 2 &set ans%k = &loop a ( %ang ) &instate -loc 0 0 -7.00 0 0 %a &set for = &body(f_total) &set ans%k = %(ans%(k)) &token(1:2 %for) &token(6 %for) &endloop &apply -load t_drag 0 &describe piece shutank -cs_curr 1 .77 1 &endloop $ $********************************************* graph them $ &title Comparison of force from #TANKER vs -CS_CURR &SUBTITLE 1 m/sec Current and -CS_CURR 1 .77 1 &buildg -csv Heading T_FX T_FY T_MZ CS_FX CS_FY CS_MZ &loop k 1 &token(n %ang) &set l = &number(integer 1+3*(%k-1)) &set t = &number(integer %l+2) &token(%k %ang) &token(%(l):%(t) %ans1) &token(%(l):%(t) %ans2) &endloop end &channel gra_dev -file %(ans)/wc_tanker_surge.eps plot 1 2 5 -t_l 'Surge Force (tonnes)' -add 4 &channel gra_dev -file %(ans)/wc_tanker_sway.eps plot 1 3 6 -t_l 'Sway Force (tonnes)' -add 4 &channel gra_dev -file %(ans)/wc_tanker_yaw.eps plot 1 4 7 -t_l 'Yaw Moment (m-tonnes)' -add 4 end $ $********************************************* depth $ &apply -load -fraction t_drag 1 &instate -loc 0 0 -23 0 0 0 &loop k 1 2 &set ans%k = &set ang = 90 &set rat = 1.05 1.10 1.20 1.50 2.25 3.00 6.00 &loop r ( %rat ) &env d1 -cur 1.00 90 -depth 23*%r &set for = &body(f_total) &set for = &token(2:2 %for) &set for = &number(abs %for) &set ans%k = %(ans%(k)) %for &endloop &apply -load t_drag 0 &describe piece shutank -cs_curr 1 1.41 1 \ -dd_mult 1 3.25 1.1 2.85 1.20 2.4 1.50 1.9 3.0 1.32 6 1 &endloop &title Comparison of force from #TANKER vs -CS_CURR 1 1.41 1 &SUBTITLE 1 m/sec Beam Current for For different Drafts &buildg -csv D/T T_FY CS_FY &loop k 1 &token(n %rat) &set l = &number(integer 1+1*(%k-1)) &token(%k %rat) &token(%(l) %ans1) &token(%(l) %ans2) &endloop end vlist view 1 2 3 &channel gra_dev -file %(ans)/wc_tanker_depth.eps plot 1 2 3 -t_l 'Sway Force (tonnes)' \ -t_x 'Depth / Draft Ratio' -add 4 end $ $********************************************* remember $ &default -remember $ $********************************************* all done $ &endmacro $ $ $@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@ $@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@ $@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@ $ $ $ ---------- Model of bodies --------- $ $ $@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@ $@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@ $@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@ $ $ $*************************************** save $ &default -save $ $*************************************** misc stuff $ &device -OECHO n -mecho n -g_default device &channel tab -p_devi html &pb_parm -flat_tol 1e-4 &set ans = &info(c_path)/&info(root).ans &SET ang = 0 10 20 30 40 50 60 70 80 90 100 110 120 130 140 \ 150 160 170 180 $ $*************************************** round $ &describe body round &default -cs_wind 1 1 1 -cs_curr 1 1 1 pgen -loc 0 0 0 0 -90 0 -cs_wind 1 1 1 -cs_curr 1 1 1 $pgen -loc 0 0 0 0 -90 0 -cs_wind .5/.784 .5/.784 1 \ $ -cs_curr .5/.784 .5/.784 1 plane 0 100 -e_circ 0 0 50 0 10 19 end $ $*************************************** square $ &describe body square pgen plane 0 100 -rect 0 100 100 end &describe compart cow pgen cow plane 25 50 -rect 0 10 10 end $ $*************************************** plate $ $&describe body plate $*t1 0 50 0 $*t2 0 50 100 $*t3 0 -50 100 $*t4 0 -50 0 $*l1 -50 0 0 $*l2 -50 0 100 $*l3 50 0 100 $*l4 50 0 0 $#plate *t1 *t2 *t3 *t4 $#plate *l1 *l2 *l3 *l4 $ $*************************************** wedge $ &describe body wedge pgen plane 0 -rect 0 000 100 plane 100 -rect 0 100 100 end $ $********************************************* remember $ &default -remember