CFD Online Logo CFD Online URL
www.cfd-online.com
[Sponsors]
Home > Forums > Software User Forums > ANSYS > FLUENT > Fluent UDF and Scheme Programming

Zero gradient boundary condition

Register Blogs Community New Posts Updated Threads Search

Like Tree6Likes
  • 1 Post By sharif88
  • 2 Post By pakk
  • 2 Post By sharif88
  • 1 Post By pakk

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   September 9, 2014, 22:34
Angry Zero gradient boundary condition
  #1
New Member
 
Majid
Join Date: Jan 2014
Location: Canada
Posts: 23
Rep Power: 12
sharif88 is on a distinguished road
Hello everybody
I have a UDS which has a zero gradient normal to the wall boundary condition but I don't know how to impose that in FLUENT udf.
I am not sure if zero flux boundary is the same, if so please let me know.
I tried to use the F_AREA macro dotted by the gradient vector but I dont know how to set its value to zero so it would work.
Thanks
rarnaunot likes this.
sharif88 is offline   Reply With Quote

Old   September 11, 2014, 03:45
Default
  #2
Senior Member
 
Join Date: Nov 2013
Posts: 1,965
Rep Power: 27
pakk will become famous soon enough
At a wall (where no 'background flow' can go through), zero flux UDS is the same as zero gradient UDS normal to the wall.
sharif88 and rarnaunot like this.
pakk is offline   Reply With Quote

Old   September 24, 2014, 11:07
Default
  #3
Member
 
David
Join Date: Aug 2012
Posts: 48
Rep Power: 14
GM_XIII is on a distinguished road
Quote:
Originally Posted by sharif88 View Post
Hello everybody
I have a UDS which has a zero gradient normal to the wall boundary condition but I don't know how to impose that in FLUENT udf.
I am not sure if zero flux boundary is the same, if so please let me know.
I tried to use the F_AREA macro dotted by the gradient vector but I dont know how to set its value to zero so it would work.
Thanks
Did you finally fix this?
i think I have made something similar recently but not with UDS but it can still help
GM_XIII is offline   Reply With Quote

Old   September 24, 2014, 11:12
Default
  #4
New Member
 
Majid
Join Date: Jan 2014
Location: Canada
Posts: 23
Rep Power: 12
sharif88 is on a distinguished road
David
As pakk said the zero flux boundary at the wall is the same as zero normal gradient, I used it and it did work.
thanks
Majid
GM_XIII and rarnaunot like this.
sharif88 is offline   Reply With Quote

Old   March 13, 2017, 10:55
Default
  #5
Member
 
Rosario Arnau
Join Date: Feb 2017
Location: Spain
Posts: 57
Rep Power: 9
rarnaunot is on a distinguished road
Quote:
Originally Posted by sharif88 View Post
David
As pakk said the zero flux boundary at the wall is the same as zero normal gradient, I used it and it did work.
thanks
Majid
OK!! But how can I write zero normal gradient??

In Fluent Help it is: "Under User Defined Scalar Boundary Value, enter a constant value or select a user-defined function from the drop-down list for each scalar. If you select Specified Flux, your input will be the value of the flux at the boundary (that is, the negative of the term in parenthesis on the left-hand side of in the Theory Guide) dot [as in the dot product of] [as in the vector, n], where is the normal into the domain).(...)"

I guess that to write zero normal gradient, I should select Specified Flux but what should I write after that??? Should I use a UDF?? What should include this UDF??

Thanks a looooooooooooot
rarnaunot is offline   Reply With Quote

Old   March 14, 2017, 11:23
Default
  #6
Senior Member
 
Join Date: Nov 2013
Posts: 1,965
Rep Power: 27
pakk will become famous soon enough
Zero gradient is the same as zero flux, so you want the flux to be zero.

So what should you write after it... Zero!
rarnaunot likes this.
pakk is offline   Reply With Quote

Old   March 14, 2017, 12:57
Default
  #7
Member
 
Rosario Arnau
Join Date: Feb 2017
Location: Spain
Posts: 57
Rep Power: 9
rarnaunot is on a distinguished road
Quote:
Originally Posted by pakk View Post
Zero gradient is the same as zero flux, so you want the flux to be zero.

So what should you write after it... Zero!
We tried that but we said... This couldn't be so easy!!!

