31
ESCUELA SUPERIOR POLITÉCNICA DEL LITORAL FACULTAD DE INGENIERÍA MARÍTIMA Y CIENCIAS DEL MAR APPLIED PROGRAMMING 1 Teacher: Dr. José R. Marín López Subject: Calculation of the freeboard of a tanker ship Members: Vargas Jiménez Adriana Cuenca Cabrera Carlos 1

Project 1 Vargas_cuenca

Embed Size (px)

Citation preview

Page 1: Project 1 Vargas_cuenca

ESCUELA SUPERIOR POLITÉCNICA DEL LITORAL

FACULTAD DE INGENIERÍA MARÍTIMA Y CIENCIAS DEL MAR

APPLIED PROGRAMMING 1

Teacher: Dr. José R. Marín López

Subject: Calculation of the freeboard of a tanker ship

Members: Vargas Jiménez AdrianaCuenca Cabrera Carlos

Date: Wednesday, December 9th.

1

Page 2: Project 1 Vargas_cuenca

INDEX

SUMMARY …………………………………………………………………………… 3

TERMINOLOGY…………………………………………………................................4

RULES THAT MODIFY THE FINAL FREEBOARD .......………….……………... 6

EXAMPLE ……………………………………………………………………………... 7

COMMENTS AND NOTES ………………………………………………………….. 8

REFERENCES ……………………………………………………………………….. 9

APPENDIXES …………………………………………………………………………. 10

RULES …………………………………………………………………………. 10

Chapter I ……………………………………………………………… 10

Chapter II ……………………………………………………………... 10

Chapter III …………………………………………………………….. 11

SOURCE CODES ……………………………………………………………. 13

Rule 28 ………….…………………………………………………….. 13

Rule 30 ……………….……………………………………………….. 14

Rule 31_33 …………………………………………………………… 15

Rule 32 …………………………………….………………………….. 16

Rule 35 ………………………………………….…………………….. 17

Rule 36 …………………………………….………………………….. 18

Rule 37 …………………………………………….………………….. 19

Rule 38 ……………………………………………………………….. 20

Rule 39 ……………………………………………………………….. 22

Rule 40 ……………………………………………………………….. 23

Main Program ………………………………………………………... 24

2

Page 3: Project 1 Vargas_cuenca

SUMMARY

We are using a program made in the Visual Fortran environment, and with this program, we are going to calculate the final freeboard of any ship type A that we have. To do that we will need some important values which we can get from the plan of the tanker ship that we are analyzing.

These values are going to be in a *.txt file and the program read this data from that *.txt file, and the data of the ship in the *.txt file must be at the following order:

Then it will calculate several corrections due to some factors which are defined in some rules that modify the freeboard, these rules were taken from International Maritime Organization rules (IMO) to determine the Load lines of a tanker ship. The program will calculate one by one of these corrections and then that it finished the process, will show us the final freeboard and all corrections that were made, in another final *.txt file.

All these values are going to be in meters.

3

Page 4: Project 1 Vargas_cuenca

TERMINOLOGY

Measures and variables used in this program

The program uses some measures that are named by some letters, whose values are in meters and are the following:

LWL. – This is the length and It will be taken as 96 per cent of the total length on a waterline at 85 per cent of the smallest moulded depth measured from the top of the keel.

DEP. – This is the Freeboard Depth of the ship.

RDEP. – This is the Real Depth of the ship, which is a value that you get from the Plan of the ship.

BM. - This is the beam of the ship, this value must be.

AP. - This is the ordinate to the after perpendicular.

SAP. - This is the ordinate measured at L/6 from the after perpendicular.

TAP. - This is the ordinate measured at L/3 from the after perpendicular.

SM. - This is the ordinate measured at L/2 from the after perpendicular or forward perpendicular.

TFP. - This is the ordinate measured to L/3 from the forward perpendicular.

SFP. - This is the ordinate measured L/6 from the forward perpendicular.

FP. - This is the ordinate to the after perpendicular.

m. - This value is a counter and it is used to define which is the type of the superstructure that we have in our ship.

SUH. - This is the superstructure height in our ship.

SUL. - This is the Superstructure Length in our ship.

SUB. - This is the breadth at half of the length of the Superstructure.

BMH. - This is the beam of the ship but measure at the half of the length of the superstructure.

n. - It is a counter that show me if the ship has or doesn’t have trunk.

TRH. - It is Trunk height.

TRL. - It is the Trunk length.

TRB. – This is the Trunk breadth.

Cb. - Block coefficient of the ship.

VOL. – Displacement volume of the ship.

4

Page 5: Project 1 Vargas_cuenca

