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

Simple explain for satisfying boundary conditions in Stam and Bridson papers

Register Blogs Community New Posts Updated Threads Search

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   June 1, 2017, 17:10
Default Simple explain for satisfying boundary conditions in Stam and Bridson papers
  #1
New Member
 
Join Date: Mar 2017
Posts: 16
Rep Power: 9
AnasVFX is on a distinguished road
I read Stable Fluids by Jos Stam and FLUID SIMULATION SIGGRAPH 2007 Course Notes by Robert Bridson. The boundary conditions in the two papers are different in my sight. I don't understand them. How are these two ways related to solving a linear system of PDEs with boundary conditions?

In Stam's paper, he uses a function called set_bnd to set boundaries, so is this function just setting the boundaries that I need in my matrix of linear systems of Pressure Poisson and Diffuse Equation? In Numerical Analysis, we don't modify the matrix with the boundary values, but we put the boundary condition either it's a Neumann or Dirichlet. I don't really understand what kind of boundaries is this set_bnd function. My thinking now is that it sets the boundary values which will be used to solve linear systems but what kind of boundaries?

In Bridson's paper, I don't find any implementation about boundaries except for speaking about the normal components of velocity. Actually, I can't find any relation between this and Stam's way. In the section on making fluid incompressible, he says something about boundaries but I don't understand. He just satisfies boundary conditions on the boundary cells then he solves the system or he put the boundaries in the matrix? Actually I don't know how to satisfy u*n = u_solid * n which I think is the no stick boundaries for interacting between a fluid and solid boundaries.
AnasVFX is offline   Reply With Quote

Old   June 1, 2017, 17:17
Default
  #2
Senior Member
 
Filippo Maria Denaro
Join Date: Jul 2010
Posts: 6,849
Rep Power: 73
FMDenaro has a spectacular aura aboutFMDenaro has a spectacular aura aboutFMDenaro has a spectacular aura about
Quote:
Originally Posted by AnasVFX View Post
I read Stable Fluids by Jos Stam and FLUID SIMULATION SIGGRAPH 2007 Course Notes by Robert Bridson. The boundary conditions in the two papers are different in my sight. I don't understand them. How are these two ways related to solving a linear system of PDEs with boundary conditions?

In Stam's paper, he uses a function called set_bnd to set boundaries, so is this function just setting the boundaries that I need in my matrix of linear systems of Pressure Poisson and Diffuse Equation? In Numerical Analysis, we don't modify the matrix with the boundary values, but we put the boundary condition either it's a Neumann or Dirichlet. I don't really understand what kind of boundaries is this set_bnd function. My thinking now is that it sets the boundary values which will be used to solve linear systems but what kind of boundaries?

In Bridson's paper, I don't find any implementation about boundaries except for speaking about the normal components of velocity. Actually, I can't find any relation between this and Stam's way. In the section on making fluid incompressible, he says something about boundaries but I don't understand. He just satisfies boundary conditions on the boundary cells then he solves the system or he put the boundaries in the matrix? Actually I don't know how to satisfy u*n = u_solid * n which I think is the no stick boundaries for interacting between a fluid and solid boundaries.

That's not correct...when you prescribe Neumann BC.s, some entries of the matrix are changed.
FMDenaro is offline   Reply With Quote

Old   June 1, 2017, 17:54
Default
  #3
New Member
 
Join Date: Mar 2017
Posts: 16
Rep Power: 9
AnasVFX is on a distinguished road
I mean that if we just have a dirichlet or Neumann condition like u'(0)=1,we can just evaluate u (0) and put it in the first row of the matrix
Another thing, when we just solve the pressure poisson equation, if we just solve at the slip boundary conditions u.n = u.solid , do we use the pressure normal derivative boundary condition (partial P / Partial n =0)? Or we just use this pressure condition in the no slip condition?
AnasVFX is offline   Reply With Quote

Old   June 1, 2017, 18:05
Default
  #4
Senior Member
 
