`Demonstrates using GHS to figure out where a drydock will sink down to.
`When the flood valves are left open the tanks will load to the
`bottom of the air vents in each ballast tank.

proj bubble

`Make a simple hull with tanks:
enter pm
create hull
ends 0 100
out 10
top 10
bot 0
create tank1.c
ends 30 50
fit hull.c
create tank2.c
ends 50 70
fit hull.c
write bubble.gf
quit pm

`Establish light ship:
depth 5
vcg 5
solve weight, lcg

tank * `<-- selects all tanks
type bubble

`The point of flooding/venting is represented by the reference point:
ref top `Reference points at top
ref * * 6 `Now lower the vertical coordinate to vent bottom.

`Since the tanks will not flood until the water level is at or above the
`reference points, we have to load them to that point explicitly. This
`also establishes the 1-atmosphere air volume:
load ref:0

`Now solve for equilibrium and report the status: