Presentation is loading. Please wait.

Presentation is loading. Please wait.

Discretization Methods Chapter 2. Training Manual May 15, 2001 Inventory #001478 2-2 Discretization Methods Topics Equations and The Goal Brief overview.

Similar presentations


Presentation on theme: "Discretization Methods Chapter 2. Training Manual May 15, 2001 Inventory #001478 2-2 Discretization Methods Topics Equations and The Goal Brief overview."— Presentation transcript:

1 Discretization Methods Chapter 2

2 Training Manual May 15, 2001 Inventory #001478 2-2 Discretization Methods Topics Equations and The Goal Brief overview of Finite Difference and Finite Volume Methods Finite Element Method of FLOTRAN –Transient Terms –Source Terms –Non-Linear Advection Terms –Diffusion Terms –The FLOTRAN Pressure Equation

3 Training Manual May 15, 2001 Inventory #001478 2-3 Different Approaches Finite Difference –Original CFD Technique –Based on Difference Equations –Mesh and Cell Limitations Finite Volume –Popular CFD technique –Based on Flow in and out of volumes Finite Elements (FLOTRAN) –Galerkin’s Method of Weighted Residuals –A discipline of ANSYS Multiphysics

4 Training Manual May 15, 2001 Inventory #001478 2-4 Basic Equations Transport Equations –Navier-Stokes –Turbulence –Energy Basic Form –Unknown: Φ –Generalized Diffusion Coefficient: ΓΦ Types of Terms –Transient, Advection, Source, Diffusion

5 Training Manual May 15, 2001 Inventory #001478 2-5 The Goal Transform the Governing Partial Differential Equations (P.D.E.s) into sets of algebraic equations of the form: Treat each type of term separately Difficulties –Equations are Non-Linear –First Order Terms are difficult to handle

6 Training Manual May 15, 2001 Inventory #001478 2-6 j+1jj-1 Δx Finite Difference Based on Taylor Series expansions Consider the following grid in One Dimension:

7 Training Manual May 15, 2001 Inventory #001478 2-7 Finite Difference Adding and re-arrange to get the second derivative Subtract and re-arrange to get the first derivative Expressions approximate because higher terms neglected

8 Training Manual May 15, 2001 Inventory #001478 2-8 Finite Volume Control Volume Based Finite Difference Method Integrate the P.D.E. over a control volume centered about the jth node The Integrals are approximated as a flux difference across the control volume faces J-1 J J+1 Control Volume

9 Training Manual May 15, 2001 Inventory #001478 2-9 Finite Volume Expressions evaluated at the Control Volume Faces Second derivative First derivative

10 Training Manual May 15, 2001 Inventory #001478 2-10 Galerkin’s Method of Weighted Residuals Divide problem domain into elements with nodes at corners Consider an element in two dimensional space Express the value of Φ anywhere inside the element as a function of the nodal values... i j kl Finite Element Approach

11 Training Manual May 15, 2001 Inventory #001478 2-11 Finite Element Weighting Functions The weighting function W for a node equals 1.0 at its node and 0.0 at the other nodes… The variation can be linear or higher order For Bi-Linear quadrilaterals, for example: There is a waiting function for each node. Generally a local coordinate system is used and a transformation exists for global coordinates.

12 Training Manual May 15, 2001 Inventory #001478 2-12 Problem Domain and Assembly Consider the following simple problem domain The Matrix used to solve for the variable Φ would be 12x12

13 Training Manual May 15, 2001 Inventory #001478 2-13 Assembly Each element matrix is 4x4 (for bi-linear quadrilateral elements…) Element 1, in this example would contribute to rows 1,3,10,11 at columns 1,3,10,11 The matrix is sparse, and FLOTRAN only reserves places for non-zero numbers. Each element potentially has contributions from –Transient –Advection –Diffusion –Source Each of these contributions are calculated separately.

14 Training Manual May 15, 2001 Inventory #001478 2-14 Galerkin’s Method The weighted residual formation is as follows… The Weighting function W is the same form as previously discussed. The weighted residual is formed on an element basis. Each type of term will now be discussed

15 Training Manual May 15, 2001 Inventory #001478 2-15 Lumped Mass Approach (4x4 diagonal matrix) Contributions for nodes j,k,l exist as well Second Order Backward Difference –k is the current time level Transient Term

16 Training Manual May 15, 2001 Inventory #001478 2-16 Advection Terms FLOTRAN Techniques include –MSU (Monotone Streamline Upwind Method) –SUPG (Streamline Upwind Petrov-Galerkin Method) Difficulties –Stability –Bounded Solution –Numerical Diffusion (accuracy) –Robustness

