# Numerical diffusion error

 Register Blogs Members List Search Today's Posts Mark Forums Read

 October 20, 1999, 07:52 Numerical diffusion error #1 Z.Zeng Guest   Posts: n/a In CFD, is there any scheme which is free of numerical diffusion error ?

 October 20, 1999, 08:54 Re: Numerical diffusion error #2 Duane Baker Guest   Posts: n/a Hi Z.Zeng, the numerical error is not just a function of the scheme, it also depends on the field being solved, specifiallygradient of a gradient or higher gradients thereof, etc. So, for simple problems we can develop a schem which has no error such as has been done for 1-D transinet advection equations and for the ss-1D advection-diffusion problem (exponential upwinding scheme) BUT this often has little to do with real problems, especially the NS equations! Schemes also have dispersive error which disperses (spreads) out different component wavelengths which then looks like wiggles in the numerical solution! A good place to start is reading Ferziger and Pericīs Computional Methods for Fluid Dynamics. Best of luck...........................Duane

 October 20, 1999, 09:44 Re: Numerical diffusion error #3 Patrick Godon Guest   Posts: n/a High order methods have naturally less numerical diffusion than low order methods. A usual finite difference method is of order 2, 3 or even more. In this case it means that you represent the derivatives of the function (say f) at a point (say i) using the values of the function at a few points (for example the points i+2, i+1, i, i-1, i-2). A high order method uses a large number of point to calculate the derivatives, and is therefore more accurate (which leads to less numerical diffusion). Spectral Methods are high order methods. If you have N grid points, the order of the method is actually N. This means that you use all the points given, to compute the derivative of the function at a given point. This enable people to study the fine structure of the flow, however, the problem is that these high order methods can poorly help to solve problems involving shocks and jump in functions. For example the Fourier Spectral method uses discrete Fourier Transform (FFT on the computer) to compute the derivatives. Here are some good reference book for Spectral Methods: Gottlieb and Orszag, 1977, Numerical Analysis of Spectral Methods: Theory and Applications, NSF-CBMS Monograph, n.26, Soc. Ind. and Appl. Math., Philadelphia, PA. Voigt, Gottlieb, Hussaini, 1984, Spectral Methods for Partial Differential Equations, SIAM-CBMS, Philadelphia, PA and mainly this one: Canuto, Hussaini, Quarteroni and Zang, 1988, Spectral Methods in Fluid DYnamics, Springer-Verlag, Berlin.

 October 20, 1999, 18:08 Re: Numerical diffusion error #5 John C. Chien Guest   Posts: n/a (1). There is no such thing as "numerical scheme with numerical diffusion error". (2). But there is artificial viscosity and artificial diffusion terms. These are explicit terms which are artificially added to the original equations in order to control the convergence or the behavior of the solution. Without such artificially added diffusion terms, most of the time, wiggles in the solution to the inviscid equation will appear. Sometimes, it will give you negative density, or even diverged solution. (3). The use of artificially added diffusion terms in the original equation to stabilize the solution has been used since 50's. So, even today, if you run into stability problem in solving compressible flow problem, you would consider this option to control the convergence or stability problem. (4). Back to this "numerical error" term. I think it is related to the behavior of FDM using first-order one-sided approximation for convection term relative to that using second-order central difference approximation for convection term. (5). For example, the diffusion-convection model equation can be approximated as zmu*(T3-2*T2+T1)-u2*(T3-T1)/2=epsilon1. where the first term is the diffusion term, the second term is the convection term. The grid spacing is 1.0, and (T3-T1)/2 is the central difference approximation. And epsilon1 is the trancation error. In the original equation, the right-hand side would be zero, but for the FDM the right-hand side is the truncation error. Or the so-called numerical error terms.(6). If we use the first-order upwind approximation for the convection term, the model equation becomes zmu*(T3-2*T2+T1)-u2*(T2-T1)=kapa1. for positive u2. where T1 is T(i-1), T2 is T(i), and T3 is T(i+1). kapa1 is the truncation error for this FD equation, and (T2-T1) is the upwind difference approximation. (7). The truncation error terms epsilon1 and kapa1 should go to zero when the grid spacing goes to zero. But in reality, we are dealing with problem having finite grid spacings.(or grid size) (8). For finite grid size problem, the truncation error epsilon1 and kapa1 are not the same (not equal). (9). If we substract the first equation from the second equation, we get kapa1-epsilon1=-u2*(T2-T1)+u2*(T3-T1)/2. Which is kapa1-epsilon1=u2*(T3-2*T2+T1)/2. And this is the difference between two approximated equations. Actually, the grid size dx should appear in the above equation as kapa1-epsilon1=dx*u2*(T3-2*T2+T1)/2. (10). That's all we have. (11). But some people would say that (T3-2*T2+T1) is a second-order central difference template, just like the real diffusion term. Thus, we call kapa1-epsilon1 the numerical diffusion error term, mainly because of its appearance. (12). If we use other type of approximation for the convection term, the truncation error term (kapa1-epsilon1) will be function of (dx,c1*u2,c2*T1,c3*T2,c4*T3) in certain general form. Where c1,c2,c3,and c4 could be zero or non-zero coefficients. Then it is very hard to give it a familiar name such as"numerical diffusion". (13). So, you can try out several different approximation schemes, and see whether the truncation error (kapa1-epsilon1) will take certain familiar form or not. (14). If you can make (kapa1-epsilon1)=0, then both schemes are second-order accurate. Each one still has its own truncation error in the FD equation though.

 October 21, 1999, 13:39 Re: Numerical diffusion error #8 John C. Chien Guest   Posts: n/a (1). I think CFD is still a branch of art. It is more on the graphic art side. (2). I use the color printer a lot. And I enjoy looking at the colorful output. (3). The "numerical truncation error with diffusion effect" is proportional to the grid size, dx, so, it can be systematically reduced by reducing the mesh size. For a 1-D problem, using a commercial program, one can have a 1-D mesh with 1,000,000 cells on a machine with a couple of giga bytes. A PC should be able to handle this kind of hardware memory. (4). The problem is people are anxious to solve 3-D problem using 1,000,000 cells. So, he can have 100 points in each dimension, which is 10000 times smaller than the ideal number. (5). So, if one insists on using 40x40x40 mesh in a 3-D computation, then he will always have the accuracy problem, and possibly the stability problem. (6). Since people nowadays are used to run calculations for several weeks or months, the time steps can be reduced in any fashion without violating the stability constraints. (7). So, as long as the solution algorithm is developed to provide the consistent solution (the algebraic equation becomes the original equation, as the mesh size is reduced to zero), the solutions obtained using different schemes of varying order should also converge to the same solution. (8). For those who can not afford using 1,000,000 cells mesh for a 1-D problem, it becomes an art to find the optimum solution (the one which is closer to the true converged result at 1,000,000 cells) and the related optimum scheme, so that they can still claim that they have found the answer. (9). It is like the return journey of the Appolo 13. It is difficult, but it can be done. (10). Since people working in CFD field have many options (relative to the astronauts on Appolo 13 ), the results tend to look like modern graphic art.

 October 22, 1999, 09:06 Re: Numerical diffusion error #9 Shigunov Guest   Posts: n/a I should suppose that Lagrangian methods are free from numerical diffusion because they do not need interpolation procedures. With best regards

 Thread Tools Display Modes Linear Mode

 Posting Rules You may not post new threads You may not post replies You may not post attachments You may not edit your posts BB code is On Smilies are On [IMG] code is On HTML code is OffTrackbacks are On Pingbacks are On Refbacks are On Forum Rules

 Similar Threads Thread Thread Starter Forum Replies Last Post tj22 OpenFOAM Paraview & paraFoam 270 January 4, 2016 12:39 gschaider OpenFOAM 300 October 29, 2014 19:00 ivanyao OpenFOAM Running, Solving & CFD 1 October 12, 2012 09:31 padmanathan OpenFOAM 9 October 13, 2009 05:17 fw407 OpenFOAM Installation 21 January 6, 2008 18:38

All times are GMT -4. The time now is 22:09.