/* internally pressurized filament wound bottle */

options results

if ~show('ports', "AMI2D") then do
    address command 'run ami2d:bin/ami2d'
    do while ~show('ports', "AMI2D")
    end
end

address ami2d

reset

call 'ami2d:rexx/caxisym'

tiso 8 26.25e6 1.50e6 0.23 0.70 1.0e6

set 'fang1=asin(1.7365/r0)'
set 'fang2=-fang1'
lam 2 0 8 1/2 'fang1'
lam 2 0 8 1/2 'fang2'
lam 7 0 8 1/3 'fang1'
lam 7 0 8 1/3 'fang2'
lam 7 0 8 1/3 '90.0'

do i=0 to 2
    coord polar 0 10
    r = i*0.125 + 10
    do ang=80 to 0 by -8
        node 0 r ang
    end
    coord cart
    x = i*0.1875 + 10
    do y=9 to 0 by -1
        node 0 x y
    end
end

do j=0 to 4
    i = j*2
    quad8 j+1 2 i+1 i+3 i+45 i+43 i+2 i+24 i+44 i+22
    press j+1 1 '-2000'
end
do j=5 to 9
    i = j*2
    quad8 j+1 7 i+1 i+3 i+45 i+43 i+2 i+24 i+44 i+22
    press j+1 1 '-2000'
end

dispz 21 '0.0'
dispz 42 '0.0'
dispz 63 '0.0'

exit