5

Page 6: Project 1 Vargas_cuenca

RULES THAT MODIFY THE FINAL FREEBOARD

The rules that we are considering are the following:

Rule 28. - Types of ships

Rule 30. - Correction for block coefficient

Rule 31. - Correction for depth

Rule 32. - Correction for position of deck line

Rule 33. - Standard height of superstructure

Rule 35. - Effective length of superstructure

Rule 36. - Trunks

Rule 37. - Reduction for superstructures and trunks

Rule 38. - Sheer

Rule 39. - Minimum bow height

Rule 40. - Minimum freeboards

Where those rules are in a library.

And we have the Main Program which is going to use the Library with the subroutines that has the rules that modify the Final Freeboard

6

Page 7: Project 1 Vargas_cuenca

EXAMPLE

The data of the ship are in the *.txt file which is named DATA1.txt:

THEN

The program shows the results for our ship at the following form:

7

Page 8: Project 1 Vargas_cuenca

COMMENTS AND NOTES

In some rules we used a lineal interpolation to get intermediate values, and these results will be in meters too.

The program will show us all corrections and the final freeboard for our tanker ship.

The final freeboard that this program shows you is the Summer Freeboard in meters.

The Freeboard for this ship in its plan is 1.44 meters (Real Value), and the value that we have calculated is 1.38 meters, that means:

%E=Teo−expTeo

×100 = 1.44−1.38

1.44×100=4.17 %

And we can see that the error is inside of the permissible error which is 5 %.

8

Page 9: Project 1 Vargas_cuenca

REFERENCES

International Maritime Organization (IMO), Load lines Convention 1966.

Notes of Naval Architecture I (Definitions), Ing. Bolivar Vaca

9

Page 10: Project 1 Vargas_cuenca

APPENDIXES

RULES

REGULATIONS FOR DETERMINING LOAD LINES

CHAPTER I

GENERAL

Rule 1. - Hull resistence. - The structural general hull resistence must be sufficient for the draft corresponding to the freeboard assigned

Rule 2. - Application. - The following rules are going to be implemented according the ship that we are analyzing.

Rule 3. - Definitions of terms used in the Annexes. - This rule gives us some definitions of measures ships used in the naval industry.

Rule 4. - Deck line. - This rule says where we should be located the Deck line of our ship and how it should be.

Rule 5. - Load Line Mark. - Rule 5. - Load Line Mark. - This rule says where we should be located the load line mark or PLIMSOLL´s MARK in our ship, for different drafts.

Rule 6. - Lines to be used with the Load Line Mark. - This rule tells us the different types of lines to use with the Load Line Mark.

Rule 7. - Mark of assigning authority. - This rule says where we should be located the assigning authority´s initials.

Rule 8. - Details of marking. - This rule tells us what are the features of the Load Line Mark are.

Rule 9. - Verification of marks. - This rule says that a supervisor must certify that the marks are in perfect state.

CHAPTER II

CONDITIONS OF ASSIGNMENT OF FREEBOARD

Rule 10. - Information to be supplied to the master. - This rule says the captain of a ship must get all necessary information to drive the ship correctly.

Rule 11. - Superstructure end bulkheads. - This rule says the superstructures end bulkheads will be of an efficient construction.

Rule 12. - Doors. - This says the features that must have the doors depending of the place where those are located.

Rule 13. - Position of hatchways, doorways and ventilators. - This rule tells us the type of the Position of hatchways, doorways and ventilators that we have in our ship.

10

Page 11: Project 1 Vargas_cuenca

Rule 14. - Cargo and other hatchways. - This rule says the features of the Cargo and other hatchways to hold the watertight.

Rule 15. - Hatchways closed by portable covers and secured watertight by tarpaulins and battening devices.- This rule says the features for Hatchway coamings, Hatchway covers, Portable beams, Pontoon covers, Carriers or sockets, Cleats, Battens and wedges , Tarpaulins, Security of hatchway covers.

Rule 16. - Hatchways closed by watertight covers of steel or other equivalent material fitted with gaskets and clamping devices.- This rule give us the features for Hatchway coamings, Watertight covers, Means for securing water tightness.

Rule 17. - Machinery space openings. - This rule says the features of the machinery space openings according the type of the position.

Rule 18. - Miscellaneous openings in freeboard and superstructure decks. - This rule tells us how we should locate the Manholes and flush scuttles and Openings in freeboard decks.

Rule 19. - Ventilators. - This rule says how must be located and adecuated the ventilators in our ship.

Rule 20. - Air pipes. - This rule says what should be the correct height for the air pipes when these extend over freeboard deck or over superstructure.

