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

 Rollback Angle Calculation for DDS079 Damage Stability ````This example run file demonstrates two distinct operations. First, it `calculates and displays the rollback angle for a single, displacement `using macro RB. `Second, it prints the rollback angles for a series of displacement values `and plots the curve. This part of the example run file serves two purposes: `it reproduces the original curve for verification and shows how to make a `table and plot from a set of data. VARIABLE RB `Rollback angle in degrees VARIABLE (WE) D `Displacement VARIABLE C0-L, C1-L, C2-L, C3-L, C4-L, C5-L, C6-L, C7-L `LT coefficients `Coefficients from C0 - C7 for displacement in long tons from US Navy DDS/DPC Regulations SET C0-L = -1.6666E-32 SET C1-L = 5.495021E-27 SET C2-L = -7.42122E-22 SET C3-L = 5.31419E-17 SET C4-L = -2.19619E-12 SET C5-L = 5.44701E-8 SET C6-L = -8.62394E-4 SET C7-L = 13.9601 MACRO RB`CALCULATES THE ROLLBACK ANGLE USING A 7TH ORDER POLYNOMIAL `%1-L OR M FOR LT OR MT COEFFICIENTS Cn-M coefficients need to be defined above if used if {D}>80000 then set RB=5 | exit SET RB = {C7-%1} SET RB = {D} TIMES {C6-%1} PLUS {RB} SET RB = {D} POWER 2 TIMES {C5-%1} PLUS {RB} SET RB = {D} POWER 3 TIMES {C4-%1} PLUS {RB} SET RB = {D} POWER 4 TIMES {C3-%1} PLUS {RB} SET RB = {D} POWER 5 TIMES {C2-%1} PLUS {RB} SET RB = {D} POWER 6 TIMES {C1-%1} PLUS {RB} SET RB = {D} POWER 7 TIMES {C0-%1} PLUS {RB} / MACRO GET_RB SET D = %1 `%1 = displacement (units match %2) .RB %2 `%2 = L OR M FOR LT OR MT COEFFICIENTS `Cn-M coefficients need to be defined above if used \ { D} { RB:2} `data for table me { D} { RB:2} `data for message plot / ME "This run file will calculate the rollback angle ME "based on the full load of the vessel using the ME "curve in DDS079. INPUT "ENTER DISPLACEMENT: " D UNITS SAVE UNITS LT REPORT ROLLBACK \--- Single Displacement from User Input ---\ .RB L UNITS RESTORE \Displacement: {d} {wunit}; Rollback Angle: {RB:2} degrees\ \\\\\ UNITS SAVE UNITS LT \--- Series of Displacements 0 10,000 ... 80,000 ---\ `title for table \DISPL (LT) ROLLBACK (DEG) `header for table ME PLOTSTART "Rollback Angle for DDS/DPC" `title for plot ME PLOTLABEL "Displacement (LT)" "Angle (degrees)" `axis labels for plot .GET_RB(9 ,10000) 0 L `series of displacements ME PLOTEND `end of plot data UNITS RESTORE PRINT PREV REPORT OFF ``` Add a free link to your site