CFD Online Logo CFD Online URL
www.cfd-online.com
[Sponsors]
Home > Forums > General Forums > Main CFD Forum

Taylor Series Convergence Check in FEM

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

Like Tree2Likes
  • 1 Post By sbaffini
  • 1 Post By FMDenaro

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   May 2, 2019, 16:08
Default Taylor Series Convergence Check in FEM
  #1
New Member
 
mertcan
Join Date: Feb 2018
Posts: 20
Rep Power: 8
mertcan is on a distinguished road
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?
mertcan is offline   Reply With Quote

Old   May 2, 2019, 17:28
Default
  #2
Senior Member
 
Filippo Maria Denaro
Join Date: Jul 2010
Posts: 6,893
Rep Power: 73
FMDenaro has a spectacular aura aboutFMDenaro has a spectacular aura aboutFMDenaro has a spectacular aura about
Quote:
Originally Posted by mertcan View Post
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?



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.
FMDenaro is offline   Reply With Quote

Old   May 3, 2019, 06:12
Default
  #3
Senior Member
 
sbaffini's Avatar
 
Paolo Lampitella
Join Date: Mar 2009
Location: Italy
Posts: 2,192
Blog Entries: 29
Rep Power: 39
sbaffini will become famous soon enoughsbaffini will become famous soon enough
Send a message via Skype™ to sbaffini
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.
sbaffini is offline   Reply With Quote

Old   May 3, 2019, 10:37
Default
  #4
New Member
 
mertcan
Join Date: Feb 2018
Posts: 20
Rep Power: 8
mertcan is on a distinguished road
Quote:
Originally Posted by FMDenaro View Post
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.
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?
mertcan is offline   Reply With Quote

Old   May 3, 2019, 10:40
Default
  #5
New Member
 
mertcan
Join Date: Feb 2018
Posts: 20
Rep Power: 8
mertcan is on a distinguished road
Quote:
Originally Posted by sbaffini View Post
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.
Could you tell me how we can find appropriate grid sizes to obtain valid Taylor approximations?
mertcan is offline   Reply With Quote

Old   May 3, 2019, 10:52
Default
  #6
Senior Member
 
sbaffini's Avatar
 
Paolo Lampitella
Join Date: Mar 2009
Location: Italy
Posts: 2,192
Blog Entries: 29
Rep Power: 39
sbaffini will become famous soon enoughsbaffini will become famous soon enough
Send a message via Skype™ to sbaffini
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.
sbaffini is offline   Reply With Quote

Old   May 3, 2019, 11:58
Default
  #7
Senior Member
 
Filippo Maria Denaro
Join Date: Jul 2010
Posts: 6,893
Rep Power: 73
FMDenaro has a spectacular aura aboutFMDenaro has a spectacular aura aboutFMDenaro has a spectacular aura about
Quote:
Originally Posted by mertcan View Post
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?



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
FMDenaro is offline   Reply With Quote

Old   May 4, 2019, 11:34
Default
  #8
New Member
 
mertcan
Join Date: Feb 2018
Posts: 20
Rep Power: 8
mertcan is on a distinguished road
Quote:
Originally Posted by FMDenaro View Post
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
Even we have h<1 and the infinitely differentiable of function's derivative at infinity is not bounded then we may diverge considerably. So h<<<<<<<1 may be better but hard to determine that value of h I think. So what should we do in FEM if our functions' derivative at infinity not bounded? Or we accept that in FEM we can not have any infinitely differentiable function?
mertcan is offline   Reply With Quote

Old   May 4, 2019, 11:36
Default
  #9
New Member
 
mertcan
Join Date: Feb 2018
Posts: 20
Rep Power: 8
mertcan is on a distinguished road
Quote:
Originally Posted by sbaffini View Post
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.
Sbaffini, what do you say for my last question to FMDenaro?
mertcan is offline   Reply With Quote

Old   May 4, 2019, 11:50
Default
  #10
Senior Member
 
Filippo Maria Denaro
Join Date: Jul 2010
Posts: 6,893
Rep Power: 73
FMDenaro has a spectacular aura aboutFMDenaro has a spectacular aura aboutFMDenaro has a spectacular aura about
Quote:
Originally Posted by mertcan View Post
Even we have h<1 and the infinitely differentiable of function's derivative at infinity is not bounded then we may diverge considerably. So h<<<<<<<1 may be better but hard to determine that value of h I think. So what should we do in FEM if our functions' derivative at infinity not bounded? Or we accept that in FEM we can not have any infinitely differentiable function?



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 n-th derivate and zero term for h^n.
https://en.wikipedia.org/wiki/Taylor_series
FMDenaro is offline   Reply With Quote

