|
[Sponsors] |
Implementing 5th or 7th order WENO(FD) near boundaries |
|
LinkBack | Thread Tools | Search this Thread | Display Modes |
October 3, 2016, 01:44 |
Implementing 5th or 7th order WENO(FD) near boundaries
|
#1 |
New Member
Pawan Kerkar
Join Date: Sep 2016
Posts: 29
Rep Power: 9 |
I had asked a similar question in another thread, but I'll be more specific here.
How do you implement a higher order finite difference schemes, like 5th or 7th order scheme, or a 6th order central scheme near boundaries? As in, near boundaries you don't have enough points to implement such schemes. What do you do in such cases? Note that the boundary conditions are not periodic. There will be inflow, outflow and wall boundary conditions. Thank you in advance |
|
October 3, 2016, 03:12 |
|
#2 |
Senior Member
Filippo Maria Denaro
Join Date: Jul 2010
Posts: 6,768
Rep Power: 71 |
using forward/backward discretizations
|
|
October 5, 2016, 11:45 |
|
#3 |
New Member
Pawan Kerkar
Join Date: Sep 2016
Posts: 29
Rep Power: 9 |
Don't these forward/backward descretisation cause any stability issues, i.e. we may be using downwind scheme for some waves instead of using a central or upwind scheme depending on what direction the waves are travelling near boundaries.
|
|
October 5, 2016, 12:13 |
|
#4 |
Senior Member
Filippo Maria Denaro
Join Date: Jul 2010
Posts: 6,768
Rep Power: 71 |
you are mixing two different things, one is how to set the boundary conditions according to the mathematical character of the equations the second is how to discretize such condition. Compressible or incompressible flows require different BC.s
Once the BC.s are correctly set, you can consider the influence of non-centred discretization on the stability matrix. Note that you are using these formulas only for Neumann BC.s, not for DIrichlet. |
|
October 5, 2016, 13:04 |
|
#5 | |
New Member
Pawan Kerkar
Join Date: Sep 2016
Posts: 29
Rep Power: 9 |
Quote:
I was talking about near boundary points and not the boundary itself. Compressible flow, Given that the BCs are set correct. I may be wrong, but for example, take a simple linear one dimensional wave equation with wave travelling to the right. Now, if we use forward differencing, the solution will be unstable and will diverge. But suppose we are using 5th order backward differencing for the solution, and suppose i=1 is the boundary, then for i=2, I cannot use backward difference if I want to maintain 5th order accuracy. So won't this(using forward differencing for two or three points next to i=1) create a problem in the solution? I know this cannot be extended to Navier stokes equations, but I am trying to imply something similar. |
||
October 5, 2016, 13:36 |
|
#6 | |
Senior Member
Filippo Maria Denaro
Join Date: Jul 2010
Posts: 6,768
Rep Power: 71 |
Quote:
but you are doing the wrong BC in your example...you are talking of the Cauchy problem df/dt+u*df/dx=0 with u a positive constant. Now, you have to specify initial and one boundary condition to be prescribed on the inflow. To be the problem well posed, you have to prescribe the value of the function f0(t) (Dirichlet) at the inflow, no derivative can be prescribed so there is no problem. On the other side, no boundary condition is prescribed at the outflow since the solution comes from the interior. So you can numerically use a backward discretization. |
||
October 5, 2016, 14:19 |
|
#7 |
Senior Member
Filippo Maria Denaro
Join Date: Jul 2010
Posts: 6,768
Rep Power: 71 |
I forgot to say that this requirement means that you need to have all information to be known also for higher order discretization for points near the inflow.
For example, the equation written for the node i=2 (i=1 is the inflow) that would require nodes i=0, -1... requires that these values must be known. You cannot prescribe extrapolation from the interior. Some approaches reduced the order of the discretization near the boundary. |
|
October 5, 2016, 14:42 |
|
#8 |
New Member
Pawan Kerkar
Join Date: Sep 2016
Posts: 29
Rep Power: 9 |
Thanks a lot.
So a further question(thanks for being patient). Can this be extended to navier stokes, it being more of hyperbolic in nature for high Reynolds number? That some of the characteristic waves are traveling in direction, say to the right, where a forward difference is like using values that are ahead of the wave. |
|
October 5, 2016, 14:57 |
|
#9 | |
Senior Member
Filippo Maria Denaro
Join Date: Jul 2010
Posts: 6,768
Rep Power: 71 |
Quote:
|
||
October 5, 2016, 21:32 |
|
#10 |
Senior Member
adrin
Join Date: Mar 2009
Posts: 115
Rep Power: 17 |
If I understand the subsequent clarification by pawank, the main question here is not necessarily the application of BC but high-order discretization of the spatial gradients near the boundary. Note the reference to i=2, where i=1 is the boundary.
adrin |
|
October 5, 2016, 22:37 |
|
#11 |
New Member
Pawan Kerkar
Join Date: Sep 2016
Posts: 29
Rep Power: 9 |
Yes.. you are right.
|
|
October 5, 2016, 22:49 |
|
#12 | |
New Member
Pawan Kerkar
Join Date: Sep 2016
Posts: 29
Rep Power: 9 |
Quote:
Ok. So won't this be a factor when you consider that we are using forward/backward discretisation near the boundary, without giving any consideration to which way the characteristic waves are travelling? say at i=2 a wave is travelling to the right near the inflow boundary(i=1), but we are using forward discretisation, so isn't it something similar to prescribing extrapolation from the interior for a 1D wave equation? |
||
October 6, 2016, 03:23 |
|
#13 |
Senior Member
Filippo Maria Denaro
Join Date: Jul 2010
Posts: 6,768
Rep Power: 71 |
you must not violate the hyperbolic characteristic of directionality in wave propagation, but you have to consider the proper BC.s you are considering.In the previous example, at i=2 if you have a second order backward derivative (u>0 in the scalar wave equation), i=1 is at the boundary and i=0 is a "ghost" node.
Now you have to consider what your problem prescribe. If the function f is constant at the inflow, is correct to prescribe f(0)=f(1). On the other side, if you have a constant inflow of the function f at the inflow, you know that df/dx=0, too. So you can construct a high order spline and using more than second order discretization at i=2. This way you never violate the wave propagation. Note that in case of ENO, WENO reconstruction this must be properly considered. |
|
October 6, 2016, 07:31 |
|
#14 | |
New Member
Pawan Kerkar
Join Date: Sep 2016
Posts: 29
Rep Power: 9 |
Quote:
|
||
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
Implementing third order derivatives in OpenFOAM | asmale | OpenFOAM Programming & Development | 2 | November 7, 2013 16:21 |
1st order vs 2nd order | ken | FLUENT | 8 | March 14, 2013 03:43 |
weno upwind 5th order 1 d code | Chi | Main CFD Forum | 1 | March 11, 2007 22:44 |
2nd order derivative calculation at the boundaries | Vishal | FLUENT | 0 | May 25, 2006 06:54 |
4th and 5th Order TVD Runge-Kutta Methods | saygin | Main CFD Forum | 2 | January 30, 2006 11:45 |