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.
Go to Main page

Demonstrates how to produce a sounding table for a tank with layers of substances having different densities.
    `Demonstrates how to produce a sounding table for a tank with
    `layers of substances having different densities.
    
    proj tanklayr
    
    units mt
    
    `Create a hull and tank for this demonstration:
    enter pm
    
    create hull
    ends 0 50
    top 10
    bot 0
    out 10
    /
    
    create slurry.c
    loc @  5 = 0 0,  5 5,  5 10
    loc @ 25 = 0 0,  5 5,  5 10
    fit hull
    tube 5 0 0   5 0 10
    cont slurry, 1.2
    /
    create sdelta.c
    shape slurry
    tube 5 0 0   5 0 10
    cont sdelta, 0.8 `Sand minus slurry
    /
    write
    quit pm
    
    `Start report
    report
    variables snd, sand, sandmax, dens, x
    variables t,dt,maxt
    variables (string) name1,name2
    
    `This macro gets the data for one sounding, increments the sounding and repeats
    macro tc
     .snd {t}
     set t={t} plus {dt}
     if {t}>{maxt} then exit
     exit tc
    /
    
    `This macro loads the superimposed tanks and displays the results
    macro snd
    set snd=%1
    load sound: {snd}
    set sand={snd}
    if {sand}>{sandmax} then set sand={sandmax}
    load ({name2}) snd: {sand}
    depth=0 | set x={displ} `<-- this forces it to calculate fsmmt
    set dens = {weight} div {tvolume}
    \{ snd:2}{ tvolume:2}{ weight:2}{ dens:3}{  lcg:2}{ tcg:2}{ vcg:2}{  fsmmt:1}\
    /
    
    `This macro sets the primary tank name, displays header information, then executes tc
    macro sound
    `We must get rid of all other weights because the system WEIGHT and CG variables will be
    `used to get the weight and CG for just these tanks.
    load (*) 0
    delete all weights
    weight 0
    cls
    tank {name1}
    \-------- Layered Tank Sounding Table -------\
    \{pname} with sand at {sandmax:2} sounding\
    \
    \   Sound      Volume     Weight  Density      LCG     TCG     VCG      FSMMT\
    .tc
    \  -------------------{   wunit   }---------{ lunit }------------------------\
    /
    
    `Set the
    set name1 = "SLURRY.C"
    set name2 = "SDELTA.C"
    set sandmax = 2.5  `sounding at top of sand
    
    set t=1      `initial sounding
    set dt=1     `sounding increment
    set maxt=10  `final sounding
    .sound
    view
    report off
    
    
    

Add a free link to your site
Copyright © , Creative Systems, Inc.