Rule 21. - Cargo ports and other similar openings. - This rule says what we should do to hold the watertight when we have Cargo ports and other similar openings in the sides of ships below the freeboard deck.

Rule 22. - Scuppers, inlets and discharges.- This rule says how should we locate the controls and the valves depending the features of the inlets and discharges.

Rule 23. - Side scuttles.- This rule tell us the features that should have the side scuttles in our ship.

Rule 24. - Freeing ports.- This rule says what must be the minimal area of a well depending of the length of bulwark.

Rule 25. - Protection of the crew. - This rule says the minimal requirements to hold the life of the crew in the correct state while they are sailing.

Rule 26. - Special conditions of assignment for Type "A" ships.- This rule tell us the features for the Machinery casings, Gangway and access, Hatchways, Freeing arrangements .

CHAPTER III

FREEBOARDS

Rule 27. - Types of ships. - This rule divides the ships in two types: A and B; according with the characteristics of the ship.

Rule 28. - Freeboard tables. - This rule give us several values of freeboard that we are going to use with a lineal interpolation to get intermediate values, this means that we could get any value of freeboard for any Length.

11

Page 12: Project 1 Vargas_cuenca

Rule 29. - Correction to the freeboard for ships less than 100 meters (328 feet) in length. - This rule gives us the correction for ships type B with Length between 24 and 100 meters.

Rule 30. - Correction for block coefficient. - This rule says that we must do a correction due to Block coefficient, where this Cb value can’t be less than 0.68

Rule 31. - Correction for depth. - This rule give us the correction due depth and for this we have some values and the correct value depend of the depth height of our ship.

Rule 32. - Correction for position of deck line. - It says that we need to do a correction due to the difference between the real depth and the freeboard depth D.

Rule 33. - Standard height of superstructure. - This rule gives us the values for the Normal height that the Superstructures should have.

Rule 34. - Length of superstructure. - This rule says what are going to be the Length of the superstructure.

Rule 35. - Effective length of superstructure. - This rule says which percentage of the Length of superstructure is what we are going to use to do another calculus.

Rule 36. - Trunks. - This rule tell us the type and the measures of the trunks in the ship.

Rule 37. - Reduction for superstructures and trunks. - This rule tells us the reduction factor due to superstructures and trunks in the ship.

Rule 38. - Sheer. - This rule shows us what are the measures of sheer and in what part of the ship must be taken.

Rule 39. - Minimum bow height. - This rule gives us the correct value for the Forward height of the ship according with length of the ship.

Rule 40. - Minimum freeboards. - This is the final freeboard that means that is the original freeboard modified by some corrections of another rules

12

Page 13: Project 1 Vargas_cuenca

SOURCE CODES

RULE 28

subroutine Rule28(FREE)real LWLcommon/MainDim/LWL,DEP,RDEP,BM,VOLcommon/SuperStr/SUH,SUL,SUB,BMHcommon/Trunk/TRH,TRL,TRBcommon/OdinateA/AP,SAP,TAP,SMcommon/OdinateF/TFP,SFP,FPcommon/Counter/m,n,p

!*** lb and fb values are taken from a table in the IMO Rules ***

