CFD Online Logo CFD Online URL
www.cfd-online.com
[Sponsors]
Home > Forums > Software User Forums > OpenFOAM

fixedGradient, zeroGradient?

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

Like Tree25Likes
  • 11 Post By idrama
  • 3 Post By akidess
  • 2 Post By akidess
  • 6 Post By msrinath80
  • 1 Post By Jim_Jyo
  • 2 Post By gschaider

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   August 2, 2010, 21:45
Default fixedGradient, zeroGradient?
  #1
Member
 
Join Date: Dec 2009
Posts: 33
Rep Power: 16
smillion is on a distinguished road
Hey guys,

I've been reading through the Versteeg CFD book and I'm having some trouble understanding the boundary conditions.
My question is, if you don't know the value of the pressure or velocity at the boundary then do you simply put zeroGradient or is it more complex than that?
smillion is offline   Reply With Quote

Old   August 3, 2010, 01:53
Default
  #2
Senior Member
 
Claus Meister
Join Date: Aug 2009
Location: Wiesbaden, Germany
Posts: 241
Rep Power: 17
idrama is on a distinguished road
fixedGradient bassically means that a specific value shall be assigned, for instance, no-slip condition which means U=0 at wall (Def. of fluid). Moreover, at the inlet usually a velcotiy is prescirbed.

zeroGradient means that the gradient of respective quantity is zero, meaning that the actual value is constant. Ususally, pressure is taken to be zeroGradient at a inlet, because the pressure is assumed to be constant there.

Hopfully that will help
idrama is offline   Reply With Quote

Old   August 3, 2010, 05:31
Default
  #3
Member
 
Join Date: Dec 2009
Posts: 33
Rep Power: 16
smillion is on a distinguished road
idrama thanks. But I have another question.
What boundary conditions would you put for the outlet? Because we wouldn't have any idea of the velocity and pressure values.
smillion is offline   Reply With Quote

Old   August 3, 2010, 07:50
Default
  #4
Senior Member
 
akidess's Avatar
 
Anton Kidess
Join Date: May 2009
Location: Germany
Posts: 1,377
Rep Power: 29
akidess will become famous soon enough
Quote:
Originally Posted by idrama View Post
fixedGradient bassically means that a specific value shall be assigned, for instance, no-slip condition which means U=0 at wall (Def. of fluid). Moreover, at the inlet usually a velcotiy is prescirbed.
U=0 would be fixedValue, not fixedGradient! (Dirichlet vs Neumann).
akidess is offline   Reply With Quote

Old   August 3, 2010, 07:51
Default
  #5
Senior Member
 
akidess's Avatar
 
Anton Kidess
Join Date: May 2009
Location: Germany
Posts: 1,377
Rep Power: 29
akidess will become famous soon enough
Quote:
Originally Posted by smillion View Post
idrama thanks. But I have another question.
What boundary conditions would you put for the outlet? Because we wouldn't have any idea of the velocity and pressure values.
Since you are not interested in the exact pressure value for an incompressible flow in a channel, but only pressure differences, you'd set the pressure to be 0 at the outlet and zeroGradient on the inlet.
Pirlu and mcfdma like this.
akidess is offline   Reply With Quote

Old   August 3, 2010, 10:50
Default
  #6
Senior Member
 