17 Training Manual May 15, 2001 Inventory #001478 2-17 MSU Assume for pure advection, over an element, in streamwise coordinates: Therefore, over an element: The derivative expressed in terms of the unknown values at the nodes….

18 Training Manual May 15, 2001 Inventory #001478 2-18 MSU (continued) Use a difference equation based upon the streamlines from the previous iteration…. Each element has one downstream node Upstream value based on where the streamline enters the element…. –This value is expressed in terms of that at the neighboring nodes

19 Training Manual May 15, 2001 Inventory #001478 2-19 SUPG Method Application of the Galerkin Method to the Advection terms results in the following type of term (similar ones exist for Y and Z): However, when the mesh is not very fine, spatial oscillations and local inaccuracy result. The Solution is to add a perturbation term which provides additional diffusion in the flow direction

20 Training Manual May 15, 2001 Inventory #001478 2-20 SUPG (continued) The Perturbation term has the following form (2D) Where –C 2τ is a global coefficient (typically 1.0) –h is the distance through the element in the flow direction –z is a function of the local Peclet Number –U Mag is the magnitude of the velocity The finer the mesh, the smaller the perturbation term

21 Training Manual May 15, 2001 Inventory #001478 2-21 Diffusion Terms Stable terms involving second derivatives Standard Treatment –Multiply by weighting function –Integrate by parts –Shown is the X term integrated over a volume The element surface integral terms add to zero in the interior… The surface integral terms on the exterior represent mass flux across the boundary of the problem domain

22 Training Manual May 15, 2001 Inventory #001478 2-22 Diffusion Term The gradients are evaluated in terms of the nodal values The nodal values are constants..

23 Training Manual May 15, 2001 Inventory #001478 2-23 Source Terms S Φ May include –Pressure gradient –Body forces –Distributed Resistances –Some boundary condition contributions Each element contributes an element vector of sources

24 Training Manual May 15, 2001 Inventory #001478 2-24 Continuity and the Pressure Momentum Equations provide force balance that yields the velocities Therefore the Pressure must be determined from the Conservation of Mass –The Continuity Equation does not contain pressure! The SIMPLER Method is a segregated solution method that yields an expression for pressure. –Semi-Implicit Method for Pressure Linked Equations (Revised) –Originally developed by Patankar for finite volume approaches

25 Training Manual May 15, 2001 Inventory #001478 2-25 Goal Find an expression of pressure gradient in terms of velocity to use in the continuity equation First rearrange the continuity equation so that it is in terms of velocities, not their gradients (I.e. integrate by parts) Now consider that we are in an iterative loop, solving the momentum equation and then the continuity (pressure) equation. Return to the momentum equation and develop an expression for velocity in terms of a pressure gradient. –After the momentum equation has been solved, treat the nodal velocity and pressure as unknowns. Insert the resulting expression into the continuity equation.

26 Training Manual May 15, 2001 Inventory #001478 2-26 The Pressure Equation Integrate the Continuity Equation by Parts: (Include X and Y components only for clarity) Superscripts –“e” implies operation over an element volume –“s” implies operation on an element surface The surface integral terms sum to zero in the interior of the domain. On the surface they are mass flux boundary conditions.

27 Training Manual May 15, 2001 Inventory #001478 2-27 Pressure Equation (continued) Now develop an expression for the velocities in terms of the pressure gradient. At this point in the computational loop the velocities have already been determined. Consider the discretized equation resulting from momentum conservation in the X. Remove the pressure gradient term from the assembled source terms: Similar equations exist in the Y and Z directions

28 Training Manual May 15, 2001 Inventory #001478 2-28 Pressure Equation Rearrange: Where: Treat the U i as unknown, and U k as knowns.

29 Training Manual May 15, 2001 Inventory #001478 2-29 Pressure Coefficient Assume the pressure gradient is constant over the element and define a pressure coefficient. The element integrals of the Weighting function “W” have been assembled into a vector

30 Training Manual May 15, 2001 Inventory #001478 2-30 Pressure Equation Substitute these expressions into the continuity equation (2D) Becomes

31 Training Manual May 15, 2001 Inventory #001478 2-31 Final Pressure Equation Re-arrange and express the Pressure Gradient in terms of the weighting function and nodal values to get the final form. For incompressible problems the resulting matrix is positive definite and symmetric

32


Download ppt "Discretization Methods Chapter 2. Training Manual May 15, 2001 Inventory #001478 2-2 Discretization Methods Topics Equations and The Goal Brief overview."

Similar presentations


Ads by Google