PONTOON WATERLINE ESTIMATION ALGORITHM (C LANGUAGE)

4
PONTOON WATERLINE ESTIMATION ALGORITHM Pontoon is a float to support a structure or system on the water. For instance, pontoon is used to mount dewatering pump in mining area. The shape of several pontoons is common, as depicted below: Writer is not familiar with the subject of marine or its derivatives, so just let me make my own notation for the parameters, use only for this article, not for general standardized textbook. OW : Overall Width OL : Overall Length OH : Overall Height Ot : Overall Height to the upper end of trapezoid bottom BottomFlatLength : Length of Flat Horizontal Bottom Face Oh : Waterline/ Immersed height Archimedes Law applied: body weight equals the weight of water displaced by the body’s immersed volume. Displaced water volume is the immersed volume of pontoon. Based on this principle, to find how deep the pontoon immersed to the water, we should find the immersed volume first. Pontoon’s width and length are known, if the volume is known, then the height can be calculated. Finding volume is by calculating how much water needed to equal the to total weight of pontoon (the pontoon, payload, accessories, and everything else onboard). Mathematically, we can write the formula as: WeightOfWaterDisplaced = 1000 x PontoonImmersedVolume = 1000 x OL x OW x Oh

description

PONTOON WATERLINE ESTIMATION ALGORITHMPontoon is a float to support a structure or system on the water. For instance, pontoon is used to mount dewatering pump in mining area. The shape of several pontoons is common, as depicted below:Writer is not familiar with the subject of marine or its derivatives, so just let me make my own notation for the parameters, use only for this article, not for general standardized textbook. OW OL OH Ot : Overall Width : Overall Length : Overall Height : Overal

Transcript of PONTOON WATERLINE ESTIMATION ALGORITHM (C LANGUAGE)

Page 1: PONTOON WATERLINE ESTIMATION ALGORITHM (C LANGUAGE)

PONTOON WATERLINE ESTIMATION ALGORITHM

Pontoon is a float to support a structure or system on the water. For instance, pontoon is used to mount dewatering pump in mining area. The shape of several pontoons is common, as depicted below:

Writer is not familiar with the subject of marine or its derivatives, so just let me make my own notation for the parameters, use only for this article, not for general standardized textbook.

OW : Overall Width

OL : Overall Length

OH : Overall Height

Ot : Overall Height to the upper end of trapezoid bottom

BottomFlatLength : Length of Flat Horizontal Bottom Face

Oh : Waterline/ Immersed height

Archimedes Law applied: body weight equals the weight of water displaced by the body’s immersed volume. Displaced water volume is the immersed volume of pontoon. Based on this principle, to find how deep the pontoon immersed to the water, we should find the immersed volume first. Pontoon’s width and length are known, if the volume is known, then the height can be calculated. Finding volume is by calculating how much water needed to equal the to total weight of pontoon (the pontoon, payload, accessories, and everything else onboard). Mathematically, we can write the formula as:

WeightOfWaterDisplaced = 1000 x PontoonImmersedVolume

= 1000 x OL x OW x Oh

Page 2: PONTOON WATERLINE ESTIMATION ALGORITHM (C LANGUAGE)

However, there is tricky problem: pontoon shape is not a simple rectangular block, the bottom is trapezoid. For simplification, the ends of trapezoid are of 45 degree angled. To solve this, we split the volume into two parts, bottom part: trapezoid; upper part: rectangular. For further simplification, just consider it’s rectangular and add correction factor. But in this article we don’t use the latter simplification for improving accuracy.

If the total weight does not reach the weight of water with volume of lower trapezoidal, then calculation is only using volume of trapezoidal.

WeightOfDisplacedWater = 1000 x OL x [(BottomFlatLength x Oh) + 2(Oh x Oh / 2)]

= 1000 x OL x (BottomFlatLength x Oh + Oh2)

Terms (Oh x Oh / 2) is the area of triangular end of trapezoid. The 45 degree angle makes triangle become the same length of its two sides, its vertical side and its bottom horizontal side.

If total weight exceeds the weight of water with volume of lower trapezoidal, it means that two area parts should be calculated. The bottom trapezoid is fully immersed, so it can be calculated because all variables known. The case is now how much volume should be added to the trapezoidal volume.

WeightOfDisplacedWater = 1000 x OL x [(BottomFlatLength x Ot) + (Ot x Ot) + (OL x (Oh-Ot))]

To find Oh, iteration can be used. I use C for doing this. Flowchart is below:

START

OW, OL, OH, Oh, Ot, BottomFlatLength, TotalWeight

WeightOfDisplacedWater at Volume of Bottom Trapezoidal

1000*(BottomFlat*Ot + Ot^2)

TotalWeight >

1000*(BottomFlat*Ot + Ot^2)

WeightOfDisplacedWater = 1000 x OL x [(BottomFlatLength x Ot) + (Ot x Ot) + (OL x (Oh-Ot))]

WeightOfDisplacedWater = 1000 x OL x [(BottomFlatLength x Oh) + 2(Oh x Oh / 2)]

Oh

END

YES NO

ITERATE

Page 3: PONTOON WATERLINE ESTIMATION ALGORITHM (C LANGUAGE)

C PROGRAM LISTING

#include <stdio.h>

main()

{

float OL, OW, OH, Oh, Ot, BottomFlatLength, WeightTotal, WWaterAngled, W;

//WWaterAngled = Weight of Water at volume equals lower trapezoid’s volume

//W = Weight of Water displaced by pontoon

char again; //prepared for do-while loop

printf ("PONTOON WATERLINE ESTIMATION CALCULATOR BY DICKY\n \n"); //title

again = 'y';

do

{

//input data

printf("Overall Top Length (cm)? "); scanf("%f",&OL);

printf("Overall Width (cm)? "); scanf("%f",&OW);

printf("Overall Height (cm)? "); scanf("%f",&OH);

printf("Overall Angled Height (cm)? "); scanf("%f",&Ot);

printf("Bottom Flat Length (cm)? "); scanf("%f",&BottomFlatLength);

printf("Total Weight (cm)? "); scanf("%f",&WeightTotal);

//checking water height to upper end of angled face

WWaterAngled = 1000*(OW/100)*((BottomFlatLength*Ot/10000)+(Ot*Ot/10000));

if (WeightTotal>WWaterAngled) // if total pontoon weight > weight of water at lower trapezoid's volume

{

Oh = 1;

do //find at what height the displaced water volume equals total pontoon weight

{

W=1000*(OW/100)*((BottomFlatLength*Ot/10000)+(Ot*Ot/10000)-(OL*Ot/10000)+(OL*Oh/10000));

Oh=Oh+0.0001; // iterate Oh to closest value to W, increment of 0.0001

}

while (W<WeightTotal);

}

else // if total pontoon weight < weight of water at lower trapezoid's volume

{

Oh = 1;

do //find at what height the displaced water volume equals total pontoon weight

{

W=1000*(OW/100)*((BottomFlatLength*Oh/10000)+(Oh*Oh/10000));

Oh=Oh+0.0001;

}

Page 4: PONTOON WATERLINE ESTIMATION ALGORITHM (C LANGUAGE)

while (W<WeightTotal);

}

//show results

printf("Waterline (cm)= %.2f \n \n",Oh); //return waterline value (immersed height)

printf("calculate again (y/n)? "); scanf("%s",&again); //ask for next calc

printf("\n\n"); //provide space

}

while (again == 'y');

}

Dicky J Silitonga