Presentation is loading. Please wait.

Presentation is loading. Please wait.

Engineering Analysis – Computational Fluid Dynamics –

Similar presentations


Presentation on theme: "Engineering Analysis – Computational Fluid Dynamics –"— Presentation transcript:

1 Engineering Analysis – 804 441 Computational Fluid Dynamics – 804 416
Faculty Name Prof. A. A. Saati

2

3 Part 3 - Approximate Solutions of Differential Equations
Introductory Remarks Taylor Series Expansion Solutions of Differential Equations

4 Introductory Remarks The ODE & PDE must be expressed as approximate expressions, so that a digital computer can be employed to obtain a solution There are two methods for approximating the differentials of the function f First method of approximation often used is the Taylor series Second method is the use of a polynomial of degree n.

5 Taylor Series Expansion:
Given a function f(x), which is analytical, can be expanded in a Taylor series about x as

6 Forward Difference Formulations
Solving for one obtains The truncation error of order

7 Finite Difference Formulations
If the subscript index i is used to represent the discrete point in the x-direction The truncation error of order This equation is known as forward difference of order

8 Backward Difference Formulations
Now consider the Taylor series expansion of about x. Solving for one obtains This is known as backward difference of order

9 Central Difference Formulations
Now consider the Taylor series expansion of and about x. Subtracting the above equations, one obtains: Solving for

10 Forward & Backward Difference Formulations
Again consider the Taylor series expansion of and about x. Multiply the first equation by 2 and subtract it from the second equation: Solving for

11 Forward Difference Formulations
Solving for

12 Backward Difference Formulations
A similar approximation for B.D. using the Taylor series expansions of and about x. The result is

13 Center Difference Formulations
Approximation expression for higher order derivatives Now consider the Taylor series expansion of and about x. Add the above equations, one obtains the center difference:

14 Forward Difference Formulations
Now by considering additional terms in the Taylor series expansion, a more accurate approximation of the derivatives is produced. Consider the Taylor series expansion, Solving for

15 Substitute a forward difference expression for
And 0ne obtains a second-order for

16 Forward & Backward Difference Formulations
The finite difference approximation to the time derivative is expressed for a forward and backward difference as

17 Finite Difference Formulations
1 –FD 2 – BD 3 – CD 4 – FD 5 - BD

18 Finite Difference Formulations
6 - FD 7 – BD 8 – CD 9 – FD 10 - BD

19 Read Example: 2.1 , 2.2, 2.3, & 2.4 2.6, 2.7, & 2.8

20 Solutions of Differential Equations
Example: Given the function compute the first derivative of f at x = 2 using forward and back ward difference of order Compare the results with a central differencing of order and the exact analytical value. Use a step size of Solution: Form Eq.1 With

21 Example (cont.) The back ward of order

22 Example (cont.) The central differencing of order The exact value is

23 Example (cont.) Read Example: 2.6, 2.7, & 2.8

24 Home work Solve problems: 2.7 2.12

25 Finite Difference Equations
( FDE )

26 Finite Difference Equations
The finite difference approximations are replace the derivatives that appear in the PDEs. Consider the following example, where f is f = f(t,x,y). Assume is constant. Let represent Assume are constant step. Now use forward difference in time And use center difference in space.

27 Finite Difference Equations
Now use forward difference in time And use center difference in space.

28 Finite Difference Equations
The finite difference formulation of PDE is: Note that in this formulation, the spatial approximations are applied at time level n This lead to one unknown This equation is classified as explicit formulation

29 Finite Difference Equations
The second case evaluated the spatial approximations at n+1 time level. Therefore, the first-order backward difference approximation in time is employed The finite difference formulation for PDE takes the form: This lead to 5 unknown This equation is classified as implicit formulation

30 Applications

31 Applications Example 2.2

32

33

34

35

36

37

38

39

40

41

42

43

44

45

46

47 Finite Difference Approximation of Mixed Partial Derivatives

48 Finite Difference Approximation of Mixed Partial Derivatives
Approximating mixed partial derivatives can be performed by using Taylor series expansion for two variables Consider The Taylor series expansion for two variables x and y, become as

49 Taylor Series Expansion
Using indices to represent a grid point at x, y. Similarly, the expansion

50 Taylor Series Expansion
And the expansion

51 Taylor Series Expansion
From the above four equations Finite difference approximation of higher order derivatives may be obtained by following the same procedure

52 The use of Partial Derivatives with Respect to one Independent Variable
The approximate expansion for partial derivatives have already been developed. These expressions can now be used to compute mixed partial derivatives. Consider Using central differencing of for

53 The use of Partial Derivatives with Respect to one Independent Variable
Therefor, Now apply central differencing of for or

54 The use of Partial Derivatives with Respect to one Independent Variable
A second example, consider which is of order In this example, use forward differencing for all derivatives

55 The use of Partial Derivatives with Respect to one Independent Variable
Similar approximations can be obtain by using Backward differencing for the derivatives, or Using FD for x derivatives and BD for y, or vice versa The finite difference approximations in this chapter will be used in the following chapters to formulate various FDEs of model PDEs.

56

57 Problems

58 Problems 2.1 Derive a central difference approximation for which is of order 2.2 Determine an approximate backward difference representation for which is of order , given evenly spaced grid points by mean of: Taylor series expansions. A backward difference recurrence formula. 2.3 Find a forward difference approximation of the order for

59 2.8 Problems 2.5 Derive a first- order backward finite difference approximation for the mixed partial derivative 2.6 Derive a third-order accurate, forward difference approximation for 2.7 Given the function using forward and backward difference representations of order Use step sizes of 0.01, 0.1 and Compare and discuss your findings. 2.8 Solve problem 2.7 using a second-order accurate central difference approximation.

60 2.8 Problems 2.9 Compute the first derivative of the function at x=1.5, using first-order forward and backward approximation. Use step sizes of 0.01, 0.1, 0.5, and discuss the results. 2.10 Use the second-order accurate central difference approximation and the first-order forward difference approximation to evaluate at x=1. A step size of is to be employed. Recall that e=

61 2.8 Problems

62

63

64

65

66

67

68

69 END OF Ch. 2


Download ppt "Engineering Analysis – Computational Fluid Dynamics –"

Similar presentations


Ads by Google