Filippo Maria Denaro
Join Date: Jul 2010
Posts: 6,849
Rep Power: 73
FMDenaro has a spectacular aura aboutFMDenaro has a spectacular aura aboutFMDenaro has a spectacular aura about
We recently discussed about BC.s for the pressure equation in this thread:
pressure boundary conditions for collocated grid for Navier-Stokes
FMDenaro is offline   Reply With Quote

Old   June 1, 2017, 22:06
Default
  #5
New Member
 
Join Date: Mar 2017
Posts: 16
Rep Power: 9
AnasVFX is on a distinguished road
I am reading but my question is a lot simpler. I just want to solve the pressure poisson equation with the slip boundary conditions. The condition for the velocity is u*n = usolid*n which I don't know how to satisfy in the simulation. Another condition for the pressure, will it be the normal derivative of pressure =0? Is it different from the collocation grids and mac grids(staggered grid)? Please I am a beginner and seeking your help please be patient with me and help although my questions are stupid.
AnasVFX is offline   Reply With Quote

Old   June 1, 2017, 23:27
Default
  #6
Senior Member
 
Filippo Maria Denaro
Join Date: Jul 2010
Posts: 6,849
Rep Power: 73
FMDenaro has a spectacular aura aboutFMDenaro has a spectacular aura aboutFMDenaro has a spectacular aura about
Quote:
Originally Posted by AnasVFX View Post
I am reading but my question is a lot simpler. I just want to solve the pressure poisson equation with the slip boundary conditions. The condition for the velocity is u*n = usolid*n which I don't know how to satisfy in the simulation. Another condition for the pressure, will it be the normal derivative of pressure =0? Is it different from the collocation grids and mac grids(staggered grid)? Please I am a beginner and seeking your help please be patient with me and help although my questions are stupid.
As you see, a tangential bc is not involved in the pressure equation...slip or no-slip bc is prescribed in the momentum.
For the pressure equation, to be well posed the problem, you prescribe:

dp/dn=n.(v*-v)
FMDenaro is offline   Reply With Quote

Old   June 2, 2017, 01:04
Default
  #7
New Member
 
Join Date: Mar 2017
Posts: 16
Rep Power: 9
AnasVFX is on a distinguished road
Can you take a look at the paper of Bridson? He didn't apply this boundary you said. I don't know actually how to apply the boundary of the pressure in the equation pf pressure poisson. His way is totally confusing and I can't understand the usage of velocity solid boundaries. He doesn't talk about the pressure boundaries. Please if you have a source or an explanation to clarify all of this confusion about boundaries please send me it. Thanks and cheers. What do you mean that it's prescribed in the momentum?
AnasVFX is offline   Reply With Quote

Old   June 2, 2017, 03:50
Default
  #8
Senior Member
 
Filippo Maria Denaro
Join Date: Jul 2010
Posts: 6,849
Rep Power: 73
FMDenaro has a spectacular aura aboutFMDenaro has a spectacular aura aboutFMDenaro has a spectacular aura about
Quote:
Originally Posted by AnasVFX View Post
Can you take a look at the paper of Bridson? He didn't apply this boundary you said. I don't know actually how to apply the boundary of the pressure in the equation pf pressure poisson. His way is totally confusing and I can't understand the usage of velocity solid boundaries. He doesn't talk about the pressure boundaries. Please if you have a source or an explanation to clarify all of this confusion about boundaries please send me it. Thanks and cheers. What do you mean that it's prescribed in the momentum?

He describes the bc.s at the wall in terms of Neumann condition, see the section at page 27.
FMDenaro is offline   Reply With Quote

Old   June 2, 2017, 13:22
Default
  #9
New Member
 
Join Date: Mar 2017
Posts: 16
Rep Power: 9
AnasVFX is on a distinguished road
Quote:
Originally Posted by FMDenaro View Post
He describes the bc.s at the wall in terms of Neumann condition, see the section at page 27.
So when we use the boundary partial p / partial n = 0? In the sli condition only?
AnasVFX is offline   Reply With Quote

Old   June 2, 2017, 13:29
Default
  #10
Senior Member
 
Filippo Maria Denaro
Join Date: Jul 2010
Posts: 6,849
Rep Power: 73
FMDenaro has a spectacular aura aboutFMDenaro has a spectacular aura aboutFMDenaro has a spectacular aura about
Quote:
Originally Posted by AnasVFX View Post
So when we use the boundary partial p / partial n = 0? In the sli condition only?

