`Run file to demonstrate the display

`of a summary table on the report's first page

`and keep detailed calculations in appendix

`This run file also features specific page numbering, and

`various other report formatting enhancements, custom tables

 

`Run file by S.Dardel-NDAR July 2015

 

 

clear

clear all

 

proj SUMTAB

READ tanker.GF /quiet

 

MACRO CALC-INT

subtitle Intact Stability-{LOADCOND}

heel 0

hmmt off

solve

status ghs /vol /we /fsm

st summary /vol:li

parts = *

DISPLAY STATUS PROFILE:outboard, Profile:withsails, plan /yesempty

.limINTACT

RAH /lim:att

/

 

MACRO PRELICALC

heel 0

hmmt off

solve

set DRLOC8={AP}

set TA={DRVALU}

set DRLOC8={FP}

set TF={DRVALU}

.limINTACT

 

RAH /lim:att /noprint

v L1 = {LIMATT1}

v L2 = {LIMATT2}

v L3 = {LIMATT3}

v L4 = {LIMATT4}

v L5 = {LIMATT5}

v L6 = {LIMATT6}

 

if LIMMARG > 0 then set FPASS="P" else set FPASS="{4}F{7}"

me (REPORT) SUMTAB.txt /append

me \{LOADCOND }    { DISPL:1} { VCG:3} { GMT:3} { TA:3} { TF:3}   {FREEBD:3}

me (REPORT) off

me (REPORT) SUMLIM.txt /append

me \{LOADCOND }    { L1:3} { L2:3} { L3:3} { L4:3} { L5:2} { L6:2}      {FPASS}

me (REPORT) off

/

 

MACRO LIMINTACT

set LIMTITLE = "IMO A.749 Intact Stability criteria"

lim off

lim title LIMTITLE

limit area from EQUIL to 30         > .055 'm.rad

limit area from EQUIL to 40 or fld  > .09  'm.rad

limit area from 30 to 40 or fld > .03  'm.rad

limit ra at 30                  > .2   'm

limit angle from EQUIL to max       > 25   'deg

limit gm upright                > .15  'm

/

 

MACRO FULLLOAD

set LOADCOND="FULL LOAD"

delete all weight

add "Provisions 100%" 9.35 10 0 9

add "Spare parts" 10 10 0 5

 

lo (*) 0 /QUIET

lo (cg*) 0.98

lo (fo*) 0.98

lo (do*) 0.98

lo (lo*) 0.98

lo (fw*) 1

/

 

MACRO WB-ARRiV

set LOADCOND="WB ARRIVAL"

delete all weight

add "Provisions 10%" 0.9 10 0 9

add "Spare parts" 10 10 0 5

 

lo (*) 0 /QUIET

lo (wb*) 1

lo (fodt*) 0.1

lo (foer*) 0.1

lo (dodb*) 0.1

lo (dirty*) 0.95

lo (fw*) 0.1

/

 

MACRO WB-MIDV

set LOADCOND="WB MIDVOYAG"

delete all weight

add "Provisions 50%" 5 10 0 9

add "Spare parts" 10 10 0 5

 

lo (*) 0 /QUIET

 

lo (wb*) 1

lo (fodt*) 0.1

lo (foer*) 0.1

lo (dodb*) 0.1

lo (dirty*) 0.95

lo (fw*) 0.1

/

 

MACRO 75-DEP

set LOADCOND="75% DEPART."

delete all weight

add "Provisions 10%" 9.35 10 0 9

add "Spare parts" 10 10 0 5

 

lo (*) 0 /QUIET

lo (wb*) 1

lo (fodt*) 0.1

lo (foer*) 0.1

lo (dodb*) 0.1

lo (dirty*) 0.95

lo (fw*) 0.1

/

 

 

if FEXIST SUMTAB.txt THEN ERASE sumtab.txt

if FEXIST SUMLIM.txt THEN ERASE sumlim.txt

 

v TA TF FPASS

v LIMATT1 LIMATT2 LIMATT3 LIMATT4 LIMATT5 LIMATT6

v LOADCOND

v LIMTITLE

 

subtitle Intact Stability

 

page /prefix

report /box:COLOR

 

 

WE 1360 40.430f 0 6.097 `Lightship mass

 

LBP 0 75F

v LLBBPP

set LLBBPP = {FP} minus {AP}

set LLBBPP = abs {LLBBPP}

 

angles 0,5,...,60

 

 

\{%IMAGE("tanker.jpg",-2,3.3,6,3.3,0)%}\

\\\\\\\\

\{+b}{+d}{title}{-b}{-d}                  \

 

 

ME REPSTART

\

\INTACT STABILITY CALCULATIONS\

ME REPEND

 

page

\\

 

\{+u}INTACT STABILITY{-u}\

\\\

ME REPSTART

ME REPPARAM

\Table of Contents:

\Summary Tables                    page 3

\Appendices

\   Full load departure            page A.2

\   75% departure                  page A.6

\   Water ballast mid-voyage       page A.10

\   Water ballast arrival          page A.14

ME REPEND

\\

\--------------------------\

\\

ME REPSTART

\LIGHTSHIP WEIGHT & CG

\Weight   { WEIGHT:0} tonnes

\LCG      { LCG:3} metres from 0

\VCG      { VCG:2} metres above BL

\LBP      { LLBBPP:2} metres

ME REPEND

 

page

 

.FULLLOAD

.PRELICALC

. 75-DEP

.PRELICALC

.WB-MIDV

.PRELICALC

.WB-ARRIV

.PRELICALC

 

 

ME REPSTART

\CONDITION SUMMARY TABLE

\LOAD COND          DISPL     VCG      GMT    Taft    Tfwd    FREEBD

\-------------------(t)------(m)------(m)------(m)-----(m)-----(m)

run sumtab.txt /call

ME REPEND

\\

ME REPSTART

\LIMIT SUMMARY TABLE

\LOAD COND        LIM1     LIM2    LIM3    LIM4    LIM5    LIM6  PASS/FAIL

\---------------(m.rad)--(m.rad)--(m.rad)---(m)---(deg)----(m)

run sumlim.txt /call

ME REPEND

 

ME REPSTART

\{LIMTITLE}

\LIM(1)  Area from 0 deg to 30             >   0.0550 (m.rad)

\LIM(2)  Area from 0 deg to 40 or Flood    >   0.0900 (m.rad)

\LIM(3)  Area from 30 deg to 40 or Flood   >   0.0300 (m.rad)

\LIM(4)  Righting Arm at 30 deg            >    0.200 (m)

\LIM(5)  Angle from 0 deg to MaxRA         >    25.00 deg

\LIM(6)  GM Upright                        >    0.150 (m)

ME REPEND

 

ERASE sumtab.txt

ERASE sumlim.txt

 

 

 

page 1 /prefix:A.

\\\\\\\\\\\\\\\\\\

ME REPSTART

me REPTITLE

\APPENDICES

me repend

 

 

.FULLLOAD

PAGE

.CALC-INT

 

.75-DEP

.CALC-INT

 

.WB-MIDV

.CALC-INT

 

.WB-ARRIV

.CALC-INT

 

 

print report /preview