dimension lb(342), fb(342)data lb/24,25,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46,47,48,49,50,51,52,53,54,55,56,57,58,59,60,61,62,63,64,65,66,67,68,69,70,71,72,73,74,75,76,77,78,79,80,&81,82,83,84,85,86,87,88,89,90,91,92,93,94,95,96,97,98,99,100,101,102,103,104,105,106,107,108,109,110,111,112,113,114,115,116,117,118,119,120,121,122,123,124,125,126,127,128,129,130,&131,132,133,134,135,136,137,138,139,140,141,142,143,144,145,146,147,148,149,150,151,152,153,154,155,156,157,158,159,160,161,162,163,164,165,166,167,168,169,170,171,172,173,174,175,&176,177,178,179,180,181,182,183,184,185,186,187,188,189,190,191,192,193,194,195,196,197,198,199,200,201,202,203,204,205,206,207,208,209,210,211,212,213,214,215,216,217,218,219,220,&221,222,223,224,225,226,227,228,229,230,231,232,233,234,235,236,237,238,239,240,241,242,243,244,245,246,247,248,249,250,251,252,253,254,255,256,257,258,259,260,261,262,263,264,265,&266,267,268,269,270,271,272,273,274,275,276,277,278,279,280,281,282,283,284,285,286,287,288,289,290,291,292,293,294,295,296,297,298,299,300,301,302,303,304,305,306,307,308,309,310,&311,312,313,314,315,316,317,318,319,320,321,322,323,324,325,326,327,328,329,330,331,332,333,334,335,336,337,338,339,340,341,342,343,344,345,346,347,348,349,350,351,352,353,354,355,&356,357,358,359,360,361,362,363,364,365/data fb/0.2,0.208,0.217,0.225,0.233,0.242,0.250,0.258,0.267,0.275,0.283,0.292,0.300,0.308,0.316,0.325,0.334,0.344,0.354,0.364,0.374,0.385,0.396,0.408,0.420,0.432,0.443,0.455,0.467,&0.478,0.490,0.503,0.516,0.530,0.544,0.559,0.573,0.587,0.600,0.613,0.626,0.639,0.653,0.666,0.680,0.693,0.706,0.720,0.733,0.746,0.760,0.773,0.786,0.800,0.814,0.828,0.841,0.855,0.869,&0.883,0.897,0.911,0.926,0.940,0.955,0.969,0.984,0.999,1.014,1.029,1.044,1.059,1.074,1.089,1.105,1.120,1.135,1.151,1.166,1.181,1.196,1.212,1.228,1.244,1.260,1.276,1.293,1.309,1.326,&1.342,1.359,1.376,1.392,1.409,1.426,1.442,1.459,1.476,1.494,1.511,1.528,1.546,1.563,1.580,1.598,1.615,1.632,1.650,1.667,1.684,1.702,1.719,1.736,1.753,1.770,1.787,1.803,1.820,1.837,&1.853,1.870,1.886,1.903,1.919,1.935,1.952,1.968,1.984,2.000,2.016,2.032,2.048,2.064,2.080,2.096,2.111,2.126,2.141,2.155,2.169,2.184,2.198,2.212,2.226,2.240,2.254,2.268,2.281,2.294,&2.307,2.320,2.332,2.345,2.357,2.369,2.381,2.393,2.405,2.416,2.428,2.440,2.451,2.463,2.474,2.486,2.497,2.508,2.519,2.530,2.541,2.552,2.562,2.572,2.582,2.592,2.602,2.612,2.622,2.632,&2.641,2.650,2.659,2.669,2.678,2.687,2.696,2.705,2.714,2.723,2.732,2.741,2.749,2.758,2.767,2.775,2.784,2.792,2.801,2.809,2.817,2.825,2.833,2.841,2.849,2.857,2.865,2.872,2.880,2.888,&2.895,2.903,2.910,2.918,2.925,2.932,2.939,2.946,2.953,2.959,2.966,2.973,2.979,2.986,2.993,3.000,3.006,3.012,3.018,3.024,3.030,3.036,3.042,3.048,3.054,3.060,3.066,3.072,3.078,3.084,&3.089,3.095,3.101,3.106,3.112,3.117,3.123,3.128,3.133,3.138,3.143,3.148,3.153,3.158,3.163,3.167,3.172,3.176,3.181,3.185,3.189,3.194,3.198,3.202,3.207,3.211,3.215,3.220,3.224,3.228,&3.233,3.237,3.241,3.246,3.250,3.254,3.258,3.262,3.266,3.270,3.274,3.278,3.281,3.285,3.288,3.292,3.295,3.298,3.302,3.305,3.308,3.312,3.315,3.318,3.322,3.325,3.328,3.331,3.334,3.337,&3.339,3.342,3.345,3.347,3.350,3.353,3.355,3.358,3.361,3.363,3.366,3.368,3.371,3.373,3.375,3.378,3.380,3.382,3.385,3.387,3.389,3.392,3.394,3.396,3.399,3.401,3.403,3.406,3.408,3.410,&3.412,3.414,3.416,3.418,3.420,3.422,3.423,3.425,3.427,3.428,3.430,3.432,3.433/!*** LWL is the lenght of the ship ***j = 1do while (LWL.gt.lb(j))

j = j+1end do!*** In this part we use the Line equation to interpolate the intermediate values ***slope = (fb(j)-fb(j-1))/(lb(j)-lb(j-1))FREE = (fb(j-1)) + (slope*(LWL-lb(j-1)))!*** Free is going to be the Freeboard for any LWL value ***returnend

13

Page 14: Project 1 Vargas_cuenca

RULE 30

subroutine Rule30(Fcb)

!*** LWL is the lenght of the ship ***

real LWLcommon/MainDim/LWL,DEP,RDEP,BM,VOLcommon/SuperStr/SUH,SUL,SUB,BMHcommon/Trunk/TRH,TRL,TRBcommon/OdinateA/AP,SAP,TAP,SMcommon/OdinateF/TFP,SFP,FPcommon/Counter/m,n,p

!*** Cb is the Block coefficient of the ship ***

