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

how to implement powerLaw

Register Blogs Community New Posts Updated Threads Search

Like Tree10Likes
  • 2 Post By mnakamura
  • 7 Post By MartinB
  • 1 Post By laurentb

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   February 15, 2012, 20:58
Default how to implement powerLaw
  #1
New Member
 
Michikazu Nakamura
Join Date: Feb 2012
Location: Yamanashi, Japan
Posts: 2
Rep Power: 0
mnakamura is on a distinguished road
I am trying to run nonNewtonianIcoFoam with transportProperties being powerLaw.
I have a flow curve of non-Newtonian flud.

I found the thread on transportProperties for powerLaw

************************************
transportModel powerLaw;

nu nu [0 2 -1 0 0 0 0] 1e-05;

powerLawCoeffs
{
k k [0 2 -1 0 0 0 0] 2500;
n n [0 0 0 0 0 0 0] 0.4;
nuMin nuMin [0 2 -1 0 0 0 0] 0;
nuMax nuMax [0 2 -1 0 0 0 0] 100;
}


************************************
I figured k is the constant of power law equation.
(viscosity) = k * (velocity) ^ (n-1)

What are nuMax and nuMin?
I attached a figure of a flow curve.
Are nuMax and nuMin defind like this figure?
And, what is nu, then?

I would be very apprecitated, if somebody could help me.
Attached Images
File Type: jpg flow curve .jpg (40.7 KB, 166 views)
mnakamura is offline   Reply With Quote

Old   February 16, 2012, 04:42
Default
  #2
Senior Member
 
Martin
Join Date: Oct 2009
Location: Aachen, Germany
Posts: 255
Rep Power: 21
MartinB will become famous soon enough
Hi Michikazu,

you can use the powerLaw model for the steady state solver simpleFoam, too. It's not necessary to stick with the transient nonNewtonianIcoFoam if your solution is steady state.

The power law equation implemented in OpenFOAM is:
kinematic_viscosity = k * (strain_rate) ^ (n-1)

Therefor: not dynamic viscosity, but kinematic viscosity is used!
And: not velocity, but strain rate (or shear rate) is used.

nuMax and nuMin are limitations for the viscosity due to stability reasons. These values are not the intersection points with the axes!
Instead if shear rate drops to a very low value (or your velocity field is initialized to zero with strain rate being zero, too), the viscosity would be either undefined or would give unstable floating point values. Here the limitation triggers and the kinematic viscosity can't rise above 100 m^2 / s. Same for nuMin and very high shear rates, but this situation is more unusual.

The value "nu" in the transportProperties file is an entry for the Newtonian model. You can remove this line when using powerLaw or simply ignore it.

To determine your values for k and n, you can use the open source fitting software "fityk". You can provide data from measurement and fit the values for k and n.
You can test BirdCarreau and CrossPowerLaw model within fityk, too, and see, which of the models fits your material properties best.

To transfer your coefficients to the kinematic viscosity approach from OpenFOAM, you must divide k by density rho.

If you are using an older version of OpenFOAM you must check the definition of strain rate. For OpenFOAM 2.0 and later the definition fits to the "standard" definition and is fine.

Martin
MartinB is offline   Reply With Quote

Old   February 16, 2012, 05:13
Default
  #3
Senior Member
 
Arjun
Join Date: Mar 2009
Location: Nurenberg, Germany
Posts: 1,273
Rep Power: 34
arjun will become famous soon enougharjun will become famous soon enough
Quote:
Originally Posted by MartinB View Post

Here the limitation triggers and the kinematic viscosity can't rise above 100 m^2 / s.

Just pointing out that this limitation is not applicable for all the softwares. This may be limitation with openFOAM. I have run calculations with kinematic viscosity were between 1E-3 to 1E5 (in same calculation using power law) with my code , starccm+ , Fluent and polyflow without much of problems. (There are occasional problems but not so much).

Last edited by arjun; February 16, 2012 at 08:55.
arjun is offline   Reply With Quote

Old   March 23, 2014, 16:52
Default
  #4
Member
 
Nadish Saini
Join Date: Feb 2014
Location: Raleigh, North Carolina
Posts: 39
Rep Power: 12
90nash is on a distinguished road
Hello Martin/Arjun,

Can you please explain as to why the k value is so high (2500). I am performing an analysis and tried using k value of the order 10^-6 (which is the order of kinematic viscosity of many fluids like water). But for these values i am getting large time step continuity errors and solution does not converge. However if i use k value close to what Michikazu has used the solution converges.
Can you please explain where iam going wrong?
Thanks
90nash is offline   Reply With Quote

Old   March 27, 2014, 07:42
Default
  #5
Member
 
laurentb's Avatar
 
Laurent B
Join Date: Jun 2009
Location: Lille, FRANCE
Posts: 70
Rep Power: 16
laurentb is on a distinguished road
Hello,

In others software such as Fluent, the viscosity is define in the same manner :

and are, respectively, the lower and upper limits of the power law.




These values are not choosen at random, they comes from rheology measurments...
90nash likes this.
laurentb is offline   Reply With Quote

