Presentation is loading. Please wait.

Presentation is loading. Please wait.

CIS888.11V/EE894R/ME894V A Case Study in Computational Science & Engineering We will apply several numerical methods to find a steady state solution of.

Similar presentations


Presentation on theme: "CIS888.11V/EE894R/ME894V A Case Study in Computational Science & Engineering We will apply several numerical methods to find a steady state solution of."— Presentation transcript:

1 CIS888.11V/EE894R/ME894V A Case Study in Computational Science & Engineering We will apply several numerical methods to find a steady state solution of the unsteady quasi-1D equations of frictionless compressible flow. For adiabatic, frictionless flow, i.e. isentropic flow, the governing equations in dimensional form are: where the * denotes a dimensional quantity.

2 CIS888.11V/EE894R/ME894V A Case Study in Computational Science & Engineering Non-dimensionalization of governing equations Non-dimensionalize using: P = P*/P ref ; P ref = 1L ref = 1 cm. T = T*/T ref ; T ref = 1t ref = L ref /u ref  /  ref ;  ref = P ref /Rt ref = 1/Rt = t*/t ref u = u*/u ref

3 CIS888.11V/EE894R/ME894V A Case Study in Computational Science & Engineering Non-dimensionalized governing equations Since t ref = L ref /u ref, this simply reduces to: Similarly, the momentum and energy equations reduce to:

4 CIS888.11V/EE894R/ME894V A Case Study in Computational Science & Engineering MacCormack’s explicit method Before proceeding with this numerical scheme, it is necessary to introduce artificial dissipation into each of the governing equations for stability:

5 CIS888.11V/EE894R/ME894V A Case Study in Computational Science & Engineering MacCormack’s explicit method Discretize the domain x  [0,L] into N interior points and two boundary points labelled 0 and N+1, each spaced  x apart: Next, the predictor and corrector parts of the algorithm are applied at each time step for each governing equation, at all interior points.

6 CIS888.11V/EE894R/ME894V A Case Study in Computational Science & Engineering Predictor equations (MacCormack’s explicit method)

7 CIS888.11V/EE894R/ME894V A Case Study in Computational Science & Engineering Predictor equations (MacCormack’s explicit method) - contd.

8 CIS888.11V/EE894R/ME894V A Case Study in Computational Science & Engineering Corrector equations

9 CIS888.11V/EE894R/ME894V A Case Study in Computational Science & Engineering Corrector equations - contd.

10 CIS888.11V/EE894R/ME894V A Case Study in Computational Science & Engineering Coefficient of artificial viscosity One form for the artificial viscosity is as follows: for the predictor step, and for the corrector step. C=0.125 is a recommended value for this algorithm, for the non-dimensionalization shown in slide #2 of this lecture. Note that there is nothing special about this value of 0.125 - you are encouraged to try different values as well as different expressions for  a and explore their effects on the final solution as well as on the convergence to the final steady state solution.

11 CIS888.11V/EE894R/ME894V A Case Study in Computational Science & Engineering Initial Conditions For obtaining supersonic solutions in the case study problem, you may prescribe any linearly decreasing pressure distribution p(x) from the inlet (say starting at a non-dimensional value of 1) to (say 0.015 at) the exit. Similarly, a linear profile can be prescribed for T(x) varying from 1 (non-dimensional) at the inlet to 0.2 at the exit. Linear for u(x) starting from 0.15 at inlet to 1.2 at exit.  (x) can be calculated from P(x)/T(x). None of these initial profiles are unique, but their judicious specification can accelerate the solution to the desired steady state solution.

12 CIS888.11V/EE894R/ME894V A Case Study in Computational Science & Engineering Boundary Conditions Inlet:Total pressure Po and Total temperature To are specified. –Implicitly extrapolate for u(i=0): –Determine T(i=0) from total temperature To and extrapolated value of u(i=0):

13 CIS888.11V/EE894R/ME894V A Case Study in Computational Science & Engineering Boundary Conditions (contd.) –Before finding  (i=0), first find P(i=0) from assumption that flow is isentropic (i.e. loss-free) from supply to inlet, and from specification of Po and To: –Now determine  (i=0) from:

14 CIS888.11V/EE894R/ME894V A Case Study in Computational Science & Engineering Boundary Conditions (contd.) Exit: –To find supersonic solution, implicitly extrapolate for all computed variables:

