|
GHS Port Reference Center
Information for maritime designers, engineers and builders Maintained by Creative Systems, Inc., Creators of GHS Click here for information about GHS and other fine marine software. |
|
|
`Demonstration of progressive tank filling where an air bubble
`gets trapped in a portion of the tank. The portion of the
`tank where the air bubble forms is modeled as a separate tank
`and its load level is calculated with respect to the pressure
`in the air bubble.
project TANKTRAP
enter pm
loa 999
create tank1a.s
loc @ 0 = 0 0, 20,0, 20,30, 10,30, 10,10, 0,10
loc @ 10 = 0 0, 20,0, 20,30, 10,30, 10,10, 0,10
tube 5,15,0, 5,15,30
/
create tank1b.s
loc @ 0 = 0 10, 10,10, 0,12
loc @ 10 = 0 10, 10,10, 0,12
/
write tanktrap.gf
quit pm
display
variable ds, ds1, y, k, v0, dh1, l1
set k = 33.9 times 1.025 `Head of water per atmosphere of pressure.
macro bubble
`%1 - sounding in main tank
`%2 - height ABL of bottom of bubble tank
`%3 - full volume of bubble tank
set ds = %1 minus %2 minus {ds1} `Effective head above bottom of bubble tank
if {ds}<0 then load 0 | exit
set y = {ds} div {k} plus 1 `Pressure in atmospheres
set y = %3 div {y} `Volume of air V = V0/P
set y = %3 minus {y} `Volume of water
load vol:{y}
set ds1 = minus {height} `Level of water above bubble tank's bottom
/
macro bload1
`%1 - bubble tank name
`%2 - height of bottom of bubble tank above bottom of sounding tube
`%3 - longitudinal center of tank for viewing cross section
tank %1
ref bottom
load 1
set v0 = {tvolume} `maximum volume of air bubble
set dh1 = %2
set l1 = %3
/
macro bload2
`%1 - sounding
`%2 - name of main tank
`%3 - name of bubble tank
load (%2) snd:%1 `load main portion of tank by sounding
tank %3
set ds1=0
.bubble (3) %1, {dh1}, {v0} `do the bubble macro multiple (3) times to converge ds1
display (*) status body @ {l1} /yesempty
/
.bload1 tank1b.s, 10, 5
.bload2 (6,4) 9, tank1a.s, tank1b.s
end
|
| Add a free link to your site |