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

Numerical implementation of Boundary conditions in fractional step method

Register Blogs Community New Posts Updated Threads Search

Like Tree1Likes
  • 1 Post By FMDenaro

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   November 15, 2021, 19:33
Default Numerical implementation of Boundary conditions in fractional step method
  #1
Member
 
Join Date: Feb 2011
Posts: 41
Rep Power: 15
jollage is on a distinguished road
Hello,

I know there are a lot of debates on the choice of the boundary conditions in the fractional step method. I'm reading Kim and Moin's 1985 JCP paper. I can understand most of it but have some difficulty in understanding the boundary conditions. May I ask the following question?

In their paper, see the screenshot below, where they used Taylor series to get boundary conditions for the intermediate velocities, it requires to evaluate the derivative of phi on the boundary. In staggered grid, phi is defined on the center of cells. Does it mean that we should use one-sided finite difference method to get the derivatives of phi on the boundaries (basically extrapolation)? Thanks.

Screenshot 2021-11-16 at 08.27.52.jpg
jollage is offline   Reply With Quote

Old   November 16, 2021, 04:00
Default
  #2
Senior Member
 
Filippo Maria Denaro
Join Date: Jul 2010
Posts: 6,782
Rep Power: 71
FMDenaro has a spectacular aura aboutFMDenaro has a spectacular aura aboutFMDenaro has a spectacular aura about
Quote:
Originally Posted by jollage View Post
Hello,

I know there are a lot of debates on the choice of the boundary conditions in the fractional step method. I'm reading Kim and Moin's 1985 JCP paper. I can understand most of it but have some difficulty in understanding the boundary conditions. May I ask the following question?

In their paper, see the screenshot below, where they used Taylor series to get boundary conditions for the intermediate velocities, it requires to evaluate the derivative of phi on the boundary. In staggered grid, phi is defined on the center of cells. Does it mean that we should use one-sided finite difference method to get the derivatives of phi on the boundaries (basically extrapolation)? Thanks.

Attachment 87141

Actually no. The derivative is evaluated at the previous time step, thus you have already solved the Poisson problem with the Neumann BCs and your d(phi)/dn is already computed.


However, be carefull that the second order Taylor series does not imply that the BCs produces a second order accurate truncation error, you can see that it is a firts order accurate BC.
FMDenaro is offline   Reply With Quote

Old   November 16, 2021, 04:16
Default
  #3
Member
 
Join Date: Feb 2011
Posts: 41
Rep Power: 15
jollage is on a distinguished road
Quote:
Originally Posted by FMDenaro View Post
Actually no. The derivative is evaluated at the previous time step, thus you have already solved the Poisson problem with the Neumann BCs and your d(phi)/dn is already computed.


However, be carefull that the second order Taylor series does not imply that the BCs produces a second order accurate truncation error, you can see that it is a firts order accurate BC.
Thanks for your reply, FMDenaro!

I'm not sure if I understand you correctly. In staggered grid, the pressure is defined at the cell center. For uniform grid, the boundary is half-cell-distance away from the first cell center. Even for the pressure gradient from the last time step, we still need to extrapolate in space to get the pressure gradient at the boundary. Am I right?
jollage is offline   Reply With Quote

Old   November 16, 2021, 04:26
Default
  #4
Senior Member
 
Filippo Maria Denaro
Join Date: Jul 2010
Posts: 6,782
Rep Power: 71
FMDenaro has a spectacular aura aboutFMDenaro has a spectacular aura aboutFMDenaro has a spectacular aura about
Quote:
Originally Posted by jollage View Post
Thanks for your reply, FMDenaro!

I'm not sure if I understand you correctly. In staggered grid, the pressure is defined at the cell center. For uniform grid, the boundary is half-cell-distance away from the first cell center. Even for the pressure gradient from the last time step, we still need to extrapolate in space to get the pressure gradient at the boundary. Am I right?



No. You have already the value of the derivative on the boundary, you do not need to discretize. The expression you used in the previous time step is n.(v* - vn)/dt, v* being the intermediate value of the previous time step. This is the Neumann BCs used for solving the pressure equation at tn.


To better understand, consider the intermediate velocity at the time step n+1 and that at the time step n.
FMDenaro is offline   Reply With Quote

Old   November 16, 2021, 05:08
Default
  #5
Member
 
Join Date: Feb 2011
Posts: 41
Rep Power: 15
jollage is on a distinguished road
Quote:
Originally Posted by FMDenaro View Post
No. You have already the value of the derivative on the boundary, you do not need to discretize. The expression you used in the previous time step is n.(v* - vn)/dt, v* being the intermediate value of the previous time step. This is the Neumann BCs used for solving the pressure equation at tn.


To better understand, consider the intermediate velocity at the time step n+1 and that at the time step n.
Maybe you are referring to some other formulation different than the one in Kim and Moin's paper? If it's Neumann type for pressure, I guess they will explicitly mention it?

