
[Sponsors] 
May 2, 2019, 15:08 
Taylor Series Convergence Check in FEM

#1 
New Member
mertcan
Join Date: Feb 2018
Posts: 20
Rep Power: 5 
Hi, I would like to express: Taylor series expansion is widely used in Finite Element methods for instance to set the relation between nodes. I agree to use Taylor expansion in finite difference schemes to approximate to a node from another nodes but I have not seen any case that Taylor series used in schemes are controlled in terms of convergence. Taylor expansion may converge or not to its original function which means you may diverge more when you increase the degree of Taylor series expansion but in FEM I have always witnessed in books or sites that Taylor expansion gets more accurate and thus scheme gets more precise when expansion degree increases although there is not a convergence check for taylor expansion. Could you enlighten me about that? Why convergence of taylor expansion between nodes in finite difference schemes are not checked?


May 2, 2019, 16:28 

#2  
Senior Member
Filippo Maria Denaro
Join Date: Jul 2010
Posts: 5,666
Rep Power: 60 
Quote:
That is not true, in FD we study the convergence of a discrete derivative towards its continuous counterpart by examining the local truncation term (infinite number of terms in the Taylor expansion). It must vanish to ensure consistence of the scheme. 

May 3, 2019, 05:12 

#3 
Senior Member

Said otherwise, when you do grid refinement for verification of your code with respect to known analytical solutions, you are just doing that: testing that all the approximations in your code are actually correct.
Indeed, you typically find out that the error does not decrease as expected for the very coarse grids, a sign that your Taylor approximations are not valid at those resolutions. But, if everything is correct, successive refinements should eventually show the actual error to decrease as expected by the underlying approximations. Note that this is valid in FEM as well as FDM and FVM. Wherever you have a discrete approximation, you can check its consistency by invoking a Taylor series. 

May 3, 2019, 09:37 

#4 
New Member
mertcan
Join Date: Feb 2018
Posts: 20
Rep Power: 5 
I deem that grid size crucially important to ensure taylor expansion consistency. By which methods do we find relevant grid sizes to make taylor expansion consistent and convergent?


May 3, 2019, 09:40 

#5  
New Member
mertcan
Join Date: Feb 2018
Posts: 20
Rep Power: 5 
Quote:


May 3, 2019, 09:52 

#6 
Senior Member

I am not aware of any method but, so to speak, it depends from the underlying function, whose derivatives need to be bounded.
One typically makes a first educated guess and then proceeds by grid refinement. 

May 3, 2019, 10:58 

#7  
Senior Member
Filippo Maria Denaro
Join Date: Jul 2010
Posts: 5,666
Rep Power: 60 
Quote:
Convergence of the Taylor series is a mathematical topic, it depends on the residual Rn(x) (and therefore on the function f(x)) and you can have a convergence of the Taylor series also if it does not converge to the actual function. Note that when we truncate the Taylor series we denote the residual as O(h^n). Of course, one should deduce that h<1. Have a look to the Taylor's theorem https://en.wikipedia.org/wiki/Taylor%27s_theorem 

May 4, 2019, 10:34 

#8  
New Member
mertcan
Join Date: Feb 2018
Posts: 20
Rep Power: 5 
Quote:


May 4, 2019, 10:36 

#9 
New Member
mertcan
Join Date: Feb 2018
Posts: 20
Rep Power: 5 
Sbaffini, what do you say for my last question to FMDenaro?


May 4, 2019, 10:50 

#10  
Senior Member
Filippo Maria Denaro
Join Date: Jul 2010
Posts: 5,666
Rep Power: 60 
Quote:
What do you mean exactly? The function must be differentiable infinite times. You cannot think to take finite the term with an infinite value for the nth derivate and zero term for h^n. https://en.wikipedia.org/wiki/Taylor_series 

May 5, 2019, 05:12 

#11  
New Member
mertcan
Join Date: Feb 2018
Posts: 20
Rep Power: 5 
Quote:
I am asking because if taylor expansion for function diverges it is meaningless to have finite difference scheme? 

May 5, 2019, 05:24 

#12  
Senior Member
Filippo Maria Denaro
Join Date: Jul 2010
Posts: 5,666
Rep Power: 60 
Quote:
You cannot write a Taylor series centred at a singularity for a function... and (0*infinite) makes no sense without the concept of limit, it could be still not finite. The problem has nothing to do with FD scheme but is a mathematical issue about the existence of the Taylors series. If you cannot write the series, the FD formula has no meaning in terms of consistence. 

May 6, 2019, 07:58 

#13 
Senior Member

