$
$*********************************************      set devices
$
&title Test of "Simple" Ballasting
&dimen -dimen feet kips
&device   -oecho no
$
$*********************************************      read model
$
inmodel
&status v_hole
&instate -locate barge 0 0 -10 0 0 0
st_cmp
$
$*********************************************      use weight
$
&weight -compute barge 5 0 0 0
st_cmp
$
$*********************************************      hydrostatics
$
hstatics
   &loop i 1 2 1
       cform 10 0 0 -draft 1 1
           report basic
           end
       cform 6.52 0 1 -draft 1 1
           report basic
           end
       &instate -condition barge 10 0 0
       &status
       &instate -condition barge 6.52 0 1
       &status
       &compartment -correct -fract @ .5
   &endloop
end
$
$*********************************************      use simple
$
&weight -define barge 0 0 0 0 0 0 0
&compartment  -fraction @ .50
st_cmp
$
$*********************************************      use slosh
$
&compartment -correct -fraction @ .50
st_cmp
$
$*********************************************      use flood
$
&compartment -flood @
st_cmp -f
$
$*********************************************      test cg loc y
$
&instate -condition barge 10 1 0
&compartment  -fraction @ .50
st_cmp
&compartment -correct -fraction @ .50
st_cmp
$
$*********************************************      test cg loc x
$
&instate -con 10 0 1
&compartment  -fraction @ .50
st_cmp
&compartment -correct -fraction @ .50
st_cmp
$
$*********************************************      test ullage sound
$
&status s_compartment
&type
&loop k 0 20 1
  &compartment -percent @ &number(real 100*%k%/20.)
  &set s = &compartment(tankp1 -sounding)
  &set u = &compartment(tankp1 -ullage)
  &set s = &token(2 %s)
  &set u = &token(2 %u)
  &type &format(i2 %k) TANKP1 sounding = &format(f7.3 %s) ullage = &format(f7.3 %u)
&endloop
$
$*********************************************      all done
$
&finish
