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

Especially useful for finding the maximum reaction at aft block.
    `Especially useful for finding the maximum reaction at aft block.
    `***This run file works best if the GF file origin is located at the bow
    `***This run uses CRTPT(1) to set the draft, it will be overwritem if
    `   previously defined
    `***This run file allows two series of longitudinal CL blocks so that two
    `   different spacings can be used.
    `***This run file allows only one side block per side.
    `proj tanker0`set the project name to be the same as your GF filename
    read tanker0`Read geometry
    report {project}
    `         User Input
    `Set Initial Ship Condition
    lbp 5, 95`assign the forward and aft draft locations
    `Set the waterplane by entering drafts or lightship weight
    `->Be sure to select the correct solve method below (after the macros)
    draft 5.5 @ FP, 6.10 @ AP`Set initial drafts
    `WEIGHT =  64.5 @ 0, 65.7 @ 95`Or set initial weight distribution
    `weight =  128@0, 128@24, 0@24, 0@71 130@71, 129@95
    `weight report /profile
    vcg 5`Estimated VCG
    `Enter block locations and other data
    variable la, lf, lb dl1, dl2, m, n, n1, n2, s, sz, ns, ls, ts, vs
    set la = 88`Location of aftmost block from origin (see geometry file)
    set lf = 8`Location of foremost block from origin (see geometry file)
    set lb = {la} minus {lf}
    set n = 20 `Max number of blocks
    set n1 = 3`Number of blocks in first series
    set dl1 = 10`Spacing between blocks (aftmost series)
    set n2 = 3`Number of blocks in second series
    set dl2 = 20`Spacing between blocks (second series)
    `Note: n1 + n2 < n-2 (n-2 accounts for side blocks
    set ls = 58`Side Block long. location from GF origin
    set ts = 3.5`Side Block transverse location from CL
    set vs = 0.0`Side Block vertical point of contact above ship's BL
    set m = .10`Increase this number to increase penetration (deformation)
    `higher for less stiffness, more penetration
    `In this example, penetration is block deformation
    `m = 0.2 typical value used for grounding calc, values varies
    `depending upon length of vessel and soil condition, etc.
    set ns = 15`Number of steps to report for drydocking evolution
    set sz = 0.5 `Step size factor (increase for larger steps)
    `Trim divided by 15 (arbitrary factor), this factor is used
    `in conjunction with "ns" factor
    set s = 0`.003`Dock floor slope (tangent of angle, positive = aft trim)
    `         End of User Input
    variable l,p,dl,dp,x,t,stepnum
    set x = 0`initialize variable used to set height of the ship
    set stepnum = 1 `initialize variable used to report the step number
    macro mk_block
     set l = {la}
     set dl = {dl1}
     set s = tan {trim} minus {s}
    ` if {s} < 0 then \Error: Trim must be greater | REPORT OFF | END
     .blocks ({n1}) `Makes first (aftmost) series of aft blocks
     set l = {l} plus {dl}
     set dl = {dl2}
     set l = {l} minus {dl}
     if {n2} > 0 then .blocks ({n2}) `Makes second series of aft blocks
     .block {ls} {ts} {vs} "Stbd Side " `Make side blocks
     set ts = minus {ts}
     .block {ls} {ts} {vs} "Port Side "
    macro block`Creates a ground point to model a block
     if {n} = 0 then exit | \ Error: Increase number of blocks, n.
     set t = %1 minus {la}
     set p = {s} times {t}
     ground "%4Block @ %1" * %1 %2 %3 /pen: {p} {m}
     set n = {n} minus 1
    macro blocks`Calls macro block to create a series
     .block {l} 0 0
     set l = {l} minus {dl}
    macro mk_point
     part hull
     ref {la} 0 0`Define reference point at the location of the aft block
     set t = minus {height}
     crtpt (1) "Tracking pt." {la}, 0, {t} `Used to adjust waterplane
     `REF 0 0 0
     part off
    macro status`Report macro
     status displ:total, wpl:total
     `status ground `use this Cmd for simplified report
     ground report `use this Cmd for complete report
    macro SetStep
     set t = {s} times {lb}
     set t = {t} times {sz}`The variable t now contains the step size
    macro step`Define macro to increment waterplane
     set x = {x} plus {t}
     height(1) {x} `Sets the waterline relative to the critical point
     solve trim `Find equilibrium holding heel constant
     \---Report Step {stepnum}---\
     set stepnum = {stepnum} plus 1
     display status /sync
     if {displ} < 2 then \More steps than needed. | print prev | report off | exit /clear
    `         End of Macro Definition
    solve weight, lcg`Solve using drafts
    `solve`Solve using weight
    \---Report Initial Condition---\
    status crtpt
    .step ({ns})  `Number of steps in parentheses
    if {displ} > 2 then \Docking not complete |;;
    \Increase number of steps(ns) or step size(sz)
    print preview
    report off

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