Cb = VOL/(LWL*BM*0.85*RDEP)if (Cb.gt.0.68) then

Fcb = (Cb + 0.68)/1.36else

Fcb = 1end if

returnend

14

Page 15: Project 1 Vargas_cuenca

RULE 31 AND RULE 33subroutine Rule31_33(Fhs,Fdp)!*** LWL is the lenght of the ship ***!real LWLcommon/MainDim/LWL,DEP,RDEP,BM,VOLcommon/SuperStr/SUH,SUL,SUB,BMHcommon/Trunk/TRH,TRL,TRBcommon/OdinateA/AP,SAP,TAP,SMcommon/OdinateF/TFP,SFP,FPcommon/Counter/m,n,p!*** xl and xh values were taken from a table of the IMO rules ***dimension xl(5),xh(5)data xl/0,30,75,125,10000/data xh/1.80,1.80,1.80,2.30,2.30/!*** We are going to use a line interpolation to get intermediate values for a normal height (Hn) for a LWL value ***!i = 1do while (LWL.gt.xl(i))

i = i+1end doif ((i.eq.1).or.(i.eq.2).or.(i.eq.3)) then

Hn = 1.80else

if ((i.eq.4).or.(i.eq.5)) thenHn = 2.30

elseHn = 1.80 + ((0.50/50)*(LWL-75))

end ifend ifif (SUH.lt.Hn) then

dfb3 = SUH/Hnelsedfb3 = 1

end if! In the following block we are going to use a line interpolation to get the correction for depth for any depth value ***!if (DEP.lt.(LWL/15)) then

write (*,*) 'If the ship has closed superstructures in midship &then type the number 1 else type the number 2'

read (*,*) sif (s.eq.1) then

write (*,*) 'Please, type the length of superstructures: 'read (*,*) SULif (SUL.ge.(6*LWL/10)) then

if (LWL.ge.120) thenR = 250

elseR = (LWL/0.48)

end ifdfb1 = (DEP-(LWL/15))*R/1000

elsedfb1 = 0

end ifelse

dfb1 = 0end if

elseif (LWL.ge.120) then

R = 250else

R = (LWL/0.48)end ifdfb2 = (DEP-(LWL/15))*R/1000

end ifif (DEP.lt.(LWL/15)) then

Fhs = dfb3Fdp = dfb1

elseFhs = dfb3Fdp = dfb2

end ifreturnend

15

Page 16: Project 1 Vargas_cuenca

RULE 32

subroutine Rule32(Fdc)

!*** LWL is the lenght of the ship ***!

real LWLcommon/MainDim/LWL,DEP,RDEP,BM,VOLcommon/SuperStr/SUH,SUL,SUB,BMHcommon/Trunk/TRH,TRL,TRBcommon/OdinateA/AP,SAP,TAP,SMcommon/OdinateF/TFP,SFP,FPcommon/Counter/m,n,p

if (RDEP.ne.DEP) thenFdc = RDEP-DEP

elseFdc = 0

end if

!*** Fdc is the correction for position of deck line ***!

returnend

16

Page 17: Project 1 Vargas_cuenca

RULE 35

subroutine Rule35(SUPLe)

!*** LWL is the lenght of the ship ***!

real LWLcommon/MainDim/LWL,DEP,RDEP,BM,VOLcommon/SuperStr/SUH,SUL,SUB,BMHcommon/Trunk/TRH,TRL,TRBcommon/OdinateA/AP,SAP,TAP,SMcommon/OdinateF/TFP,SFP,FPcommon/Counter/m,n,p

!*** Hnormal is calculated with the Rule 33 ***!

dimension xl(5),xh(5)data xl/0,30,75,125,10000/data xh/1.80,1.80,1.80,2.30,2.30/i = 1do while (LWL.gt.xl(i))

i = i+1end doif ((i.eq.1).or.(i.eq.2).or.(i.eq.3)) then

Hn = 1.80else

if ((i.eq.4).or.(i.eq.5)) thenHn = 2.30

elseHn = 1.80 + ((0.50/50)*(LWL-75))

end ifend if

!*** In this part we are going to compare the value of the Real Superstructure height and the value of the Superstructure Normal height ***!

!*** Then we are going to aplplied the corresponding rule depending of the interval that we are analising to get the SuperStructure Effective Lenght (SUPLe) ***!

!*** SUPLe is the Effective Lenght due to Superstructures ***!

print *,'If the ship has closed superstructure type 1 so if the superstructure has not closed type other number: 'read *,m

if (m.eq.1) thenif (SUH.eq.Hn) then

SUPLe = SUL * (SUB/BMH)else