I have written down the two steps for v velocity as you suggested (with the AB2 and CN method). Please be more specific on how to understand the issue with v^* and v^{*'}

\frac{v^*-v^n}{dt}=H(v^n,n^{n-1})+\frac{1}{2}L(v^*+v^n)

\frac{v^{n+1}-v^*}{dt}=-\frac{\partial \phi}{\partial y}

\frac{v^{*'}-v^{n+1}}{dt}=H(v^{n+1},n^{n})+\frac{1}{2}L(v^{*'}+v^{n+1})

\frac{v^{n+2}-v^{*'}}{dt}=-\frac{\partial \phi'}{\partial y}
jollage is offline   Reply With Quote

Old   November 16, 2021, 05:26
Default
  #6
Senior Member
 
Filippo Maria Denaro
Join Date: Jul 2010
Posts: 6,782
Rep Power: 71
FMDenaro has a spectacular aura aboutFMDenaro has a spectacular aura aboutFMDenaro has a spectacular aura about
The paper of Kim & Moin is exactly what I am referring. You need to consider the whole procedure. That is to compute the intermediate BCs for v* at time tn+1 you need to consider the computation of the pressure at time tn.


At the time step tn you compute the pressure problem


Div Grad phi = (1/dt) Div v*


with the Neumann BC


n.Grad phi = (1/dt) n.(v* -v)

That is you have the pressure computed in the cell center but also the evaluation of the derivatives on the faces lying on the boundary (RHS).

If you wnat, you can see that like using ghost point and computing the central derivative at second order of accuracy.
FMDenaro is offline   Reply With Quote

Old   November 16, 2021, 05:57
Default
  #7
Senior Member
 
Filippo Maria Denaro
Join Date: Jul 2010
Posts: 6,782
Rep Power: 71
FMDenaro has a spectacular aura aboutFMDenaro has a spectacular aura aboutFMDenaro has a spectacular aura about
Have also a look to these papers


https://www.researchgate.net/publica...ection_methods


https://www.researchgate.net/publica...v8onk7-JA9ssEA
FMDenaro is offline   Reply With Quote

Old   November 16, 2021, 06:24
Default
  #8
Member
 
Join Date: Feb 2011
Posts: 41
Rep Power: 15
jollage is on a distinguished road
Quote:
Originally Posted by FMDenaro View Post
I can understand your way of imposing the boundary conditions, which is in the same spirit as the one in Kim and Moin. You said that "...but also the evaluation of the derivatives on the faces lying on the boundary (RHS)." I think I'm confused by this statement. The stagger grid I use is attached. For example, for v (red arrows), I don't define it on the top and bottom boundaries. It seems to me that I cannot get any value of RHS of n.Grad phi = (1/dt) n.(v* -v) on the boundary for v. Please advice.

Screenshot 2021-11-16 at 19.17.54.jpg
jollage is offline   Reply With Quote

Old   November 16, 2021, 06:40
Default
  #9
Senior Member
 
Filippo Maria Denaro
Join Date: Jul 2010
Posts: 6,782
Rep Power: 71
FMDenaro has a spectacular aura aboutFMDenaro has a spectacular aura aboutFMDenaro has a spectacular aura about
Quote:
Originally Posted by jollage View Post
I can understand your way of imposing the boundary conditions, which is in the same spirit as the one in Kim and Moin. You said that "...but also the evaluation of the derivatives on the faces lying on the boundary (RHS)." I think I'm confused by this statement. The stagger grid I use is attached. For example, for v (red arrows), I don't define it on the top and bottom boundaries. It seems to me that I cannot get any value of RHS of n.Grad phi = (1/dt) n.(v* -v) on the boundary for v. Please advice.

Attachment 87148



In fact, for a staggered grid the tangential components is posed badly ... I highlighted this problem in the paper and the need to have more accurate intermediate BCs.


Clearly, you could think u* located at a ghost node or considering a different derivative for the diffusive term along y in such a way to have the last cells close to the boundaries of half size and u* located exactly on the boundary. Then you have to construct the tangential derivative d phi/dt along the boundary.
FMDenaro is offline   Reply With Quote

Old   November 16, 2021, 06:42
Default
  #10
Senior Member
 
Filippo Maria Denaro
Join Date: Jul 2010
Posts: 6,782
Rep Power: 71
FMDenaro has a spectacular aura aboutFMDenaro has a spectacular aura aboutFMDenaro has a spectacular aura about
Quote:
Originally Posted by jollage View Post
I can understand your way of imposing the boundary conditions, which is in the same spirit as the one in Kim and Moin. You said that "...but also the evaluation of the derivatives on the faces lying on the boundary (RHS)." I think I'm confused by this statement. The stagger grid I use is attached. For example, for v (red arrows), I don't define it on the top and bottom boundaries. It seems to me that I cannot get any value of RHS of n.Grad phi = (1/dt) n.(v* -v) on the boundary for v. Please advice.

Attachment 87148



Note that the red arrows must be defined also on top and bottom boundaries
FMDenaro is offline   Reply With Quote

Old   November 16, 2021, 09:29
Default
  #11
Member
 
Join Date: Feb 2011
Posts: 41
Rep Power: 15
jollage is on a distinguished road
Quote:
Originally Posted by FMDenaro View Post
In fact, for a staggered grid the tangential components is posed badly ... I highlighted this problem in the paper and the need to have more accurate intermediate BCs.


Clearly, you could think u* located at a ghost node or considering a different derivative for the diffusive term along y in such a way to have the last cells close to the boundaries of half size and u* located exactly on the boundary. Then you have to construct the tangential derivative d phi/dt along the boundary.
Our discussions seem diverging... I appreciate you sending me your publications, but my initial question asks how to implement Kim and Moin's method of imposing their boundary conditions. I guess your last post implies that one-sided FD method is applicable?

Because I impose no-slip boundary conditions for the v velocity (red arrows), I don't have to include these boundary grid points in the solution process, right? I already know their values.
jollage is offline   Reply With Quote

Old   November 16, 2021, 09:43
Default
  #12
Senior Member
 
sbaffini's Avatar
 
Paolo Lampitella
Join Date: Mar 2009
Location: Italy
Posts: 2,159
Blog Entries: 29
Rep Power: 39
sbaffini will become famous soon enoughsbaffini will become famous soon enough
Send a message via Skype™ to sbaffini
The Taylor series is used to eventually obtain the dp/dn bc for the pressure, which is needed on the boundary faces of the pressure cells. But the resulting dp/dn for a given face is, in fact, only dependent from the velocity known on that very face, the normal to the face velocity.

Also, that very velocity (the normal to the face), also happens to appear in the source term for the neighbor cell in the pressure equation so, in the end, they cancel each other out.
sbaffini is offline   Reply With Quote

Old   November 16, 2021, 09:44
Default
  #13
Senior Member
 
Filippo Maria Denaro
Join Date: Jul 2010
Posts: 6,782
Rep Power: 71
FMDenaro has a spectacular aura aboutFMDenaro has a spectacular aura aboutFMDenaro has a spectacular aura about
Quote:
Originally Posted by jollage View Post
Our discussions seem diverging... I appreciate you sending me your publications, but my initial question asks how to implement Kim and Moin's method of imposing their boundary conditions. I guess your last post implies that one-sided FD method is applicable?

Because I impose no-slip boundary conditions for the v velocity (red arrows), I don't have to include these boundary grid points in the solution process, right? I already know their values.

No, you are wrong. The intermediate velocity on the wall is not the physical velocity! The formula proposed by Kim and Moin is valid everywhere and you have to use for both u* and v* along the walls.
FMDenaro is offline   Reply With Quote

Old   November 16, 2021, 09:48
Default
  #14
Senior Member
 
Filippo Maria Denaro
Join Date: Jul 2010
Posts: 6,782
Rep Power: 71
FMDenaro has a spectacular aura aboutFMDenaro has a spectacular aura aboutFMDenaro has a spectacular aura about
Quote:
Originally Posted by sbaffini View Post
The Taylor series is used to eventually obtain the dp/dn bc for the pressure, which is needed on the boundary faces of the pressure cells. But the resulting dp/dn for a given face is, in fact, only dependent from the velocity known on that very face, the normal to the face velocity.

Also, that very velocity (the normal to the face), also happens to appear in the source term for the neighbor cell in the pressure equation so, in the end, they cancel each other out.



That's correct but the devil is in the details... using the implicit formulation (CN) requires to prescribe the Taylor expansion also for the tangential velocity and the tangential pressure gradient must be evaluated. And there ... is the devil. All that is in the approximation produces the so-called numerical boundary layer. And if the decomposition is not orthogonal, the error in the pressure enters into the tangential velocity and viceversa.
sbaffini likes this.
FMDenaro is offline   Reply With Quote

Reply


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
Table bounds warnings at: END OF TIME STEP CFXer CFX 4 July 16, 2020 23:44
UDF for Automatic Solution Initialization for previous case data file gartz89 Fluent UDF and Scheme Programming 6 March 30, 2020 07:38
Error - Solar absorber - Solar Thermal Radiation MichaelK CFX 12 September 1, 2016 05:15
Problem with SIMPLEC-like finite volume channel flow boundary conditions ghobold Main CFD Forum 3 June 15, 2015 11:14
Water subcooled boiling Attesz CFX 7 January 5, 2013 03:32


All times are GMT -4. The time now is 02:22.