15 CIS888.11V/EE894R/ME894V A Case Study in Computational Science & Engineering Boundary Conditions (contd.) –Pressure is determined from the equation of state: P(i=N+1) =  (i=N+1)T(i=N+1) Note that a supersonic steady state solution can also be obtained by prescribing a pressure at the exit plane that is low enough. What the exact value of this pressure would be cannot be determined a priori for more complicated problems. Specification of a P exit that is higher than this value for supersonic flow results in the formation of standing normal shock waves in the diverging portion of the C-D nozzle. You are encouraged to experiment with these various boundary conditions in your homework assignments.

16 CIS888.11V/EE894R/ME894V A Case Study in Computational Science & Engineering Courant condition Using Fourier stability analysis, it can be shown that this scheme is stable provided a(  t)/(  x)  1. The quantity a(  t)/(  x) is called the Courant number and a(  t)/(  x)  1 is called the Courant condition, where a is the relevant speed of sound in the problem.

17 CIS888.11V/EE894R/ME894V A Case Study in Computational Science & Engineering FTBS (Forward in Time, Backward in Space) Scheme Given equations of the form, we forward difference in time and backward difference in the spatial coordinate: This is valid for a > 0. For a < 0, a forward difference in space must be used. This FTBS scheme is also called an upwind scheme.

18 CIS888.11V/EE894R/ME894V A Case Study in Computational Science & Engineering FTBS method applied to Quasi-1D flow Discretize the domain as before with MacCormack’s method (slide#5). Next, apply FTBS to the non-dimensionalized equations, and add artificial dissipation to each equation:

19 CIS888.11V/EE894R/ME894V A Case Study in Computational Science & Engineering FTBS method - contd.

20 CIS888.11V/EE894R/ME894V A Case Study in Computational Science & Engineering FTBS method - contd.

21 CIS888.11V/EE894R/ME894V A Case Study in Computational Science & Engineering Coefficient of artificial viscosity A form for the artificial viscosity is as follows: C ranging from 0.125 to 3 is recommended for this algorithm, for the non-dimensionalization shown in slide #2 of this lecture, and may be required to vary with spatial location as well. Note that there is nothing special about this range of values for C - you are encouraged to try different values as well as different expressions for  a and explore their effects on the final solution as well as on the convergence to the final steady state solution.

22 CIS888.11V/EE894R/ME894V A Case Study in Computational Science & Engineering Stability, ICs and BCs As with the MacCormack scheme, a Fourier stability analysis shows that the Courant condition a(  t)/(  x)  1 must be satisfied for stable time-marching using the FTBS or first order upwind explicit scheme. Similar stability analysis for the FTCS (Forward in Time, Central differenced in Space) is always unstable. The BTCS or Backward in Time, Central differenced in Space is unconditionally stable. Initial conditions are same as described in slide #11. Boundary conditions are same as described in slides #12- #15.

23 CIS888.11V/EE894R/ME894V A Case Study in Computational Science & Engineering There are problems involving multiple time scales, where stiffness of the set of equations forces you to take (  t) smaller than the maximum (  t) allowed by the Courant condition for explicit methods. This makes computational time immense, so that it is necessary to use implicit methods for such multi-time scale problems. Note that time steps in implicit methods are not strictly governed by the Courant condition.

24 CIS888.11V/EE894R/ME894V A Case Study in Computational Science & Engineering Detour on Stiffness Consider the initial value problem with y(0)=1. Suppose we apply a simple explicit method such as Euler’s Forward Method: The exact solution to this problem is of course

25 CIS888.11V/EE894R/ME894V A Case Study in Computational Science & Engineering Let us define the error, , as

26 CIS888.11V/EE894R/ME894V A Case Study in Computational Science & Engineering Now suppose =10 6 and t n =2.763x10 -5  Suppose the error tolerance is desired to be and that  we only have to satisfy provided we do not amplify the previous error  (t n ).

27 CIS888.11V/EE894R/ME894V A Case Study in Computational Science & Engineering But this means that Assuming this y n is only one component of a larger system, this is unacceptable because the step size for the rest of the equations is determined by the time scale of a component which has decreased by 12 orders of magnitude (from 1 to 10 -12 ) and is probably of no further physical interest! Another way to view this is that 1/ is the time constant. The smaller the time constant, the smaller must be the time step just to maintain stability. Thus, for stiff equations, the step size depends almost entirely on the stability of the numerical method and not on the accuracy. This is best resolved by using implicit methods which are unconditionally stable.


Download ppt "CIS888.11V/EE894R/ME894V A Case Study in Computational Science & Engineering We will apply several numerical methods to find a steady state solution of."

Similar presentations


Ads by Google