Not an expert on this matter but, I guess, functions which are non differentiable (to whatever degree) over whole intervals (as opposed to a numerable set of points) are out of reach for any numerical method and, maybe, do not even qualify as weak solutions.
I think we can only consider discontinuities in points for 1D, also curves for 2D, and up to surfaces in 3D. Besides this, however, while all numerical methods rely, in a way or another, on the Taylor series to prove their formal accuracy, none of them actually uses a taylor series, thus you are never going to evaluate a 0*infinity term. By definition, all the discrete values you store are finite. What, instead, actually happens is that you may find yourself in one of the two following common situations: 1) You need to evaluate a certain field variable in locations different from where it is defined and stored. For example, face values in FV starting from cell center values. You need to resort to some interpolation. 2) You need to evaluate the gradient itself of some field variable. You then need to use some sort of finite difference or GreenGauss theorem. Then you want that your interpolation/gradient, which is just an algebraic formula after all (no blackmagic with undefined derivatives or infinite values), has a consistent, bounded error norm. That is, you reduce the spacing between your discrete locations and the error is reduced. Well, what you actually discover is that, under certain circumstances, your error norm won't actually do that. Try, for example, to differentiate numerically sin(abs(x)) at the origin or a step function at the jumps. No matter how fine your grid is, your are trying to evaluate something that doesn't even exist, you get garbage... but finite garbage. Try to interpolate across those same discontinuities and you get finite errors that don't go down with grid refinement. The same happens, for example, for shockwaves in fluids, it has no sense to differentiate or interpolate across a shock. As well for interfaces between different materials. But you know that and get used to that. Nothing really fancy here. 

June 13, 2019, 16:53 

#14 
New Member
mertcan
Join Date: Feb 2018
Posts: 20
Rep Power: 5 
Isn't it a contradiction that not using taylor expansion for function but measuring accuracy with a method you do not employ(taylor again)?


June 14, 2019, 06:01 

#15 
Senior Member

I was kind of inaccurate in writing that sentence.
In the FV practice, for example, the so called reconstruction step is used to go from cell center values to face values used in the fluxes. This step actually is a Taylor Series reconstruction, because you compute first and maybe higher derivatives in the cell centers and use them to build a polynomial, a Taylor series one centered in the cell center, to finally obtain face values. The practical aspect of this that you need, in my opinion, to understand is that, at worst, the numerical derivatives I am using to build such polynomial may be inaccurate or nonsense, but still typically finite (unless problems of different nature arise). In the worst case scenario, my face values would be nonsense, but finite, values that do not go toward the right solution with a grid refinement (i.e., reduction of the distance between the evaluation point of the series and the point where it is centered). Still, this is just an example. In the FD/FE world I don't think that the Taylor expansion is used so explicitly. Yet, it is still clearly there. Any finite difference formula for derivatives, for example, only makes sense when you invoke a Taylor series and show that, if invoking it actually makes sense for that function, then your error is bounded in some norm and is the rest of the Taylor series. The overall take home message here is that: a) Taylor Series are more or less explicitly used in the construction of numerical schemes b) The verification of a code for a given problem actually is the phase where you assess, for that problem, that below a certain grid resolution your implementation and the assumptions for the taylor series are correct c) This is only part of the story. For problems involving discontinuities, which typically are wave phenomena, the satisfaction of the taylor series is not what you look at, as it is non sense. For example, a 1st order upwind can give exact results in trasporting a step profile, under certain conditions; yet, you don't get meaningful derivatives at discontinuities (FV here might be more meaningful in understanding what actually happens) d) In the end, numerical algorithms involve manipulating discrete values (i.e., floating point values) at discrete locations (your grid points). The continuous math world is some distance apart and, typically, concepts from the latter do not translate to the former straightforwardly, if at all. 

June 14, 2019, 09:19 

#16 
Senior Member
Filippo Maria Denaro
Join Date: Jul 2010
Posts: 5,666
Rep Power: 60 
Hovewer in FEM is common to distinguish h and p convegences. This latter is at a constant mesh size but for incresing DOF of the shape functions


Tags 
convergence check, convergence problem, fem, truncation error 
Thread Tools  Search this Thread 
Display Modes  


Similar Threads  
Thread  Thread Starter  Forum  Replies  Last Post 
Convergence  Centurion2011  FLUENT  47  February 12, 2020 11:18 
In the case of convergence  aja1345  FLUENT  1  July 31, 2015 03:58 
Automated check for convergence  Chander  CFX  3  May 2, 2012 18:07 
Check the convergence of the transient run> HOW ??!!  mohammad  CFX  4  February 13, 2012 05:17 
Force can not converge  colopolo  CFX  13  October 4, 2011 22:03 