We will check the 0 again.
rarnaunot is offline   Reply With Quote

Old   March 15, 2017, 05:12
Default
  #8
Member
 
Rosario Arnau
Join Date: Feb 2017
Location: Spain
Posts: 57
Rep Power: 9
rarnaunot is on a distinguished road
Quote:
Originally Posted by pakk View Post
Zero gradient is the same as zero flux, so you want the flux to be zero.

So what should you write after it... Zero!

I have tried this (attached images) but it didn't work...

The right profile (with zero gradient) should perform like the left one (without zero gradient in the walls and 0 Specific value in the walls)....I don't know where is the problem here.
Attached Images
File Type: jpg config_wall_ZF.JPG (44.9 KB, 142 views)
File Type: jpg results_without_and_with_ZF.JPG (31.6 KB, 97 views)
rarnaunot is offline   Reply With Quote

Old   March 17, 2017, 05:30
Default
  #9
Senior Member
 
Join Date: Nov 2013
Posts: 1,965
Rep Power: 27
pakk will become famous soon enough
The right one has zero flux on all the walls.
The left one has zero flux one the upper walls, and zero value on the lower walls.

These are different boundary condtions. Why would you expect them to give the same result?
pakk is offline   Reply With Quote

Old   March 17, 2017, 07:37
Default
  #10
Member
 
Rosario Arnau
Join Date: Feb 2017
Location: Spain
Posts: 57
Rep Power: 9
rarnaunot is on a distinguished road
Quote:
Originally Posted by pakk View Post
The right one has zero flux on all the walls.
Yes, and it was also initialized with zero value on the lower part and another value for the upper part

[QUOTE=pakk;641119]
The left one has zero flux one the upper walls, and zero value on the lower walls.[QUOTE]
It is without zero flux and it was also initialized with zero value on the lower part and another value for the upper part.

The only difference is the zero flux in the right one....That's why we expect a 0 value also in the lower part...
rarnaunot is offline   Reply With Quote

Old   March 17, 2017, 08:29
Default
  #11
Senior Member
 
Join Date: Nov 2013
Posts: 1,965
Rep Power: 27
pakk will become famous soon enough
I don't understand what you mean.

Zero flux is NOT the same as zero value.

You ask for zero flux, so you get zero flux. You did not ask for zero value, so you did not get zero value.


How you initialize it, is not relevant.
pakk is offline   Reply With Quote

Old   March 17, 2017, 12:34
Default I agree!
  #12
Member
 
Rosario Arnau
Join Date: Feb 2017
Location: Spain
Posts: 57
Rep Power: 9
rarnaunot is on a distinguished road
Yes! I agree with u they are different things!

My problem comes out if I compare with CFX results... I used the configuration of zero flux in CFX (steady-state simulation), and the profile for the variable was like left one (upper image). And I expect to find these same profile using the same configuration in Fluent...

To perform these profiles in Fluent, I'm using a source acting over a UDS. These simulations are in steady-state, and I've detected some problems in the behaviour of the UDS in steady-state.

Moreover, I've simulated this same case in transient conditions using Fluent, and for the different boundary conditions (right one and left one), I found very similar result for the two simulations (I attached an image), except near the walls at the inlet and the outlet, obviously due to the zero value condition.

Sorry for being a bit obtuse cause my CFX-Fluent problems! My zero flux doubt is fixed! Thanks a lot!

results_without_and_with_ZF_transient.jpg
rarnaunot is offline   Reply With Quote

Old   July 21, 2018, 11:54
Default
  #13
Senior Member
 
Reviewer #2
Join Date: Jul 2015
Location: Knoxville, TN
Posts: 141
Rep Power: 11
randolph is on a distinguished road
Quote:
Originally Posted by sharif88 View Post
David
As pakk said the zero flux boundary at the wall is the same as zero normal gradient, I used it and it did work.
thanks
Majid
This is ONLY true when the no penetration condition is applied and there is no slip velocity between the scalar velocity and fluid velocity.

Last edited by randolph; July 23, 2018 at 09:33.
randolph is offline   Reply With Quote

Old   July 23, 2018, 03:42
Default
  #14
Senior Member
 
