
[Sponsors] 
February 15, 2012, 20:58 
how to implement powerLaw

#1 
New Member
Michikazu Nakamura
Join Date: Feb 2012
Location: Yamanashi, Japan
Posts: 2
Rep Power: 0 
I am trying to run nonNewtonianIcoFoam with transportProperties being powerLaw.
I have a flow curve of nonNewtonian flud. I found the thread on transportProperties for powerLaw ************************************ transportModel powerLaw; nu nu [0 2 1 0 0 0 0] 1e05; 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) ^ (n1) 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. 

February 16, 2012, 04:42 

#2 
Senior Member
Martin
Join Date: Oct 2009
Location: Aachen, Germany
Posts: 252
Rep Power: 10 
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) ^ (n1) 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 

February 16, 2012, 05:13 

#3  
Senior Member
Arjun
Join Date: Mar 2009
Location: Nurenberg, Germany
Posts: 355
Rep Power: 9 
Quote:
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 1E3 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. 

March 23, 2014, 17:52 

#4 
New Member
Nadish Saini
Join Date: Feb 2014
Location: Raleigh, North Carolina
Posts: 27
Rep Power: 2 
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 

March 27, 2014, 08:42 

#5 
Member
Laurent B
Join Date: Jun 2009
Location: Lille, FRANCE
Posts: 70
Rep Power: 7 
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... 

March 28, 2014, 05:13 

#6 
New Member
Michikazu Nakamura
Join Date: Feb 2012
Location: Yamanashi, Japan
Posts: 2
Rep Power: 0 
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.) 

March 29, 2014, 00:02 

#7 
New Member
Nadish Saini
Join Date: Feb 2014
Location: Raleigh, North Carolina
Posts: 27
Rep Power: 2 
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: icoUncoupledKinematicParcelFoam: temperature dependent viscosity Thank you for the information you gave on Courant Number. This will come in handy in future endeavours!! 

Thread Tools  
Display Modes  


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 05: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 