if (SUH.lt.Hn) thenSUPLe = SUL - (SUH/Hn)

elseif (SUH.gt.Hn) then

SUPLe = SULend if

end ifend if

elseSUPLe = 0

end if

returnend

17

Page 18: Project 1 Vargas_cuenca

RULE 36

subroutine Rule36(TRULe)real LWLcommon/MainDim/LWL,DEP,RDEP,BM,VOLcommon/SuperStr/SUH,SUL,SUB,BMHcommon/Trunk/TRH,TRL,TRBcommon/OdinateA/AP,SAP,TAP,SMcommon/OdinateF/TFP,SFP,FPcommon/Counter/m,n,p

! ***LWL is the Lenght of the ship***!dimension xl(5),xh(5)data xl/24,30,75,125,365/data xh/1.80,1.80,1.80,2.30,2.30/i = 1do while (LWL.gt.xl(i))

i = i+1end doif ((i.eq.1).or.(i.eq.2).or.(i.eq.3)) then

Hn = 1.80else

if ((i.eq.4).or.(i.eq.5)) thenHn = 2.30

elseHn = 1.80 + ((0.50/50)*(LWL-75))

end ifend if

!*** TRLe is the lenght of the trunk ***!!*** TRL is the lenght of the trunk ***!!*** BM is the mean Beam value ***!!*** TRB is the mean breadth of the trunk ***!!*** TRULe is the effective lenght of a trunk that has been modified by an correction factor ***!

print *,'If the ship has trunk type 1 so if the ship has not trunk type other number: 'read *,n

if (n.eq.1) thenTRLe = TRL - (TRB/BM)if (TRH.lt.Hn) then

RH = SUH/HnTRULe = TRLe - RH

elseRH = 0TRULe = TRLe - RH

end ifelse

TRULe = 0end ifreturnend

18

Page 19: Project 1 Vargas_cuenca

RULE 37

subroutine Rule37(dFr1,dFr2)!*** Reduction for Superstructures and Trunks ***!real LWL!*** LWL is the variable corresponding to the Lenght of the ship in meters ***!common/MainDim/LWL,DEP,RDEP,BM,VOLcommon/SuperStr/SUH,SUL,SUB,BMHcommon/Trunk/TRH,TRL,TRBcommon/OdinateA/AP,SAP,TAP,SMcommon/OdinateF/TFP,SFP,FPcommon/Counter/m,n,p

dimension xl(5),fr(5)data xl/0,24,85,122,1000/data fr/0.35,0.35,0.86,1.07,1.07/

dimension xle(11),pr(11)data xle/0,0.1,0.2,0.3,0.4,0.5,0.6,0.7,0.8,0.9,1/data pr/0,0.07,0.14,0.21,0.31,0.41,0.52,0.63,0.753,0.877,1/

call Rule35(SUPLe)call Rule36(TRULe)

EL = SUPLe + TRULe

!*** Le is the variable to name the Total Lenght which is the Sum of the Superstructure Lenght (SUPLe) and the Trunk Lenght (TRULe) ***!!*** In this part we are going to have several values depending of the interval where the Le values are located, to calculated intermediate values of Le, we did an interpolation between each limits of each interval ***!

if (EL.eq.LWL) thenj = 1do while (LWL.gt.xl(j))

j = j+1end doslope = (fr(j)-fr(j-1))/(xl(j)-xl(j-1))dFr1 = -abs((fr(j-1)) + (slope*(LWL-xl(j-1))))

elsedFr1 = 0

end if

if (EL.lt.LWL) thenTLE = EL/LWLi = 1do while (TLE.gt.xle(i))

i = i+1end doslop = (pr(i)-pr(i-1))/(xle(i)-xle(i-1))dFr2 = (pr(i-1)) + (slop*(TLE-xle(i-1)))

elsedFr2 = 1

end if

returnend

19

Page 20: Project 1 Vargas_cuenca

RULE 38

subroutine Rule38(Fsheer)real LWL!*** LWL is the lenght of the ship ***!common/MainDim/LWL,DEP,RDEP,BM,VOLcommon/SuperStr/SUH,SUL,SUB,BMHcommon/Trunk/TRH,TRL,TRBcommon/OdinateA/AP,SAP,TAP,SMcommon/OdinateF/TFP,SFP,FPcommon/Counter/m,n,p

dimension xl(5),xh(5)data xl/0,30,75,125,1000/data xh/1.80,1.80,1.80,2.30,2.30/dimension sl(11),rs(11)data sl/0,100,200,300,400,500,600,700,800,900,1000/data rs/0.0,0.125,0.25,0.375,0.5,0.625,0.75,0.875,1.0,1.125,1.25/i = 1do while (LWL.gt.xl(i))