No, the Neumann condition implies only the normal component of the velocity, that means physically permeable/not-permeable wall. The tangential condition is prescribed ONLY in the momentum equations.
FMDenaro is offline   Reply With Quote

Old   June 2, 2017, 15:25
Default
  #11
New Member
 
Join Date: Mar 2017
Posts: 16
Rep Power: 9
AnasVFX is on a distinguished road
Quote:
Originally Posted by FMDenaro View Post
No, the Neumann condition implies only the normal component of the velocity, that means physically permeable/not-permeable wall. The tangential condition is prescribed ONLY in the momentum equations.
I read in Stam's ways of implementing a Fluid solvers that we use this normal derivative boundary condition to solve the pressure poisson problem. And he said that we use this zero normal derivative of pressure. Actually I don't understand what you mean with prescribed only in the momentum. Thanks for your time and help cheers.
AnasVFX is offline   Reply With Quote

Old   June 2, 2017, 15:31
Default
  #12
Senior Member
 
Filippo Maria Denaro
Join Date: Jul 2010
Posts: 6,849
Rep Power: 73
FMDenaro has a spectacular aura aboutFMDenaro has a spectacular aura aboutFMDenaro has a spectacular aura about
Quote:
Originally Posted by AnasVFX View Post
I read in Stam's ways of implementing a Fluid solvers that we use this normal derivative boundary condition to solve the pressure poisson problem. And he said that we use this zero normal derivative of pressure. Actually I don't understand what you mean with prescribed only in the momentum. Thanks for your time and help cheers.

The pressure equation requires only one boundary condition that is prescribed in term of the normal component of the velocity (by meanso of the Neumann condition) to fulfill the divergence-free constraint. That does not imply that you fix also the tangential component of the velocity, this latter being prescribed when solving the momentum equation.
Setting dp/dn=0 implies that n.v*=n.v_n+1
FMDenaro is offline   Reply With Quote

Old   June 2, 2017, 17:30
Default
  #13
New Member
 
Join Date: Mar 2017
Posts: 16
Rep Power: 9
AnasVFX is on a distinguished road
Quote:
Originally Posted by FMDenaro View Post
The pressure equation requires only one boundary condition that is prescribed in term of the normal component of the velocity (by meanso of the Neumann condition) to fulfill the divergence-free constraint. That does not imply that you fix also the tangential component of the velocity, this latter being prescribed when solving the momentum equation.
Setting dp/dn=0 implies that n.v*=n.v_n+1
I am really sorry I still don't understand the relationship between the normal derivative of pressure and the solid boundaries. Actually I don't know how to force u.n =u.solid.n
in the code I am totally confused
AnasVFX is offline   Reply With Quote

Old   June 2, 2017, 17:37
Default
  #14
Senior Member
 
Filippo Maria Denaro
Join Date: Jul 2010
Posts: 6,849
Rep Power: 73
FMDenaro has a spectacular aura aboutFMDenaro has a spectacular aura aboutFMDenaro has a spectacular aura about
The Neumann BC is derived from the momentum equation written in the form of the Hodge decomposition:

v_n+1 + Grad phi = v*

you have just to project along the vector unit n.
But if you do not have a theoretical background about the numerical formulation for the incompressible form, I suggest to start with a good texbook of CFD.
FMDenaro is offline   Reply With Quote

Old   June 2, 2017, 17:53
Default
  #15
New Member
 
Join Date: Mar 2017
Posts: 16
Rep Power: 9
AnasVFX is on a distinguished road
In this source here in section 38.2.4
http://developer.download.nvidia.com...gems_ch38.html

