CFD Online Discussion Forums

CFD Online Discussion Forums (https://www.cfd-online.com/Forums/)
-   Main CFD Forum (https://www.cfd-online.com/Forums/main/)
-   -   For 2nd order scheme, how to put boundary conditions? (https://www.cfd-online.com/Forums/main/134370-2nd-order-scheme-how-put-boundary-conditions.html)

northfly April 28, 2014 21:58

For 2nd order scheme, how to put boundary conditions?
 
We all know for 1st order scheme, for example upwind, it is easy to set the boundary conditions,

for example, if it is a wall, just give it zero for the first cell located on the wall.

If it is a 2nd order scheme, for example QUICK, it may require 2 points to calculate, the I may need to calculate the 3rd layer cells, maybe I will need 1st and 2nd layer cells to calculate, now the 1st layer maybe a wall, and value is zero, how about the 2nd layer one? How to put a boundary conditions there? THanks.

beer April 30, 2014 03:03

Hi

As far as I know Quick is 3rd order. Anyway.. The easiest way is surely to change to first order upwind near the wall. For a more sophisticated calculation, where you can't use 1st order consider switching to second order upwind or central differencing, if the peclect number is low enough.

Apart from that you will never use the second layer inside a wall for reconstruction if you use 2nd order or 3rd order upwind (Quick).



Regards

northfly April 30, 2014 04:38

Quote:

Originally Posted by beer (Post 489059)
Hi

As far as I know Quick is 3rd order. Anyway.. The easiest way is surely to change to first order upwind near the wall. For a more sophisticated calculation, where you can't use 1st order consider switching to second order upwind or central differencing, if the peclect number is low enough.

Apart from that you will never use the second layer inside a wall for reconstruction if you use 2nd order or 3rd order upwind (Quick).



Regards

Thanks Beer:

By "Apart form that......", you mean never try to use a double layer ghost cells in the wall, right? So looks like downgrade the order near boundary is the only way, right?

The other thing, Is it a good idea to always use central differencing scheme for diffussion item?

beer April 30, 2014 04:51

Hi

Yes and no. You can use as many ghost cells as you want, I personally don't really like them. But what I actually meant was that, assuming you have no convection on the face between the solid cell (or wall) and the fluid cell, there is no need to use the second layer anyway.
Just draw a picture of QUICK with 3 cells. It uses 2 upwind cells and one downwind one. Like I said before, the face lies inside the fluid domain and has thus fluid cells left and right of it. Now the second upwind cell is the only one that can be a solid cell, wall, ghost cell or whatsoever. Thus you never use the second layer in that scheme. It can be different at in- and outlets, but I wouldn't use quick on those boundaries either.

To central differencing for diffusion: Yes :D.
Honestly I have never seen anybody using a different approach. Just remember to use the cross flux correction or mesh transformation if your mesh is skewed.


Regards


All times are GMT -4. The time now is 20:34.