|
[Sponsors] |
Time integration order of accuracy when solving acoustic wave equation using FEM |
|
LinkBack | Thread Tools | Search this Thread | Display Modes |
May 1, 2017, 15:35 |
Time integration order of accuracy when solving acoustic wave equation using FEM
|
#1 |
New Member
Join Date: Jul 2016
Posts: 28
Rep Power: 10 |
I'm solving a 1D linear acoustic wave equation using Finite Element Method for spatial discretization (linear element) and second order Finite Difference Method (explicit Newmark scheme) for temporal discretization. Specifically, I want to propagate an exponential decay shock wave in a 1D shock tube (use boundary condition to imposing the wave profile). The governing equation and boundary condition are attached.
As we know, the dispersion is an inherent property of FEM when solving wave propagation problem and using CFL number equals to one seems to give the best solution since the numerical wave speed then equals the physical wave speed. My question is: How to examine the "observed order of accuracy" of temporal discretization in this problem? When I used CFL=1, there seems to be no dispersion in the solution and the wave profile after a certain time of propagation agrees well with the theoretical profile. Then, I tried to fix the mesh size and decrease the time step, which means CFL number is reduced and smaller than 1. However, right after the CFL number drops below 1, I start to see spurious oscillation right after the wave front which increases the overall error in the solution. Thus, the accuracy is even degraded when the time step size is decreased. As a result, I cannot retrieve the theoretical order of accuracy of time discretization. I saw people recommend to keep CFL number fixed while investigating the time integration accuracy, which means mesh size is decreased as time step is decreased. Is this a reasonable way to examine the temporal order of accuracy? Did I misunderstand something? |
|
May 1, 2017, 16:18 |
|
#2 |
Senior Member
Filippo Maria Denaro
Join Date: Jul 2010
Posts: 6,896
Rep Power: 73 |
Theoretically, you cannot perform an accuracy test for a case where the solution is singular... the accuracy test has the aim to evaluate the order of the magnituted in the leading term appearing in the local truncation error. But if the derivative does not exist that is not correct.
The accuracy order analysis are performed with smooth solutions. You can find some details in the book of Leveque. |
|
May 1, 2017, 17:15 |
|
#3 | |
New Member
Join Date: Jul 2016
Posts: 28
Rep Power: 10 |
Quote:
Thanks for your response. I don't actually understand why the solution is singular... By using 2nd order Newmark temporal discretization, I do have the truncation error term. Theoretically, if I fix the mesh size and decrease the time step, I should get the correct order of accuracy. However, the thing is the dispersion of spatial discretization seems to deteriorate the overall accuracy. As a result, I'm not able to observe the theoretically observed order of accuracy. |
||
May 1, 2017, 17:32 |
|
#4 |
Senior Member
Filippo Maria Denaro
Join Date: Jul 2010
Posts: 6,896
Rep Power: 73 |
You wrote:
"Specifically, I want to propagate an exponential decay shock wave in a 1D shock tube " |
|
May 1, 2017, 17:49 |
|
#5 | |
New Member
Join Date: Jul 2016
Posts: 28
Rep Power: 10 |
Quote:
I believe your point is that the problem is caused by the discontinuity of the boundary condition at the first time step. Is that correct? |
||
May 1, 2017, 18:15 |
|
#6 |
Senior Member
Filippo Maria Denaro
Join Date: Jul 2010
Posts: 6,896
Rep Power: 73 |
I don't understand ...you have a linear PDE describing a couple of travelling waves at +/-c. The initial/boundary conditions define the presence or not of the travelling discontinuity along x. Therefore, if you set a discontinuity it will travel and decay in time.
It's the same whe you work with the first order linear equation df/dt+c*df/dx=0 and set a discontinuity in condition for the function f. It travels along x and you cannot define there the derivative. |
|
May 1, 2017, 18:35 |
|
#7 |
Senior Member
Filippo Maria Denaro
Join Date: Jul 2010
Posts: 6,896
Rep Power: 73 |
Why do not use an initial smooth function like a gaussian centered at x=0? you can just let to evolve towards +/- x direction. This way you can check the orde of accuracy in time and space.
|
|
May 1, 2017, 18:56 |
|
#8 | |
New Member
Join Date: Jul 2016
Posts: 28
Rep Power: 10 |
Quote:
I think the overall accuracy is influenced by the dispersion of spatial discretization of finite element method. The dispersion would increase as the mismatch between the numerical speed and physical speed is enlarged (i.e. when CFL deviates from 1). However, I'm not sure if this explanation is theoretically sound. |
||
May 1, 2017, 19:03 |
|
#9 | |
Senior Member
Filippo Maria Denaro
Join Date: Jul 2010
Posts: 6,896
Rep Power: 73 |
Quote:
First, set the initial condition at x=0 and fix a domain quite long from -L to +L such that you can evolve the solution without entering BC.s. Then, to check the accuracy order you have to take CFL=constant and use several refined grids. On each grid compute the L_inf norm at a fixed time. The slope of the error curve versus the grid size will give you the accuracy order. Numerical dispersion and/or dissipation depend on the combined discretization in time and space. Dispersion is not caused by the fact that CFL is not 1. |
||
May 1, 2017, 21:06 |
|
#10 | |
New Member
Join Date: Jul 2016
Posts: 28
Rep Power: 10 |
Quote:
Is there any particular kind of reason of fixing CFL number in order to examine the order of accurate of temporal/spatial discretization? (To keep the physics the same? ) Last edited by lzhaok6; May 1, 2017 at 23:50. |
||
May 2, 2017, 03:59 |
|
#11 |
Senior Member
Filippo Maria Denaro
Join Date: Jul 2010
Posts: 6,896
Rep Power: 73 |
The order of the accuracy can be evaluated if all the terms of the local truncation error vanish simultaneously, therefore one performs a grid refinement by taking CFL=constant.
If you want check only the dependence on the time step, then you need to make the spatial dependence not relevant. This is obtained by using only one spatial grid with the mesh size very very small. Then, you can perform the analysis by refining the time step (that is you work by reducing the CFL). It is fundamental you set a very very small mesh size |
|
May 2, 2017, 15:19 |
|
#12 | |
New Member
Join Date: Jul 2016
Posts: 28
Rep Power: 10 |
Quote:
I tried your suggestion. Since I want to examine the temporal order of accuracy, I have to keep my mesh size fixed. Seems like the dispersion problem is greatly relieved by using a Gaussian function as the waveform. The attached thumbnail is the observed order of accuracy I got from the L_inf norm. It seems like the order of accuracy is not perfectly 2nd order as I expected. But at least the solution is converging. |
||
May 2, 2017, 15:28 |
|
#13 |
Senior Member
Filippo Maria Denaro
Join Date: Jul 2010
Posts: 6,896
Rep Power: 73 |
First, I strongly suggest to represent the numerical solution only with symbols, not with continue lines. That will help the visualization.
How fine is the spatial grid? Then, I do not understand the plot of the accuracy order. What are you representing? The accuracy order is estimated by the asymptotical slope of the curve obtained by plotting the error versus the dt in a double logarithic scale. What are the coordinates in your plot? |
|
May 2, 2017, 17:28 |
|
#14 | |
New Member
Join Date: Jul 2016
Posts: 28
Rep Power: 10 |
Quote:
I plotted the log-log plot of error norm vs grid spacing. It seems like the order of accuracy is between 1st and 2nd order. |
||
May 2, 2017, 17:46 |
|
#15 |
Senior Member
Filippo Maria Denaro
Join Date: Jul 2010
Posts: 6,896
Rep Power: 73 |
But for grid size you are denoting the time step, right? why the scale is 10 up to 10^2? If you have a second order spatial accuracy you get in the LTE a term O(10^-5). I suggest to use a more refined spatial grid.
Furthermore, the order of accuracy is reached only asymptotically, oscillations are quite usual before, so I suggest to produce yet solutions for smaller time steps. |
|
May 2, 2017, 18:03 |
|
#16 | |
New Member
Join Date: Jul 2016
Posts: 28
Rep Power: 10 |
Quote:
The spatial discretization is only linear since I'm using a basic linear element. Do you mean that the oscillation is a normal phenomenon? I'll try to use smaller time step. |
||
May 2, 2017, 18:08 |
|
#17 | |
Senior Member
Filippo Maria Denaro
Join Date: Jul 2010
Posts: 6,896
Rep Power: 73 |
Quote:
Use a finer spatial grid step (for example 10^-3) and check the slope at smaller time steps. The convergence to the correct slope is never reached monotonically... |
||
May 3, 2017, 02:21 |
|
#18 |
New Member
Join Date: Jul 2016
Posts: 28
Rep Power: 10 |
I tried to use 4000 elements (0.0025m per element) and further decreased the time step size. It seems like the order of accuracy gradually converges to 1st order. Theoretically, the order of accuracy should be 2nd order. I think I might have misimplemented something in the scheme that finally degraded the precision. However, I believe there is another possibility that the numerical property of the problem is changed when CFL number is different, which makes the observed order of accuracy differ from the theoretical one.
|
|
May 3, 2017, 03:52 |
|
#19 | |
Senior Member
Filippo Maria Denaro
Join Date: Jul 2010
Posts: 6,896
Rep Power: 73 |
Quote:
Yes, the slope seems to indicate also less than first order of accuracy. The CFL (the ratio dt/dx) says the way in which you evaluate the local truncation error that is a function of the discretization steps. In the 2D space, you are fixing dx and you are evaluating the LTE for dt diminuishing. You could also perform the one-step analysis to check the accuracy |
||
May 3, 2017, 10:31 |
|
#20 |
New Member
Join Date: Jul 2016
Posts: 28
Rep Power: 10 |
Thank you for your suggestions, Prof. Denaro. I'll try the one-step analysis then.
|
|
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
conjugate heat transfer in OpenFOAM | skuznet | OpenFOAM Running, Solving & CFD | 99 | March 16, 2017 06:07 |
High Courant Number @ icoFoam | Artex85 | OpenFOAM Running, Solving & CFD | 11 | February 16, 2017 14:40 |
Floating point exception error | lpz_michele | OpenFOAM Running, Solving & CFD | 53 | October 19, 2015 03:50 |
Cannot run the code properly: very large time step continuity error | crst15 | OpenFOAM Running, Solving & CFD | 9 | December 14, 2014 19:17 |
How to write k and epsilon before the abnormal end | xiuying | OpenFOAM Running, Solving & CFD | 8 | August 27, 2013 16:33 |