# How to apply zero gradient pressure BC on tilted grid?

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

 March 15, 2023, 08:04 How to apply zero gradient pressure BC on tilted grid? #1 New Member   Yujoo KANG Join Date: Jul 2020 Location: South Korea Posts: 2 Rep Power: 0 Dear all, I'm glad to post my fist question. I'm developing my own finite difference method (FDM) code to solve compressible NS equations. My simulation is unstable because of the boundary condition at the wall. I use the isothermal-nonslip boundary condition. so, uvw is zero and T is constant and P should satisfy dP/dn=0 and rho is from P=rho*R*T. The problem is dP/dn=0 since the grid points and wall is not orthogonal. Here is an example of my mesh. slash is grid point (sorry.. real picture doesn't appear....) ........./ ......../ ......./ ....../ ...../ ------------- wall If the points are orthogonal to the wall, I can directly use the equation P0=P1 in 1st order or P0=2/3(2*P1-1/2*P2) in 2nd order. However, I don't have good idea how to apply dP/dn=0 in tilted grid. If you have a good idea, please help me. Thank you for reading this.

 March 15, 2023, 09:09 #2 Senior Member     Paolo Lampitella Join Date: Mar 2009 Location: Italy Posts: 2,157 Blog Entries: 29 Rep Power: 39 Your wall face pressure should be equal to the pressure in the point that is the projection of the first cell point on the normal passing trough the face (center). That value is the first cell center value + a gradient correction. The former is typically treated implicitly and the latter explicitly However, at first order, P1 is just as good and no gradient term should be needed. Are you having troubles (besides accuracy ones) for the first order treatment?

March 15, 2023, 09:29
#3
New Member

Yujoo KANG
Join Date: Jul 2020
Location: South Korea
Posts: 2
Rep Power: 0
Quote:
 Originally Posted by sbaffini Your wall face pressure should be equal to the pressure in the point that is the projection of the first cell point on the normal passing trough the face (center). That value is the first cell center value + a gradient correction. The former is typically treated implicitly and the latter explicitly However, at first order, P1 is just as good and no gradient term should be needed. Are you having troubles (besides accuracy ones) for the first order treatment?

For FDM simulation, I use 6th-order discretization.
When I apply the P0=P1, there's a big oscillation from the wall that makes the simulation very very unstable. So, I usually used 3rd-order dP/dn=0 in the orthogonal grid. But recently I use non-orthogonal grid and P0=P1 is not good solution for my simulation...

Thank u again!

 March 15, 2023, 09:38 #4 Senior Member     Paolo Lampitella Join Date: Mar 2009 Location: Italy Posts: 2,157 Blog Entries: 29 Rep Power: 39 Oh, ok, I don't think then the gradient solution is going to help here. However, it is based on a taylor series expansion of the pressure in the point along the normal starting from 1, something used in 2nd order unstructured codes. If you know the gradient in 1 you can extrapolate the pressure at 2nd order. I have no experience with high order codes on non orthogonal meshes, as I only ever heatd about those working in computational space with orthogonal grids. Maybe, you can use an interpolation of your choice and rewrite that as P = P1 + correction, treating the correction explicitly. But there are certainly people who would know better here for your specific case

March 15, 2023, 13:53
#5
Senior Member

Filippo Maria Denaro
Join Date: Jul 2010
Posts: 6,782
Rep Power: 71
Quote:
 Originally Posted by yujoo KANG Dear all, I'm glad to post my fist question. I'm developing my own finite difference method (FDM) code to solve compressible NS equations. My simulation is unstable because of the boundary condition at the wall. I use the isothermal-nonslip boundary condition. so, uvw is zero and T is constant and P should satisfy dP/dn=0 and rho is from P=rho*R*T. The problem is dP/dn=0 since the grid points and wall is not orthogonal. Here is an example of my mesh. slash is grid point (sorry.. real picture doesn't appear....) ........./ ......../ ......./ ....../ ...../ ------------- wall If the points are orthogonal to the wall, I can directly use the equation P0=P1 in 1st order or P0=2/3(2*P1-1/2*P2) in 2nd order. However, I don't have good idea how to apply dP/dn=0 in tilted grid. If you have a good idea, please help me. Thank you for reading this.

And why are you assuming dP/dn=0? This is a boundary layer condition that requires a very low viscosity value to be quite approximate. Actually, the normal derivative of the pressure is balanced by viscous term.

However, you can build the normal derivative from nx*dp/dx+ny*dp/dy and approximate the derivatives at a certain accuracy order using interior points.

 Tags boudary condition, cfd - post, finite difference, pressre