i = i+1end doif ((i.eq.1).or.(i.eq.2).or.(i.eq.3)) then

Hn = 1.80else

if ((i.eq.4).or.(i.eq.5)) thenHn = 2.30

elseHn = 1.80 + ((0.50/50)*(LWL-75))

end ifend ifif (SUH.gt.Hn) then

Z = SUH - Hnelse

Z = 0end ifj = 1do while (LWL.gt.sl(j))

j = j+1end doslope = (rs(j)-rs(j-1))/(sl(j)-sl(j-1))csheer = (rs(j-1)) + (slope*(LWL-sl(j-1)))!*** SHEER FORWARD HALF ***!SHEERF = 0do sli = 0,(LWL/2),(LWL/6)

if (sli.eq.0) thenARRF = ((50*((LWL/3)+10))/1000) + ZFF = 1

elseif (sli.eq.(LWL/6)) then

ARRF = ((22.2*((LWL/3)+10))/1000) + (0.444*Z)FF = 3

elseif (sli.eq.(LWL/3)) then

ARRF = ((5.6*((LWL/3)+10))/1000) + (0.111*Z)FF = 3

elseARRF = ZFF = 1

end ifend if

end ifSFNORMAL = SHEERF + (ARRF*FF)end doSFREAL = (1*SM)+(3*TFP)+(3*SFP)+(1*FP)

if (SFNORMAL.ne.SFREAL) thendSF = abs((SFREAL - SFNORMAL)/8)

elsedSF = 0

end if

20

Page 21: Project 1 Vargas_cuenca

!*** SHEER AFTER HALF ***!SHEERA = 0do slo = (LWL/2),LWL,(LWL/6)

if (slo.eq.(LWL/2)) thenARRA = ZFA = 1

elseif (slo.eq.(2*LWL/3)) then

ARRA = ((2.8*((LWL/3)+10))/1000) + (0.111*Z)FA = 3

elseif (slo.eq.(5*LWL/6)) then

ARRA = ((11.1*((LWL/3)+10))/1000) + (0.444*Z)FA = 3

elseARRA = ((25*((LWL/3)+10))/1000) + ZFA = 1

end ifend if

end ifSANORMAL = SHEERA + (ARRA*FA)end doSAREAL = (1*AP)+(3*SAP)+(3*TAP)+(1*SM)if (SANORMAL.ne.SAREAL) then

dSA = abs((SAREAL - SANORMAL)/8)else

dSA = 0end if!*** Variation from standard sheer profile ***!if ((SAREAL.gt.SANORMAL).and.(SFREAL.lt.SFNORMAL)) then

dfbs1 = -dSFelse

dfbs1 = 0end ifif ((SFREAL.gt.SFNORMAL).and.(SAREAL.gt.(0.75*SANORMAL))) then

dfbs2 = -(dSA + dSF)else

dfbs2 = 0end ifif (SAREAL.lt.(0.5*SANORMAL)) then

dfbs3 = -dSAelse

dfbs3 = 0end ifif ((SAREAL.gt.(0.5*SANORMAL)).and.(SAREAL.lt.(0.75*SANORMAL))) then

dfbs4 = -(0.625*dSF)else

dfbs4 = 0end ifdfbs = (dfbs1+dfbs2+dfbs3+dfbs4)*(0.75-(SUL/(2*LWL)))!*** Correction of freeboard due sheer ***!

if ((SAREAL+SFREAL).lt.(SANORMAL+SFNORMAL)) thenFsheer = abs(dfbs)

elseif (p.eq.1) then

if (SUL.eq.(0.5*LWL)) thenFsheer = -abs(dfbs)

elseif (SUL.lt.(0.5*LWL)) then

Fsheer = csheerend if

end ifelse

Fsheer = 0end if

end ifreturnend

21

Page 22: Project 1 Vargas_cuenca

RULE 39

subroutine Rule39(HPr)real LWL

!*** LWL is the lenght of the ship ***!

common/MainDim/LWL,DEP,RDEP,BM,VOLcommon/SuperStr/SUH,SUL,SUB,BMHcommon/Trunk/TRH,TRL,TRBcommon/OdinateA/AP,SAP,TAP,SMcommon/OdinateF/TFP,SFP,FPcommon/Counter/m,n,p

Cb = VOL/(LWL*BM*0.85*RDEP)

!*** Cb is the Block coefficient of the ship ***!!*** VOL is the displacement volume of the ship ***!!*** In the next block we are going to get the height of the Forward of the ship, and to do that, we used a line interpolation to get intermediate values of HPr for any LWL value ***!