Claus Meister
Join Date: Aug 2009
Location: Wiesbaden, Germany
Posts: 241
Rep Power: 17
idrama is on a distinguished road
Firstly, you are right; i wrote under pressure (ain't got no time).

Actually, you can set every constant value you want at the outlet. Fact is, that in the NS equations only the alteration of the pressure is presented, e.g. dp/dx, which means that only for pressure differences are being solved. In postprocessing is it just easier to handle the pressure distribution about zero. Check it out: Make a easy pipe case with 100000 Pa and 0 Pa at the outlet. Note, my statements are only for incompressible flows. I've never dealt compressible or something else.

Good luck
idrama is offline   Reply With Quote

Old   August 6, 2010, 20:21
Default
  #7
Senior Member
 
Srinath Madhavan (a.k.a pUl|)
Join Date: Mar 2009
Location: Edmonton, AB, Canada
Posts: 703
Rep Power: 21
msrinath80 is on a distinguished road
I have provided a fairly self-explanatory derivation[1] for why the zero gradient B/C is applied for pressure at walls. The same logic can be extended to inlets as well.

References:
[1] http://www.cfd-online.com/Forums/ope...ssure-b-c.html
solefire, saba_saeb, Pirlu and 3 others like this.
msrinath80 is offline   Reply With Quote

Old   August 7, 2010, 05:35
Thumbs down
  #8
Senior Member
 
Claus Meister
Join Date: Aug 2009
Location: Wiesbaden, Germany
Posts: 241
Rep Power: 17
idrama is on a distinguished road
Hello,

I think there is something wrong! You wrote:

u_A = 0 => du_A/dn = 0 [1]

Should I have understood everything correctly, then is [1] wrong. Just consider the steady-state solution (you can find this form in every fluid mechanic textbook):

u(y)=-1/(2*mu) dp/dx (h-y)y

which has roots at 0 and h. The derivative goes as follows

u'(y)=-1/(2*mu) dp/dx (h-2*y)

which is for u'(0)=-1/(2*mu) dp/dx h != 0. All quatntites are non-zero, even dp/dx due to the pressure drop.
Furthremore, du/dn = 0 implies you would have no wall shear stresses.
Note, the presents of root of a function f at a postion t, i.e. f(t)=0, does not implie that the slope is zero.
idrama is offline   Reply With Quote

Old   August 7, 2010, 13:09
Default
  #9
Senior Member
 
Srinath Madhavan (a.k.a pUl|)
Join Date: Mar 2009
Location: Edmonton, AB, Canada
Posts: 703
Rep Power: 21
msrinath80 is on a distinguished road
I think du/dx = 0 and dv/dx =0 are vaild as both u and v at the bottom wall do not change in the X-direction. Also, in the derivation, I have NOT assumed du/dy=0, which means that the wall shear stress is free to exist.
msrinath80 is offline   Reply With Quote

Old   August 7, 2010, 13:15
Default
  #10
Senior Member
 
Srinath Madhavan (a.k.a pUl|)
Join Date: Mar 2009
Location: Edmonton, AB, Canada
Posts: 703
Rep Power: 21
msrinath80 is on a distinguished road
Ah, I think I know what happened. You have confused my "x" for "n". Just for clarification, nowhere in the derivation have I ever assumed/stated that du/dn = 0 at the wall. There are no derivatives with respect to 'n' in my derivation. That's why I clearly marked out the co-ordinate system as X and Y.

Last edited by msrinath80; August 7, 2010 at 15:10.
msrinath80 is offline   Reply With Quote

Old   August 30, 2012, 11:03
Default
  #11
Member
 
Join Date: Jul 2012
Posts: 31
Rep Power: 13
kpax is on a distinguished road
hey guys,

i think i have to revive this thread, because i dont quite understand the following statements:

Firstly,

Quote:
Originally Posted by idrama View Post
Ususally, pressure is taken to be zeroGradient at a inlet, because the pressure is assumed to be constant there.
How can the pressure be assumed to be constant at the inlet? In the simple case of stationary flow in a cylindrical tube, e.g., the pressure gradient is non-zero for every point in the tube (dp/dz = -delta P / L).


Quote:
Originally Posted by msrinath80 View Post
I have provided a fairly self-explanatory derivation[1] for why the zero gradient B/C is applied for pressure at walls. The same logic can be extended to inlets as well.l
You assumed zero velocity at the wall (no-slip). clearly, this cannot be assumed for the inlet, right?


Please correct me if I'm wrong, but zeroGradient for p at inlet doesn't seem to make sense to me.
kpax is offline   Reply With Quote

Old   June 13, 2018, 09:36
Question
  #12
New Member
 
XU XIAOJUN
Join Date: Feb 2018
Location: Tokyo
Posts: 2
Rep Power: 0
Jim_Jyo is on a distinguished road
Quote:
Originally Posted by idrama View Post
zeroGradient means that the gradient of respective quantity is zero, meaning that the actual value is constant. Ususally, pressure is taken to be zeroGradient at a inlet, because the pressure is assumed to be constant there.
Dear idrama

Thanks for your explanation, It's very helpful.

But I still have a question about the gradient. Dose zeroGradient means the gradient of respective quantity to the time is zero? or space? Since you said the actual value is a constant. I suppose it to be the time. Am I right?

Jo
granzer likes this.
__________________
&追梦人&
Jim_Jyo is offline   Reply With Quote

Old   June 13, 2018, 10:49
Default
  #13
Assistant Moderator
 
Bernhard Gschaider
Join Date: Mar 2009
Posts: 4,225
Rep Power: 51
gschaider will become famous soon enoughgschaider will become famous soon enough
Quote:
Originally Posted by Jim_Jyo View Post
Dear idrama

Thanks for your explanation, It's very helpful.

But I still have a question about the gradient. Dose zeroGradient means the gradient of respective quantity to the time is zero? or space? Since you said the actual value is a constant. I suppose it to be the time. Am I right?

Jo

No. In space. In the direction normal to the patch.

"Constant in time" would be fixedValue
granzer and SHUBHAM9595 like this.
__________________
Note: I don't use "Friend"-feature on this forum out of principle. Ah. And by the way: I'm not on Facebook either. So don't be offended if I don't accept your invitation/friend request
gschaider is offline   Reply With Quote

Old   June 14, 2018, 04:51
Default
  #14
New Member
 
XU XIAOJUN
Join Date: Feb 2018
Location: Tokyo
Posts: 2
Rep Power: 0
Jim_Jyo is on a distinguished road
Dear gschaider

Thanks for your quick reply. I got it.
Thank you!

Jo
__________________
&追梦人&
Jim_Jyo is offline   Reply With Quote

Old   July 5, 2021, 00:13
Default
  #15
Senior Member
 
qutadah
Join Date: Jun 2021
Location: USA
Posts: 101
Rep Power: 4
qutadah.r is on a distinguished road
and what about zero with time?
qutadah.r is offline   Reply With Quote

Old   July 7, 2021, 18:29
Default
  #16
Assistant Moderator
 
Bernhard Gschaider
Join Date: Mar 2009
Posts: 4,225
Rep Power: 51
gschaider will become famous soon enoughgschaider will become famous soon enough
Quote:
Originally Posted by qutadah.r View Post
and what about zero with time?

You mean a boundary condition whose value doesn't change over time? That is called fixedValue
__________________
Note: I don't use "Friend"-feature on this forum out of principle. Ah. And by the way: I'm not on Facebook either. So don't be offended if I don't accept your invitation/friend request
gschaider is offline   Reply With Quote

Old   January 8, 2022, 09:17
Default
  #17
New Member
 
Guo Zongchao
Join Date: Nov 2021
Posts: 8
Rep Power: 4
Crane_ is on a distinguished road
Hello, everyone.
I meet a trouble while setting pressure gradient. My inlet pressure gradient is time-varying, and there is a formula. FixedValue and fixedGradient are all useless for me. How could I write this inlet condition? I would appreciate it if someone could give me some ideas.
Crane_ 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
interFoam andrea.pasquali OpenFOAM 8 February 23, 2021 13:06
fixedGradient BC type with the channelOodles solver Bedotto OpenFOAM Running, Solving & CFD 5 April 15, 2019 10:49
Pressure instability with rhoSimpleFoam daniel_mills OpenFOAM Running, Solving & CFD 44 February 17, 2011 18:08
ZeroGradient pressure Outlet BC prob (adjustPhi.C) Stylianos OpenFOAM 3 March 23, 2010 13:28
zeroGradient pressure and moving mesh kassiotis OpenFOAM Running, Solving & CFD 0 July 22, 2009 10:28


All times are GMT -4. The time now is 23:46.