sci.math.num-analysis #35624 (9 + 367 more) [1]--[1] From: Andrea Tura [1] Upwind differences Date: Thu Jun 26 09:42:33 EDT 1997 Hello, I'm a Phd student of University of Bologna. Can someone please give me any good references about "upwind differences" approach for discretizing a partial differential equation ? Thank you very much. Andrea -- ************************************************ * * * Andrea Tura * * DEIS * * University of Bologna * * Viale Risorgimento, 2 * * 40136 Bologna * * Italy * --MORE--(?%)--MORE--(80%) sci.math.num-analysis #35649 (8 + 367 more) (1)--[1] From: frensley@utdallas.edu (William Frensley) [1] Re: Upwind differences Date: Fri Jun 27 18:39:09 EDT 1997 I know of no reference that really explains the issue, but it is really rather simple if one understands two things: (i) the first derivative symbol represents (at least) two different differential operators with quite different properties, and (ii) The most important aspect of a discretization scheme for a differential operator is the nature of its eigenvalue spectrum (many times more important than order of error). Upwind differencing becomes an issue when one has a PDE describing a flow, so that it is of the form dp/dt = -v dp/dx, where p represents some sort of density. The term on the RHS is called advection, streaming, or drift, depending upon the field of application. (of course there can be other terms on the RHS, such as a diffusion term proportional to the Laplacian.) Now, this term apparently caused a great deal of trouble for early workers in computational fluid dynamics, because they used a centered difference discretizing this as: (dp/dt)[i] = -v (p[i+1] - p[i-1]) / dx, which is accurate to second order. The problem is, it is the wrong difference operator. If you write down the matrix this represents, you get an anti-symmetric tridiagonal matrix, which of course has purely imaginary eigenvalues. Put that into the original differential equation, and you get solutions that have a great desire to oscillate. They have no desire at all to settle down to a steady state. To get a set of discretized equations which will approach a steady state, you need a matrix that has all eigenvalues with negative real parts. This is what upwind differencing provides. If v > 0, use (dp/dt)[i] = -v (p[i] - p[i-1]) / dx If v < 0, use (dp/dt)[i] = -v (p[i+1] - p[i]) / dx In each case this produces a bidiagonal matrix with negative numbers on the diagonal, and positive numbers on the super or subdiagonal. You can easily show (using Gerschgorin's theorem) that these matrices have all eigenvalues with negative real parts. But, these expressions are only accurate to first order. The upwind-difference expressions also make a great deal of sense physically, because they imply that the rate of flow depends on the conditions in the direction from which the flow is comming. In summary: The first derivative really represents two different differential operators, depending upon the boundary conditions applied. If periodic BCs are used, the operator is anti-Hermitian, all eigenvalues are purely imaginary, and the centered difference is the correct discretization. If the BC is an initial value, the operator is not of a particular symmetry, but all eigenvalues have a positive real part (don't forget the - sign in the PDE), and the correct discretization is upwind differencing. By the way, downwind differencing is a fine way to construct an unconditionally unstable scheme. The history of upwind differencing can be found in P.J. Roache, Computational Fluid Dynamics (Hermosa, Albuquerque, NM, 1976). It was apparently quite a shock to the applied mathematics community to discover that lower-accuracy schemes could be more stable than higher-accuracy schemes. However, I have heard a story to the effect that upwind-differencing was discovered by von Neumann, but kept secret due to its significance in weapons research. -- Bill Frensley Electrical Engineering University of Texas at Dallas P.O. Box 830688, MS. EC-33 Richardson, Texas 75083-0688 (Mail) End of article 35649 (of 35654) -- what next? [npq] sci.math.num-analysis #35659 (23 + 347 more) (1)+-[1] From: Michael Pernice \-(1) [1] Re: Upwind differences Date: Fri Jun 27 14:06:26 EDT 1997 Depending on your orientation (mathematical or engineering) and type of PDE you might try: B. Gustafsson, H.-O. Kreiss, and J. Oliger, Time Dependepent Problems and Difference Methods, John Wiley, NY, 1995. or J. Strikwerda, Finite Difference Schemes and Partial Differential Equations, Wadsworth and Brooks/Cole Mathematics Series, Pacific Grove, CA 1989. or C.A.J. Fletcher, Computational Techniques for Fluid Dynamics, 2/e, Springer-Verlag, NY, 1991. or S.V. Patankar, Numerical Heat Transfer and Fluid Flow, Taylor & Francis, Bristol, PA, 1980. -- Michael Pernice usimap@sneffels.usi.utah.edu University of Utah Phone: (801) 581-7708 Center for High Performance Computing Fax: (801) 585-5366 End of article 35659 (of 35789) -- what next? [npq] sci.math.num-analysis #36072 (4 + 300 more) [1]+-[1] From: Chris Rehmann \-[1] Newsgroups: sci.physics.computational.fluid-dynamics,sci.math.num- + analysis [1] Oscillations in leapfrog solution of Euler equations Date: Mon Jul 21 15:50:52 EDT 1997 I am studying internal gravity wave propagation by solving the equations for the vorticity and density fluctuation without diffusive terms.* The finite-difference scheme uses a leapfrog method (centered time and space derivatives) started with a forward Euler step. The streamfunction is computed from the vorticity with a Poisson solver. When the initial conditions have relatively steep gradients, spurious oscillations with a wavelength on the order of a few grid meshes develop and eventually become unstable. The Courant number is less than one everywhere throughout the simulation. Reducing the time step by a factor of 10 does not change the solution appreciably. Increasing the spatial resolution delays the appearances of the oscillations. I have heard and read that since the solutions at consecutive time levels are decoupled in the leapfrog method, they eventually diverge. One recommended solution is to take an Euler step at regular intervals; however, this did not seem to help. Are there other ways to avoid these spurious oscillations? Should I use another numerical method? Thank you. Chris Rehmann crehmann@whoi.edu * The equations are dZ/dt = J(Psi,Z) - c1 drho/dx drho/dt = J(Psi,rho) + c2 dPsi/dx lap(Psi) = Z where Z = vorticity, Psi = streamfunction, rho = density perturbation, c1, c2 are constants, and lap(F) = d^2F/dx^2 + d^2F/dz^2 J(a,b) = da/dx db/dz - da/dz db/dx End of article 36072 (of 36215) -- what next? [npq] sci.math.num-analysis #36130 (3 + 300 more) (1)+-[1] From: aroberts@usq.edu.au (Tony Roberts) \-[1] Newsgroups: sci.physics.computational.fluid-dynamics,sci.math.num- + analysis [1] Re: Oscillations in leapfrog solution of Euler equations Date: Fri Jul 25 04:04:28 EDT 1997 This is a big problem to start with. If you initial conditions have steep gradients in a wave-like system, then you are likely to retain steep gradients forever. However, you do say they become unstable and so I interpret that to mean they do actually grow in time. If so I suggest that the following might work. Stagger your grids for (Z,Psi) and rho in TIME. That is (Z,Psi) are at integer time-steps whereas rho is at half-time steps. Then approximate your dZ/dt equation by time differencing centred on the half-times, and your drho/dt by centered on integral times. This sort of trick works very well for a wide range of physical systems---it may do the trick for you. --------------------------------------------------------------------- Professor A.J. Roberts Dept of Mathematics & Computing E-mail: aroberts@usq.edu.au University of Southern Queensland Phone: (076) 312943 Toowoomba, Queensland 4350 Fax: (076) 312721 AUSTRALIA WWW: http://www.sci.usq.edu.au /pub/MC/staff/robertsa/home.html --------------------------------------------------------------------- End of article 36130 (of 36215) -- what next? [npq] sci.math.num-analysis #36135 (2 + 300 more) (1)+-(1) From: bds@ipp-garching.mpg.de (Bruce Scott TOK ) \-[1] Newsgroups: sci.physics.computational.fluid-dynamics,sci.math.num- + analysis [1] Re: Oscillations in leapfrog solution of Euler equations Followup-To: sci.physics.computational.fluid-dynamics,sci.math.num-analysis Date: Fri Jul 25 08:56:58 EDT 1997 : the solution appreciably. Increasing the spatial resolution delays the : appearances of the oscillations. This is your key information. What you are discovering is that hyperbolic wave systems are always unstable if you discretise them with centered differencing. Quite a large body of literature appeared circa 1960-1990 to treat this situation, which leads to the many flavors of upwinded and flux-limited numerical schemes. The problem with centered differencing is that on a system with uni-directional characteristics you are always using information from both directions away from a given point to compute derivatives at that point in space, and this is unphysical. The growth rate of the instability scales as the grid spacing times the velocity of the characteristic, which is why it is insensitive to the time step. : I have heard and read that since the solutions at consecutive time levels : are decoupled in the leapfrog method, they eventually diverge. One way to describe the above problem. : One : recommended solution is to take an Euler step at regular intervals; : however, this did not seem to help. No solution. The Euler step you use here is probably even worse than the leapfrog scheme -- the problem is the use of centered differences in space. : Are there other ways to avoid these spurious oscillations? Should I use : another numerical method? Yes. A staggered grid may help some, but the growth rate becomes marginal (ie, zero, not negative), and if you are studying turbulence that won't be enough. What you want are things that are as accurate as possible right down to the mesh scale, and then dissipative at the mesh scale. A few references: basic text: R. D. Richtmeyer and K. W. Morton, {\it Difference Methods for Initial-Value Problems}, 2nd Ed (Wiley, New York, 1967). the references to the methods I use; the first two are incompressible methods, and the third describes the discretisation of v.del terms: J. B. Bell, P. Colella, and H. M. Glaz, A Second Order Projection Method for Two-dimensional Incompressible Flow J. Comput. Phys. 85 (1989) 257-283. J. B. Bell and D. L. Marcus, A Second Order Projection Method for Variable Density Flows J. Comput. Phys. 101 (1992) 334-348. P. Colella, Multidimensional Upwind Methods for Hyperbolic Conservation Laws. J. Comput. Phys. 87 (1990) 171-200. the method the astrophysics people like for shocky flows: P. Colella and P. R. Woodward The Piecewise Parabolic Method (PPM) for Gas-Dynamical Simulations J. Comput. Phys. 54 (1984) 174-201. -- Mach's gut! Bruce Scott "Don't mourn. Organise!" -- Joe Hill Judi Bari, 1949-1997 bds@ipp.mpg.de --> http://www.oro.net/~dscanlan/bari.html End of article 36135 (of 36215) -- what next? [npq]