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

Herschel-Bulkley non-Newtonian viscosity model has term with sign error

Register Blogs Community New Posts Updated Threads Search

Like Tree1Likes
  • 1 Post By pbryant

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   March 1, 2011, 19:31
Default Herschel-Bulkley non-Newtonian viscosity model has term with sign error
  #1
New Member
 
Paul Bryant
Join Date: Feb 2011
Posts: 13
Rep Power: 15
pbryant is on a distinguished road
The Herschel-Bulkley (HB) non-Newtonian viscosity model in OpenFOAM contains a term with a sign error. Outside of CFD, the HB model usually consists of a yield stress tao_y below which the shear rate sr is exactly zero, sr=0, and above which the stress tao is equal to tao_y plus a simple power law function of the shear rate, tao = tao_y + k*sr^n. The model in OpenFOAM allows for a transition to Newtonian behavior when the shear rate is very low, thereby eliminating the undesirable discontinuity in the function at zero stress. The Newtonian viscosity is nu0, and the transition occurs when the stress exceeds the threshold value given by the parameter tao0. Assuming that nu0 is not infinity, tao_y and tao0 are not the same but one can be calculated from the other by matching the Newtonian and non-Newtonian forms at the transition point resulting in: tao_y = tao0 - k*(tao0/nu0)^n. This correction to tao0 can be found in the source code for the HS model but INCORRECTLY with a plus sign rather than the minus sign in front of the k. In the code from the file HerschelBulkley.C, the model gives the effective viscosity nu by dividing the above expression for tao by a factor of sr:

return (min(nu0_,(tau0_ + k_* rtone *( pow(tone * sr(), n_)
+ pow(tone*tau0_/nu0_,n_))) / (max(sr(), dimensionedScalar
("VSMALL", dimless/dimTime, VSMALL)))));

Note that the stress and viscosity are both given in kinematic form (i.e. divided by the density). The factors tone and rtone are both equal to unity but have dimensions of time and inverse time and are included to get the units correct for the result.

The CORRECTED VERSION with the sign change is:

return (min(nu0_,(tau0_ + k_* rtone *( pow(tone * sr(), n_)
- pow(tone*tau0_/nu0_,n_))) / (max(sr(), dimensionedScalar
("VSMALL", dimless/dimTime, VSMALL)))));


Note that when sr=tao0/nu0, the two pow() functions will now cancel out and give the expected result nu=tao0/sr. Without the indicated sign correction, tao0 has no obvious physical interpretation, as it is neither the stress at the transition point between the two forms nor is it the stress that would occur if the power law form was used as the shear rate approaches zero. The correction will have little effect in cases when the value of nu0 is set to a very large value to approximate infinity.
sharonyue likes this.
pbryant is offline   Reply With Quote

Old   May 6, 2011, 07:46
Default
  #2
Senior Member
 
Robert Sawko
Join Date: Mar 2009
Posts: 117
Rep Power: 22
AlmostSurelyRob will become famous soon enough
This is just to say: you're absolutely right! Thanks for sharing.
AlmostSurelyRob is offline   Reply With Quote

Old   May 7, 2011, 03:58
Default
  #3
Senior Member
 
Alberto Passalacqua
Join Date: Mar 2009
Location: Ames, Iowa, United States
Posts: 1,912
Rep Power: 36
alberto will become famous soon enoughalberto will become famous soon enough
FYI, this was fixed some time ago: http://www.openfoam.com/mantisbt/view.php?id=153
__________________
Alberto Passalacqua

GeekoCFD - A free distribution based on openSUSE 64 bit with CFD tools, including OpenFOAM. Available as in both physical and virtual formats (current status: http://albertopassalacqua.com/?p=1541)
OpenQBMM - An open-source implementation of quadrature-based moment methods.

To obtain more accurate answers, please specify the version of OpenFOAM you are using.
alberto is offline   Reply With Quote

Old   November 4, 2011, 05:01
Default Herschel-Bulkley validation
  #4
Senior Member
 
Albrecht vBoetticher
Join Date: Aug 2010
Location: Zürich, Swizerland
Posts: 240
Rep Power: 17
vonboett is on a distinguished road
It seems like the Herschel-Bulkley viscosity model gets more and more applied in OpenFOAM. Did somebody already run a validation test case to compare the OpenFOAM implementation with the results of another CFD? I currently finish my PhD were I model shallow landslides and debris flows with the Herschel-Bulkley rheology law, all results fit the experiments but only if I choose the yield stress tao0 and consistency factor k exactly a hundred times smaller that recommended by the literature.
vonboett is offline   Reply With Quote

Old   November 14, 2011, 09:47
Default
  #5
Senior Member
 
Albrecht vBoetticher
Join Date: Aug 2010
Location: Zürich, Swizerland
Posts: 240
Rep Power: 17
vonboett is on a distinguished road
...sorry that was a mistake in the preprocessor changing from [lb/ft^2] to [Pa]. Actually, the Herschel-Bulkley looks fine :-)
vonboett is offline   Reply With Quote

Old   June 19, 2013, 00:53
Default
  #6
Senior Member
 
Dongyue Li
Join Date: Jun 2012
Location: Beijing, China
Posts: 849
Rep Power: 18
sharonyue is on a distinguished road
Quote:
Originally Posted by pbryant View Post
Assuming that nu0 is not infinity, tao_y and tao0 are not the same but one can be calculated from the other by matching the Newtonian and non-Newtonian forms at the transition point resulting in: tao_y = tao0 - k*(tao0/nu0)^n.
Hi Paul,

This is where I cannot get it, just see the image:

The red line is nu, black one is tao. Is this what you said?

so is there anything wrong with my equation? but my equation is not implemented in openFOAM.

THANKS!
Attached Images
File Type: jpg 1.jpg (32.7 KB, 142 views)
File Type: jpg 2.jpg (12.6 KB, 143 views)
sharonyue is offline   Reply With Quote

Reply

Tags
herschel-bulkley, non-newtonian, viscosity models


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
CGNS Compiling Diego Main CFD Forum 17 December 21, 2014 02:40
CGNS lib and Fortran compiler manaliac Main CFD Forum 2 November 29, 2010 07:25
[swak4Foam] groovyBC: problems compiling: "flex: not found" and "undefined reference to ..." sega OpenFOAM Community Contributions 12 February 17, 2010 10:30
compile errors of boundary condition "expDirectionMixed" liying02ts OpenFOAM Bugs 2 February 1, 2010 21:11
Regarding Implementation of Hershel Bulkley Model in Viscosity correlation Pathak FLOW-3D 0 August 24, 2009 07:34


All times are GMT -4. The time now is 17:07.