He said in the boundary conditions section
Quote:
. For velocity, we use the no-slip condition, which specifies that velocity goes to zero at the boundaries. The correct solution of the Poisson-pressure equation requires pure Neumann boundary conditionsartial p/ partial n = 0. This means that at a boundary, the rate of change of pressure in the direction normal to the boundary is zero. We revisit boundary conditions at the end of Section 38.3.
And at the end of the chapter he said
Quote:
First we should look at how our grid discretization affects the computation of boundary conditions. The no-slip condition dictates that velocity equals zero on the boundaries, and the pure Neumann pressure condition requires the normal pressure derivative to be zero at the boundaries. The boundary is defined to lie on the edge between the boundary cell and its nearest interior cell, but grid values are defined at cell centers. Therefore, we must compute boundary values such that the average of the two cells adjacent to any edge satisfies the boundary condition.

For the velocity boundary on the left side, for example, we have:

Equation 17

Here


where N is the grid resolution. In order to satisfy this equation, we must set u 0, j equal to –u 1, j . The pressure equation works out similarly. Using the forward difference approximation of the derivative, we get:

Equation 18

Here


On solving this equation for p 0, j , we see that we need to set each pressure boundary value to the value just inside the boundary.

We can use a simple fragment program for both the pressure and the velocity boundaries, as shown in Listing 38-5
So, his workflow is too different from Bridson. Now I want to know the relationship between them.
AnasVFX is offline   Reply With Quote

Old   June 2, 2017, 18:20
Default
  #16
Senior Member
 
Filippo Maria Denaro
Join Date: Jul 2010
Posts: 6,849
Rep Power: 73
FMDenaro has a spectacular aura aboutFMDenaro has a spectacular aura aboutFMDenaro has a spectacular aura about
I don't see mathematical difference in that... Sec.4 in the Bridson notes explains nothing else that a projection method based on the Hodge decomposition.
FMDenaro is offline   Reply With Quote

Old   June 2, 2017, 18:57
Default
  #17
New Member
 
Join Date: Mar 2017
Posts: 16
Rep Power: 9
AnasVFX is on a distinguished road
Quote:
Originally Posted by FMDenaro View Post
I don't see mathematical difference in that... Sec.4 in the Bridson notes explains nothing else that a projection method based on the Hodge decomposition.
stam is just implementing boundaries for the pressure and he implements equation 18 in the code to enforce the normal derivative of pressure =0
Bridson uses a different notation of the pressure at boundaries. What's the difference ?
AnasVFX is offline   Reply With Quote

Old   June 2, 2017, 19:16
Default
  #18
Senior Member
 
Filippo Maria Denaro
Join Date: Jul 2010
Posts: 6,849
Rep Power: 73
FMDenaro has a spectacular aura aboutFMDenaro has a spectacular aura aboutFMDenaro has a spectacular aura about
Prescribing homogeneous or non homogeneous Neumann bc for the pressure equation is largely discussed in literature. It has difference in terms of accuracy, you can see that dp/dn=0 is a buondary layer approximation.
However, both bc.s are mathematically correct for the Poisson problem to be well posed. Again, you cannot set the tangential velocity component in the pressure equation. Do not forget that the pressure equation is nothing else that the continuity equation. Eq.17 is prescribed for the momentum equation.
FMDenaro is offline   Reply With Quote

Old   June 2, 2017, 21:26
Default
  #19
New Member
 
Join Date: Mar 2017
Posts: 16
Rep Power: 9
AnasVFX is on a distinguished road
Quote:
Originally Posted by FMDenaro View Post
Prescribing homogeneous or non homogeneous Neumann bc for the pressure equation is largely discussed in literature. It has difference in terms of accuracy, you can see that dp/dn=0 is a buondary layer approximation.
However, both bc.s are mathematically correct for the Poisson problem to be well posed. Again, you cannot set the tangential velocity component in the pressure equation. Do not forget that the pressure equation is nothing else that the continuity equation. Eq.17 is prescribed for the momentum equation.
now , I understood . Thanks
AnasVFX is offline   Reply With Quote

Old   June 3, 2017, 05:11
Default
  #20
Senior Member
 
Filippo Maria Denaro
Join Date: Jul 2010
Posts: 6,849
Rep Power: 73
FMDenaro has a spectacular aura aboutFMDenaro has a spectacular aura aboutFMDenaro has a spectacular aura about
Ok, however the issue is not simple and requires some care. I suggest to read other references about the topic of (exact/approximate) projection methods.
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



All times are GMT -4. The time now is 19:25.