if (Cb.gt.0.68) thenif (LWL.lt.250) then

HPr = (56*LWL*(1-(LWL/500))*((1.36)/(Cb+0.68)))/1000else

HPr = (7000*(1.36/(Cb+0.68)))/1000end if

elseHPr = 0

end if

returnend

22

Page 23: Project 1 Vargas_cuenca

RULE 40

subroutine Rule40(FINALFREE)real LWL!*** LWL is the lenght of the ship ***!common/MainDim/LWL,DEP,RDEP,BM,VOLcommon/SuperStr/SUH,SUL,SUB,BMHcommon/Trunk/TRH,TRL,TRBcommon/OdinateA/AP,SAP,TAP,SMcommon/OdinateF/TFP,SFP,FPcommon/Counter/m,n,p

call Rule28(FREE)call Rule30(Fcb)call Rule31_33(Fsh,Fdp)call Rule32(Fdc)call Rule35(SUPLe)call Rule36(TRULe)call Rule37(dFr1,dFr2)call Rule38(Fsheer)call Rule39(HPr)!*** In the next block we will get the final Freeboard with all corrections ***!

FREE0 = FREEFREE1 = FREE0 * FcbFREE2 = FREE1 + FdpFREE3 = FREE2 * FshFREE4 = FREE3 + FdcFREE5 = FREE4 + dFr1FREE6 = FREE5 * dFr2FREE7 = FREE6 + Fsheer

FINALFREE = FREE7

returnend

23

Page 24: Project 1 Vargas_cuenca

MAIN PROGRAM

real LWL!*** LWL is the lenght of the ship ***!

character * 40 ShipName,dfile,rfilecommon/MainDim/LWL,DEP,RDEP,BM,VOLcommon/SuperStr/SUH,SUL,SUB,BMHcommon/Trunk/TRH,TRL,TRBcommon/OdinateA/AP,SAP,TAP,SMcommon/OdinateF/TFP,SFP,FPcommon/Counter/m,n,p

print *,'Please, type the name of the data file: 'read (*,50)dfileopen (1,file=dfile,status='old')read (1,50)ShipName

print *,'If the ship has closed superstructure type 1 so if the superstructure has not closed type other number: 'read *,mprint *,'If the ship has trunk type 1 so if the ship has not trunk type other number: 'read *,nprint *,'If the ship has closed superstructure in the middle of the ship type 1 so if the closed superstructure is not in the middle of the ship type other number: 'read *,p

print *,'Please, type the name of the result file: 'read (*,50)rfileopen (6,file=rfile)50 format (A40)read (1,*) LWL,DEP,RDEP,BM,VOL,SUH,SUL,SUB,BMH,TRH,TRL,TRB,AP,SAP,TAP,SM,TFP,SFP,FPcall Rule28(FREE)call Rule30(Fcb)call Rule31_33(Fsh,Fdp)call Rule32(Fdc)call Rule35(SUPLe)call Rule36(TRULe)call Rule37(dFr1,dFr2)call Rule38(Fsheer)call Rule39(HPr)call Rule40(FINALFREE)write (6,100)ShipName,LWL,DEP,BM,VOL,FREE,Fcb,Fsh,Fdp,Fdc,SUPLe,TRULe,dFr1,dFr2,Fsheer,HPr,FINALFREE100 format('For the ship: ',A40,//,&

'LENGTH: ',f10.2,' meters',/,&'DEPTH: ',f10.2,' meters',/,&'BEAM: ',f10.2,' meters',/,&'VOLUME: ',f10.2,' cubic meters',//,&'THE ORIGINAL FREEBOARD IS: ',f10.2,' meters',//,&'* The correction due to block coefficient is: ',f10.2,/,&'* The correction due to height of superstructure is: ',f10.2,/,&'* The correction due to depth is: ',f10.2,' meters',/,&'* The correction due to deck line is: ',f10.2,' meters',/,&'* The Effective Lenght of Superstructures is: ',f10.2,' meters',/,&'* The Effective Lenght of Trunk is: ',f10.2,' meters',/,&'* The correction of freeboard due to superstructures and trunks,',/,&' if effective length is the length of the ship is: ',f10.2,' meters',/,&'* The correction of freeboard due to superstructures and trunks,',/,&' if effective length is less than length of the ship is: ',f10.2,/,&'* The correction of freeboard due to sheer is: ',f10.2,' meters',/,&'* The minimum bow height is: ',f10.2,' meters',/,&//'THE FINAL FREEBOARD IS: ',f10.2,' meters')

!*** In this part we show all corrections and the final Freeboard ***!stopend

24