Old   March 28, 2014, 04:13
Default
  #6
New Member
 
Michikazu Nakamura
Join Date: Feb 2012
Location: Yamanashi, Japan
Posts: 2
Rep Power: 0
mnakamura is on a distinguished road
Hi Nadish,
Since Martin and Arjun has not responded to this thread...

2500 came from rheology of fluid that I wanted to simulate.
, meaning pretty "thick" liquid, such as tooth paste.
I do not know why you want to apply power law for water.
I think water is treated as Newtonian fluid, and you do not need power law.

In case you want to take kinamatic viscosity of water in consideration for some reason.
Your simulation blew up with k=10^-6, but k=2500 converges.
This sounds that fluid is flowing so fast that makes the Courant number keeps growing.
To solve this, you want smaller time step and fairly large mesh grids.
You want Courant number to be less than 1. You can estimate time step and mesh size from this.
(There should be a lot of information on Courant number in other threads etc.)
mnakamura is offline   Reply With Quote

Old   March 28, 2014, 23:02
Default
  #7
Member
 
Nadish Saini
Join Date: Feb 2014
Location: Raleigh, North Carolina
Posts: 39
Rep Power: 12
90nash is on a distinguished road
Hello Michikazu,
Thank You for your reply!!
Actually this work is for my course project wherein i am comparing the trajectory of particles in a newtonian v/s a non newtonian flow field (with temperature dependent viscosity). I chose water for the first case as i am duplicating the results of an experiment. For the second case, in order to compare this with the first one, i wanted to see how particles behave if i model the same fluid with temperature dependent viscosity. This may not be a realistic assumption but will hope to serve as an interesting analysis for future work.

Aside from that i was able to get a converged solution with a small value of k too. for this i ran first two iterations with a newtonian model which initialises my nu field. See below thread:
http://www.cfd-online.com/Forums/ope...viscosity.html

Thank you for the information you gave on Courant Number. This will come in handy in future endeavours!!
90nash is offline   Reply With Quote

Old   March 21, 2024, 18:12
Default Question about nuMax and nuMin
  #8
New Member
 
Zhibo
Join Date: Feb 2021
Posts: 4
Rep Power: 5
theGodfather1994 is on a distinguished road
Hi Martin,

Thank you for your answer. I hope you can see this message even after more than 10 years!

I'm wondering whether nuMax and nuMin are only related to the numerical stability reasons. Do they have to follow the rheology property of the fluid?

Zhibo



Quote:
Originally Posted by MartinB View Post
Hi Michikazu,

you can use the powerLaw model for the steady state solver simpleFoam, too. It's not necessary to stick with the transient nonNewtonianIcoFoam if your solution is steady state.

The power law equation implemented in OpenFOAM is:
kinematic_viscosity = k * (strain_rate) ^ (n-1)

Therefor: not dynamic viscosity, but kinematic viscosity is used!
And: not velocity, but strain rate (or shear rate) is used.

nuMax and nuMin are limitations for the viscosity due to stability reasons. These values are not the intersection points with the axes!
Instead if shear rate drops to a very low value (or your velocity field is initialized to zero with strain rate being zero, too), the viscosity would be either undefined or would give unstable floating point values. Here the limitation triggers and the kinematic viscosity can't rise above 100 m^2 / s. Same for nuMin and very high shear rates, but this situation is more unusual.

The value "nu" in the transportProperties file is an entry for the Newtonian model. You can remove this line when using powerLaw or simply ignore it.

To determine your values for k and n, you can use the open source fitting software "fityk". You can provide data from measurement and fit the values for k and n.
You can test BirdCarreau and CrossPowerLaw model within fityk, too, and see, which of the models fits your material properties best.

To transfer your coefficients to the kinematic viscosity approach from OpenFOAM, you must divide k by density rho.

If you are using an older version of OpenFOAM you must check the definition of strain rate. For OpenFOAM 2.0 and later the definition fits to the "standard" definition and is fine.

Martin
theGodfather1994 is offline   Reply With Quote

Old   March 23, 2024, 03:51
Default
  #9
Senior Member
 
Arjun
Join Date: Mar 2009
Location: Nurenberg, Germany
Posts: 1,273
Rep Power: 34
arjun will become famous soon enougharjun will become famous soon enough
Quote:
Originally Posted by theGodfather1994 View Post
Hi Martin,

Thank you for your answer. I hope you can see this message even after more than 10 years!

I'm wondering whether nuMax and nuMin are only related to the numerical stability reasons. Do they have to follow the rheology property of the fluid?

Zhibo


They are for numerical stability but they should be set so that it does not affect the accuracy of the simulation.
arjun 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
powerLaw lgani OpenFOAM 5 August 6, 2012 16:46
Implement swirl as "internal" BC with calculated u_axial lentschi CFX 6 November 2, 2011 04:58
implement heat flux Tobi OpenFOAM Programming & Development 8 January 21, 2011 20:11
how to implement this kind of equation keishawillstone OpenFOAM Running, Solving & CFD 2 August 11, 2009 06:01
Implement new Turbulence Model sven OpenFOAM 0 July 19, 2009 15:47


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