Old   May 5, 2019, 06:12
Default
  #11
New Member
 
mertcan
Join Date: Feb 2018
Posts: 20
Rep Power: 8
mertcan is on a distinguished road
Quote:
Originally Posted by FMDenaro View Post
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 n-th derivate and zero term for h^n.
https://en.wikipedia.org/wiki/Taylor_series
I mean there may be bounded differentiable functions(bounded first, second, third.......n'th degree derivatives as sbaffini said a few post ago) and if h<1 then taylor expansion converge at infinity. But also there may be unbounded differentiable functions (for instance n'th degree derivative of function at infinity may be infinite). What should be done if n'th degree derivative of function goes infinity when degree of taylor expansion goes infinity whereas h<1 (which is a (0*infinite) case) in finite difference scheme?

I am asking because if taylor expansion for function diverges it is meaningless to have finite difference scheme?
mertcan is offline   Reply With Quote

Old   May 5, 2019, 06:24
Default
  #12
Senior Member
 
Filippo Maria Denaro
Join Date: Jul 2010
Posts: 6,893
Rep Power: 73
FMDenaro has a spectacular aura aboutFMDenaro has a spectacular aura aboutFMDenaro has a spectacular aura about
Quote:
Originally Posted by mertcan View Post
I mean there may be bounded differentiable functions(bounded first, second, third.......n'th degree derivatives as sbaffini said a few post ago) and if h<1 then taylor expansion converge at infinity. But also there may be unbounded differentiable functions (for instance n'th degree derivative of function at infinity may be infinite). What should be done if n'th degree derivative of function goes infinity when degree of taylor expansion goes infinity whereas h<1 (which is a (0*infinite) case) in finite difference scheme?

I am asking because if taylor expansion for function diverges it is meaningless to have finite difference scheme?



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.
FMDenaro is offline   Reply With Quote

Old   May 6, 2019, 08:58
Default
  #13
Senior Member
 
sbaffini's Avatar
 
Paolo Lampitella
Join Date: Mar 2009
Location: Italy
Posts: 2,192
Blog Entries: 29
Rep Power: 39
sbaffini will become famous soon enoughsbaffini will become famous soon enough
Send a message via Skype™ to sbaffini
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 Green-Gauss 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.
sbaffini is offline   Reply With Quote

Old   June 13, 2019, 17:53
Default
  #14
New Member
 
mertcan
Join Date: Feb 2018
Posts: 20
Rep Power: 8
mertcan is on a distinguished road
Quote:
Originally Posted by sbaffini View Post
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.
Isn't it a contradiction that not using taylor expansion for function but measuring accuracy with a method you do not employ(taylor again)?
mertcan is offline   Reply With Quote

Old   June 14, 2019, 07:01
Default
  #15
Senior Member
 
sbaffini's Avatar
 
Paolo Lampitella
Join Date: Mar 2009
Location: Italy
Posts: 2,192
Blog Entries: 29
Rep Power: 39
sbaffini will become famous soon enoughsbaffini will become famous soon enough
Send a message via Skype™ to sbaffini
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 non-sense, but still typically finite (unless problems of different nature arise). In the worst case scenario, my face values would be non-sense, 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.
mertcan likes this.
sbaffini is offline   Reply With Quote

Old   June 14, 2019, 10:19
Default
  #16
Senior Member
 
Filippo Maria Denaro
Join Date: Jul 2010
Posts: 6,893
Rep Power: 73
FMDenaro has a spectacular aura aboutFMDenaro has a spectacular aura aboutFMDenaro has a spectacular aura about
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
mertcan likes this.
FMDenaro is offline   Reply With Quote

Reply

Tags
convergence check, convergence problem, fem, truncation error

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

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 Off
Trackbacks are Off
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Convergence Centurion2011 FLUENT 48 June 15, 2022 00:29
In the case of convergence aja1345 FLUENT 1 July 31, 2015 04:58
Automated check for convergence Chander CFX 3 May 2, 2012 19:07
Check the convergence of the transient run--> HOW ??!! mohammad CFX 4 February 13, 2012 06:17
Force can not converge colopolo CFX 13 October 4, 2011 23:03


All times are GMT -4. The time now is 14:08.