Documents

CFD_Assignments_1_2_3.pdf

Categories
Published
of 6
All materials on our website are shared by users. If you have any questions about copyright issues, please report us to resolve them. We are always happy to assist you.
Related Documents
Share
Description
ME 652 Computational Fluid Dynamics Assignment: 1 1. Write a program to evaluate the function using the series approximation (Note that   + + + + = ! 3 ! 2 1 3 2 x x x e x ). The evaluation is considered complete when two successive summations do not differ by more than 10 -5 . Use your program to evaluate e -x for x = 1, 5, 10, 100. Compute the values using single and double precision. 2. The floating point arithmetic is characterized by machine epsilon,
Transcript
  ME 652 Computational Fluid Dynamics Assignment: 1   1. Write a program to evaluate the function   using the series approximation (Note that   !3!2 1 32  x x xe  x ). The evaluation is considered complete when two successive summations do not differ by more than 10 -5 . Use your program to evaluate e -x  for x = 1, 5, 10, 100. Compute the values using single and double precision. 2. The floating point arithmetic is characterized by machine epsilon, the smallest floating  point number   such that 1+   >1. Write a program to determine epsilon for your machine. The most common way to do this is to initialise a variable to 1, and keep halving it and adding it to 1 and checking if the result is greater than 1. 3. Write a computer program to determine (a) Numbers between -100 and +100 that are exactly divisible by 3. (b) Numbers between 0 and 10 5  whose sum of the digits is 11. (c) Value of π  from sin ( π  / 2) = 1 and tan (π  / 4) = 1. 4. Print the following: (a) The value of π  in F  –   format. (b) The value of π  in E  –   format. (c) The value of π  in Free  –   format. 5. The series solution to a steady 2 D  –   conduction problem is given by: )sinh()sin( )sinh(])1(1[2 ),( 1  a yna xnnn y xT  nn          For square computational domain of length = a, determine minimum values of n for 5-digit accuracy in computed value of T(0.25,0.50), T(0.50,0.50), T(0.75,0.50), T(0.50,0.25), T(0.50,0.75). The boundary conditions are 0)0,(),(),0(    y xT  ya xT  y xT  , 1),(    a y xT  . Assume a=1. 6. The series solution to a transient 1 D  –   Conduction problem is given by:     )(3  )sin(8),( 22 odd nt na nxnet  xT      If the length of computational domain is taken as π, d etermine minimum values of n for 5  –   digit accuracy in computed value of )01.0,2/(    t  xT      , )5.0,2/(    t  xT      ,  )75.0,2/(    t  xT      ,  )1,2/(    t  xT     . The initial and boundary conditions are ),()0,(  x xt  xT        0),(),0(    t  xT t  xT      . Assume  1)/(    p ck     . 7. Solve the transcendental equation (use any method) cot ( λ   b) = ( λ   k / h) to determine first five (5) values of λ  n . Given: b = 5 cm, k = 30 W / m-K, h = 15 W / m 2    –   K. 8. The following data relate to solar radiation: Time 9 10 11 12 13 14 15 16 Flux (kW/m 2 ) 0.6 0.79 0.9 0.94 1.02 0.96 0.6 0.4 Write a computer program to read the above data from an input file. Confirm the reading through an output file where Time and Flux data will be in two columns with proper format. Also prepare Flux vs. Time plot. Calculate the energy falling on 1 m 2  area from 9 to 16 hours (i.e. Area under the curve).    ME 652 Computational Fluid Dynamics Assignment: 2 Problem: 1. Consider open-channel flow of water in a circular pipe of diameter D. The water level is at a height h from the lowest point in the cross-section of the pipe. Compute the value of the ratio h/D using the bisection method, when (a) 20% (b) 40% (c) 60% and (d) 80% of the cross-sectional area is occupied by air. Problem: 2. Consider the generalised equation of state given by Redlich-Kwong:   Where a = 0.4275 (R  2 T c2.5 )/p c and b = 0.08664 RT c /p c , T c and p c  being the critical temperature and pressure respectively, R is gas constant. Using this equation of state for water at a pressure of 1 bar, compute the value of the specific volume of water vapour using the Secant and the Newton ’s methods, at temperatures  varying from 100   to 300   in steps of 50  . Compare your result with the values given in steam table. Plot the error as a function iteration number for both the methods and comment. Problem: 3. Use Newto n’s method to find the roots of:  (a)   f(x) = x 2 -2x+1 (b)   f(x) = x 2 -3x+2. Both the functions have a root x=1. For both the cases, start with an initial guess x(0) = 1.1. Use double precision variables in your program. Terminate your iterations when the absolute value of f(x) is less than 10 -12 . Tabulate the value of x(k), e(k) = x(k)-1 and f(x(k)) for each iteration. Print out the number of iterations required for convergence for each case. What is the ratio e (k+1)/e(k) for the two cases? Comment on the rates of convergence for two cases. Problem: 4. Consider the quadratic equation, x 2 - 2.2 x + 1.2. Note the roots of the equation are 1 and 1.2. You are asked to find the roots of the above equation using fixed point iteration with, x = x + ω  g(x), where ω  is a relaxation parameter. Perform the following steps and comment on the result with valid justifications a.   Starting with the initial guess x = 1.10, ω  = 1.00, perform 50 iterations  b.   Starting with the initial guess x = 1.21, ω  = 1.00, perform 50 iterations c.   Starting with the initial guess x = 1.21, ω  = -1.00, perform 50 iterations d.   Starting with the initial guess x = 1.21, ω  = -5.00, perform 50 iterations e.   Starting with the initial guess x = 1.21, ω  = -8.00, perform 50 iterations  Problem: 5. Consider    . The root is approximately 0.58. Starting from this guess, use fixed point iteration to get the root. Problem: 6. Using the knowledge of FMHT regarding the uniform flow over a Rankine half  body, find the location in the surface of Rankine half body where the velocity will be maximum and the magnitude of maximum velocity.
We Need Your Support
Thank you for visiting our website and your interest in our free products and services. We are nonprofit website to share and download documents. To the running of this website, we need your help to support us.

Thanks to everyone for your continued support.

No, Thanks