Presentation is loading. Please wait.

Presentation is loading. Please wait.

Partial Differential Equations Finite Difference Approximation.

Similar presentations


Presentation on theme: "Partial Differential Equations Finite Difference Approximation."— Presentation transcript:

1 Partial Differential Equations Finite Difference Approximation

2 A Partial Differential Equation is simply defined as an equation involving partial derivatives of two or more independent variables. For example, for the function in two independent variables f(x,y), the two partial derivatives are defined as: A general expression for a Linear Second-Order PDE in two variables would be: This type of equation is very useful in a number of engineering applications

3 The most useful types of PDEs are the following (again, in two spatial dimensions or one dimension + time ) Elliptic Parabolic Hyperbolic

4 The solution of Partial Differential Equations by analytical methods is limited to relatively few simple models Analytical methods can only deal with very simple shapes, simple boundary conditions and physical domains with constant properties throughout the domain For example, let’s say we want to evaluate the thermal stresses in an engine camshaft Numerical methods would allow us to evaluate a model of irregular geometry, mixed materials and arbitrary boundary conditions: in other words, the real camshaft Analytical methods would require a model of the part, with simple geometry, a single material and simple boundary conditions

5 Elliptic PDEs The Laplace Equation Let’s review a simple case

6 Consider the case of a 12 ft. x 12 ft. thin steel plate, perfectly insulated on both sides and touching a pipe that carries steam at 150 o C: The temperature at this edge should be 150 o C Let’s say that the temperature at the other three edges is 20 o C What would be the temperature distribution at all internal points within the plate?

7 The expression that models this 2-D steady-state problem is Laplace’s Equation: Each of the terms can be represented by a Centered Second-Order Approximation, as we did for ODEs: Note that the sum of these terms is equal to zero, which allows us to eliminate the h 2 terms (assuming we use the same h in the x and y directions !)

8 In two spatial dimensions, we can avoid the double subindices by the use of a visual grid: In the X directionIn the Y direction 1 1 1 1 -2 …but when we combine the two, we generate some overlaps - 4 To generate the equation set, we superimpose this 5-point template on each interior node

9 Now we need a discretization grid for our problem Using an h = 3 ft we would create the following grid: There are 9 internal nodes in this grid To generate the equations, we follow the same procedure as with the Boundary Value ODEs First we express the equation for each interior node… …and then we incorporate the boundary conditions

10 The following single-index node numbering will facilitate the process of writing the equations: T = 20 at these nodes … and also at these …and here Finally, T = 150 at these nodes Now we write the equations

11 To illustrate how to use the “4-point star” scheme to write the applicable equations, let’s do node 7 This is what the “star” looks like for node 7: This leads to the following equation: T 4 – 4 T 7 + T 8 + 20 + 150 = 0 or T 4 – 4 T 7 + T 8 = - 170 Note that the nodes are ordered according to their indices Using the same procedure, we can develop the complete 9 x 9 system of equations

12 This is what the 9 x 9 system looks like: This is the equation for node 7 we just did Can you see an interesting feature of this system?It’s diagonally dominant

13 Solving the system in Excel produces the following results: T 1 = 29.2857 T 2 = 32.7679 T 3 = 29.2857 T 4 = 44.3750 T 5 = 52.5000 T 6 = 44.3750 T 7 = 75.7143 T 8 = 88.4821 T 9 = 75.7143 …and this is a crude diagram of selected isotherms 30 o C 50 o C 80 o C Perhaps you notice the symmetry in the diagram… …which is a very useful characteristic of this system

14 Why is symmetry useful in this case? Because it will allow us to use a finer discretization with a modest increase of the size of the system to be solved We can use h = 2, which will force more nodes in the “y” direction… …but will use a total of just 15 internal nodes (in other words, a 15 x 15 system – less than twice those of the first attempt) However, the effective number of internal nodes will increase to 25 (because of the symmetry) Let’s have a look at the node diagram

15 This is what our finer grid looks like: It has a total of 15 internal nodes Boundary conditions on these sides are still T = 20 o C …and T=150 o C on this side …but what are the boundary conditions on this side?

16 In general, Boundary Conditions for an Elliptic Partial Differential Equation of the form: …can be of the following two types: Dirichlet conditions (value known) Neumann conditions (gradient known)

17 In our case, the left boundary of our domain (a line defined by x = constant) is also an axis of symmetry This means that the boundary is like a mirror: points of the function would have the same value as their reflection The points shown are mirror images of each other (same y, equal x of opposite sign), and hence have the same functional value (this is true for any value of h !) This means that any centered approximation we care to use for the first derivative will result in a value of zero for this derivative at the edge Another case where this must be true is at an isolated boundary: since no heat flux is permitted, the temperature gradient must be zero

18 In practical terms, this means that we have to adjust our “star shaped” template for the partial derivatives: This temperature …is equal to this temperature We can “fold the edge” to reflect this

19 The 15 x 15 system of equations looks like this

20 The numerical results are:

21 The isotherm diagram resulting from the refined mesh is 30 o C 40 o C 60 o C 100 o C Note that symmetry allowed us to deal only with the shaded half Without the use of symmetry, we would have needed 25 internal nodes, and hence a 25 x 25 system of equations, instead of the 15 x 15 we just solved

22 Earlier in this class I praised Numerical Methods for PDEs, for their ability to deal with real problems, not idealized models of reality There are three main issues that limit analytical methods: 1.Irregular geometry 2.Arbitrary boundary conditions, and 3.Non-homogeneous material properties Methods based on Finite Difference Approximations (such as the examples we have seen today), can only deal with the first two issues To deal with anisotropy (non-constant properties in the medium, perhaps due to the use of mixed materials of construction), we would need to use the Finite Element Method

23 Arbitrary boundary conditions we have already used; let’s discuss how arbitrary geometry can be dealt with, using the Finite Difference Method Say you want to model the face of Homer Simpson Well, just the 2-D profile. You would have to decide on a mesh size, and place it over the model …and then trim the mesh to approximate the model You will have to find a mesh size that is practical, and yet accurate enough

24 Let’s try another problem in Excel

25 The boiler support problem (A problem with a high degree of bogusity) Imagine a tank, in use for storage of boiling water The tank is made of metal plates, supported from the inside with semi-circular concrete columns The circular surface of the column is in contact with boiling water (100 o C) The flat surface of the column is in contact with the metal wall (essentially at 0 o C)

26 A cross section of the column Since the temperatures are the same along the "vertical" dimension z, this can be modeled as a 2-D problem We want the temperature at this point, which is located at the horizontal center, a distance equal to 0.6R from the "cold side"

27 Overlaying the grid The first step to discretization is to lay a square grid over the domain The actual contour is hard to replicate

28 This is the best we can do* We'll assume we know T at the "white" nodes...and make use of symmetry along this side * given the limitations of the grid size we have chosen!

29 The final grid Even a coarse grid, with symmetry, results in a fairly large number of nodes We want the T at this node (analytical solution is T = 68.8083 o C)

30 Let's have a look at the Excel solution, compared to the analytical solution

31 And now, an assignment (From a recent final exam!)

32


Download ppt "Partial Differential Equations Finite Difference Approximation."

Similar presentations


Ads by Google