Você está na página 1de 1

Faculty of Maritime Engineering and Biological, Ocean and Natural

Resources Sciences
Applied Programming I
Homework No 1

November, 2014

1.- Prepare a flow chart to implement the method of Bisection to find the roots of an equation
(blow the dust out of your Numerical Analysis course notes). Prepare then a VFortran computer
program to solve the following equation, for the Friction factor, f, for the turbulent flow in a tube,
as a function of the Reynolds number, Re and the Roughness ratio, /D:
/D
1
2.51
2.0 log

.
3.7
f
ReD f

As an application, calculate the Friction factor for different values of relative roughness ( / D
=0.0001, 0.001, 0.01 y 0.05) and varying the Reynolds number between 2.0x104 and 1.0x107,
with increments of 1.0x105. Compare your results with those presented in Fox and McDonald.
Problems 2 and 3 are related to the International Maritime Organization Load Lines
convention (2005), so it is suggested to get a photocopy of that reference:
2.- Prepare first a flow chart and then a VF computer program to interpolate the basic
Freeboard that a ship of type A must have, according to the International Maritime Organization
Load lines Convention. In Table A of rule 28, chapter III, a table may be found for the basic
Freeboard as a function of ships length, between 24 and 365 meters.
The user of the program must input the length in meters, and the program produces as a result
an interpolated value for the freeboard. As a test, calculate and print the freeboard for a range
of ships length between 90 and 100 meters, with a 0.50 meter increment.
Suggestion: use the data statement to include the information from table B. Then find
the interval where the particular length is located, and finally develop a linear
interpolation.

3.- Prepare first a flow chart and then a VF computer program to implement rule 38 from chapter
III of the above mentioned reference, for ships of type A. In the program, the user is required to
input height of the sheer line at different positions along the length of the ship, and the program
is expected to output the Reduction in Freeboard. Prepare a case example.

4.- Develop an Static library containing a subroutine to solve a system of linear algebraic
equations. The solution scheme must include Pivotting , and you may take the source code
from the appendix of any Numerical Analysis book.
The input variables for the subroutine must be:

the order of the equation system,

the coefficient matrix,

the independent term vector, and

the solution vector.


Prepare as a check a main program, that calls the subroutine, and in the VF Project include the
Static library. In the report, include an example.
For each problem you have to write an Executive Summary at the beginning, and comments on the
results at the end. Do not forget: for each problem you must report the number of hours employed
to solve them, and reviewed references.
Due date: 21/November/2014, prior to the Practical Evaluation 1

Você também pode gostar