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

Finding the Minimum and Maximum Bending Moments for each LS Run.
    READ TANKER.GF
    
    WE 4314.87, -48.251,0,5.5
    SO
    LOAD (WBFPK.C, WBDB*, FO*, LO*, DO*, fw*) .95
    SO
    
    variable x = 0, x2 = -94.898  
    variable (mmt) bmtmax=0, bmtmin=0
    
    
    macro FRAME      `MACRO TO CREATE FRAME FILE
    if {x2} = 2.898 then exit
    set x = {x} PLUS 1       `FOR FRAME NUMBER
    set x2 = {x2} PLUS 1     `FOR LONGITUDINAL LOCATION OF FRAME
    message (report) TANKER.FRA /append
    me "FRAME{X}, {x2} M
    ME (REPORT) OFF
    /
    
    .frame(97)  `CREATE FRAME FILE 
    
    
    
    macro LSDEC     `MACRO TO CREATE LS BENDING MOMENT VARIABLES, SEE HELP LS.
    set x = {x} PLUS 1
    variable FRAME{x}$BM
    /
    
    
    macro LSOUT     `MACRO TO CHECK CURRENT FRAME'S BENDING MOMENT AGAINST CURRENT MINIMUM / MAXIMUM
    set x = {x} PLUS 1
    if {FRAME{x}$BM} > {bmtmax} THEN SET BMTMAX = {FRAME{x}$BM}
    if {FRAME{x}$BM} < {bmtmin} THEN SET BMTmin = {FRAME{x}$BM}
    /
    
    `RUN MACROS
    SET X = 0
    .LSDEC(97)
    LS /NOPRINT /FRAME
    SET X = 0
    .LSOUT(97)
    
    `REPORT THE RESULTS
    units m
    \ Maximum Bending Moment is {bmtmax} \ 
    \ Minimum Bending Moment is {bmtmin} \ 
    
    
    

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