



Study with the several resources on Docsity
Earn points by helping other students or get them with a premium plan
This page cannot be seen from the preview
Don't miss anything!




Exam Code(s) (^) 1BM121, 1BG121, 1EG Exam(s) (^) First Year Engineering
(Mechanical, Biomedical, Undenominated)
Module Code(s) (^) ME Module(s) (^) Engineering Computing I (Fortran)
Paper No. (^1) Repeat Paper -
External Examiner(s) (^) Professor J. Fitzpatrick Internal Examiner(s) (^) Professor P.J. Nolan
Instructions: (^) • Answer 3 questions.
Duration 2 hours No. of Pages (^) 6 Department(s) (^) Mechanical and Biomedical Engineering Course Co-ordinator(s)
Requirements : MCQ - Handout - Statistical/ Log Tables - Cambridge Tables - Graph Paper - Log Graph Paper - Other Materials -
(b) In a chemical process the partial pressures of the gases I2 and He in a mixture of gases are required. p(I2) and p(He) denote the partial pressures of I2 and He, respectively, and they are determined by a parameter z that is obtained as the solution to the following equation:
99.72 z^4 + 2.87 * 10 -7 z^2 + 6.67 * 10 -10 z - 760.0 = 0. with p(I2) = 5.23 * 10 -10 z (N/m^2 ) , p(He) = 98.64 z^4 (N/m^2 )
Draw a flowchart and write a Fortran 90 programme to determine the parameter z using the method of false position, and then evaluate p(I2) and p(He). Declare the coefficients within the code, and use the normalised error in the calculations. The progamme should request initial guesses and an error tolerance from the user. (15 points)
cos( ) 1
2 4 6 8 = − + − + +
x x x x x
Briefly explain what a recurrence relation is, and, by deriving the recurrence relation for this series, show how it can lead to programming efficiency. (4 points)
(b) Draw a flowchart and write a Fortran 95 programme to evaluate cos (x) using a recurrence relation. The result should be computed accurate to 0.1%, and the summation should be terminated after a maximum number of terms Nmax specified by the user. Read values for x and Nmax from an input file, and write the results to an output file. Include a repeat option. (16 points)
(b) The extension δ in a solid rod subjected to a tensile force P is given by the equation:
c
Draw a flowchart and write a Fortran 95 programme to evaluate δ for a given value of P. Employ the Newton-Raphson method. The programme should read values for the initial estimate
P , a , b , c ,
file. The programme should write results consisting of the final extension, the number of iterations used and the error to an output file. Include a repeat option. (12 points)