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

Implementing 5th or 7th order WENO(FD) near boundaries

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

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   October 3, 2016, 01:44
Default Implementing 5th or 7th order WENO(FD) near boundaries
  #1
New Member
 
Pawan Kerkar
Join Date: Sep 2016
Posts: 29
Rep Power: 9
pawank is on a distinguished road
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
pawank is offline   Reply With Quote

Old   October 3, 2016, 03:12
Default
  #2
Senior Member
 
Filippo Maria Denaro
Join Date: Jul 2010
Posts: 6,763
Rep Power: 71
FMDenaro has a spectacular aura aboutFMDenaro has a spectacular aura aboutFMDenaro has a spectacular aura about
using forward/backward discretizations
FMDenaro is online now   Reply With Quote

Old   October 5, 2016, 11:45
Default
  #3
New Member
 
Pawan Kerkar
Join Date: Sep 2016
Posts: 29
Rep Power: 9
pawank is on a distinguished road
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.
pawank is offline   Reply With Quote

Old   October 5, 2016, 12:13
Default
  #4
Senior Member
 
Filippo Maria Denaro
Join Date: Jul 2010
Posts: 6,763
Rep Power: 71
FMDenaro has a spectacular aura aboutFMDenaro has a spectacular aura aboutFMDenaro has a spectacular aura about
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.
FMDenaro is online now   Reply With Quote

Old   October 5, 2016, 13:04
Default
  #5
New Member
 
Pawan Kerkar
Join Date: Sep 2016
Posts: 29
Rep Power: 9
pawank is on a distinguished road
Quote:
Originally Posted by FMDenaro View Post
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.

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

Old   October 5, 2016, 13:36
Default
  #6
Senior Member
 
Filippo Maria Denaro
Join Date: Jul 2010
Posts: 6,763
Rep Power: 71
FMDenaro has a spectacular aura aboutFMDenaro has a spectacular aura aboutFMDenaro has a spectacular aura about
Quote:
Originally Posted by pawank View Post
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.

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

Old   October 5, 2016, 14:19
Default
  #7
Senior Member
 
Filippo Maria Denaro
Join Date: Jul 2010
Posts: 6,763
Rep Power: 71
FMDenaro has a spectacular aura aboutFMDenaro has a spectacular aura aboutFMDenaro has a spectacular aura about
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.
FMDenaro is online now   Reply With Quote

Old   October 5, 2016, 14:42
Default
  #8
New Member
 
Pawan Kerkar
Join Date: Sep 2016
Posts: 29
Rep Power: 9
pawank is on a distinguished road
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.
pawank is offline   Reply With Quote

Old   October 5, 2016, 14:57
Default
  #9
Senior Member
 
Filippo Maria Denaro
Join Date: Jul 2010
Posts: 6,763
Rep Power: 71
FMDenaro has a spectacular aura aboutFMDenaro has a spectacular aura aboutFMDenaro has a spectacular aura about
Quote:
Originally Posted by pawank View Post
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.
for high Re number, the NS equations are practically equivalent to the perturbed Euler equations...you should consider the hyperbolic character of the system.
FMDenaro is online now   Reply With Quote

Old   October 5, 2016, 21:32
Default
  #10
Senior Member
 
adrin
Join Date: Mar 2009
Posts: 115
Rep Power: 17
adrin is on a distinguished road
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
adrin is offline   Reply With Quote

Old   October 5, 2016, 22:37
Default
  #11
New Member
 
Pawan Kerkar
Join Date: Sep 2016
Posts: 29
Rep Power: 9
pawank is on a distinguished road
Quote:
Originally Posted by adrin View Post
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
Yes.. you are right.
pawank is offline   Reply With Quote

Old   October 5, 2016, 22:49
Default
  #12
New Member
 
Pawan Kerkar
Join Date: Sep 2016
Posts: 29
Rep Power: 9
pawank is on a distinguished road
Quote:
Originally Posted by FMDenaro View Post
for high Re number, the NS equations are practically equivalent to the perturbed Euler equations...you should consider the hyperbolic character of the system.

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

Old   October 6, 2016, 03:23
Default
  #13
Senior Member
 
Filippo Maria Denaro
Join Date: Jul 2010
Posts: 6,763
Rep Power: 71
FMDenaro has a spectacular aura aboutFMDenaro has a spectacular aura aboutFMDenaro has a spectacular aura about
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.
FMDenaro is online now   Reply With Quote

Old   October 6, 2016, 07:31
Default
  #14
New Member
 
Pawan Kerkar
Join Date: Sep 2016
Posts: 29
Rep Power: 9
pawank is on a distinguished road
Quote:
Originally Posted by FMDenaro View Post
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.
Thanks a lot..
pawank is offline   Reply With Quote

Reply

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
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


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