Join Date: Nov 2013
Posts: 1,965
Rep Power: 27
pakk will become famous soon enough
Quote:
Originally Posted by randolph View Post
This is ONLY true when the penetration condition is applied and there is no slip velocity between the scalar velocity and fluid velocity.
Can you explain what you mean with "penetration condition" and what you mean with "slip velocity between scalar velocity and fluid velocity"?

The only slip velocity I know is the slip velocity between fluid and wall, and that is not relevant here.
pakk is offline   Reply With Quote

Old   July 23, 2018, 09:40
Default
  #15
Senior Member
 
Reviewer #2
Join Date: Jul 2015
Location: Knoxville, TN
Posts: 141
Rep Power: 11
randolph is on a distinguished road
Quote:
Originally Posted by pakk View Post
Can you explain what you mean with "penetration condition" and what you mean with "slip velocity between scalar velocity and fluid velocity"?

The only slip velocity I know is the slip velocity between fluid and wall, and that is not relevant here.
Sorry, I mean the no penetration condition (U_wallnormal = 0).

For fluid advected scalar (U_scalar = U_fluid), there is no slip velocity. Therefore, for the scalar transport, the no-flux (advection flux + diffusion flux = 0) BC on the wall can be simplified to zero-gradient (diffusion flux = 0) BC since the no penetration condition (U_wallnormal = 0, which indicts advection flux = 0 in the later scalar solver) has already been implemented in the fluid momentum solver. And the zero-gradient is what Fluent implement by default for the species.
randolph is offline   Reply With Quote

Old   July 24, 2018, 05:05
Default
  #16
Senior Member
 
Join Date: Nov 2013
Posts: 1,965
Rep Power: 27
pakk will become famous soon enough
Quote:
Originally Posted by randolph View Post
Sorry, I mean the no penetration condition (U_wallnormal = 0).

For fluid advected scalar (U_scalar = U_fluid), there is no slip velocity. Therefore, for the scalar transport, the no-flux (advection flux + diffusion flux = 0) BC on the wall can be simplified to zero-gradient (diffusion flux = 0) BC since the no penetration condition (U_wallnormal = 0, which indicts advection flux = 0 in the later scalar solver) has already been implemented in the fluid momentum solver. And the zero-gradient is what Fluent implement by default for the species.
OK, I see what you mean now with no-penetration condition. In 99.99% of all applications, the no-penetration condition holds on a wall, and otherwise I would not really call it a wall.


But I am still puzzled by what you mean with "For fluid advected scalar (U_scalar = U_fluid), there is no slip velocity."
For me, slip velocity means that U_fluid-U_wall is not equal to zero at the wall. But apparently you mean something else. But what? U_scalar-U_fluid? Is for you "slip velocity" the same as diffusion? I'm sorry, but I don't follow...
pakk is offline   Reply With Quote

Old   July 26, 2018, 11:11
Default
  #17
Senior Member
 
Reviewer #2
Join Date: Jul 2015
Location: Knoxville, TN
Posts: 141
Rep Power: 11
randolph is on a distinguished road
Quote:
Originally Posted by pakk View Post
OK, I see what you mean now with no-penetration condition. In 99.99% of all applications, the no-penetration condition holds on a wall, and otherwise I would not really call it a wall.


But I am still puzzled by what you mean with "For fluid advected scalar (U_scalar = U_fluid), there is no slip velocity."
For me, slip velocity means that U_fluid-U_wall is not equal to zero at the wall. But apparently you mean something else. But what? U_scalar-U_fluid? Is for you "slip velocity" the same as diffusion? I'm sorry, but I don't follow...
If the species "particle" has a very small relaxing time scale in comparison to the fluid, then you can say the velocity equilibrium between the species and fluid is established in very short time and thus the species behave like a "tracer", in which the U_scalar = U_fluid. However, this might not always be the case, such as when the density difference exists.
randolph 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
No-slip condition for non-resolved boundary layer in open channel banks Lupocci Main CFD Forum 1 January 17, 2013 04:11
Pressure gradient boundary condition for LES Far CFX 3 November 19, 2012 18:13
Calculated gradient boundary condition similar to gammaContactAngle adona058 OpenFOAM Running, Solving & CFD 0 September 26, 2007 16:23
Slip boundary condition what is inside normunds OpenFOAM Running, Solving & CFD 2 June 4, 2007 07:45
pressure gradient boundary condition kamesh FLUENT 0 May 9, 2005 15:17


All times are GMT -4. The time now is 13:49.