|
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. |
|
|
`Example deadweight calculator
proj deadwt
`For this example, make a simple barge hull:
macro makehull
clear
enter pm
create hull
ends 20 140
top 20
bot 0
out 20
comp frake
ends 0 20
top 20
bot 0 @ 20, 15 @ 0
out 20
spacing 1
comp arake
ends 140 150
top 20
bot 0 @ 140, 10 @ 150
out 20
spacing 1
//
di
write barge.gf
quit pm
/
.makehull
read barge.gf
cls
variable w,w0,df,da
variable (string) q
`Define draft mark locations:
lbp 20 to 140
`Set light ship:
draft = 5
vcg = 10
solve weight, lcg
set w0 = {weight}
macro calc
me
input "Enter mean fwd draft: ", df
input "Enter mean aft draft: ", da
draft = {df} @ fp, {da} @ ap
add "Deadwt" delta
stat weight
`ghs
set w = {weight} minus {w0}
\\ Fwd draft { df:2} Aft draft { da:2} Deadweight: {w:2} {WUNIT}
me
delete "Deadwt"
input "Want to run another condition? ",q
set q = cap {q}
if {q}="Y" then exit calc
/
.calc
|
| Add a free link to your site |