- **OpenFOAM Running, Solving & CFD**
(*https://www.cfd-online.com/Forums/openfoam-solving/*)

- - **how to implement powerLaw**
(*https://www.cfd-online.com/Forums/openfoam-solving/97377-how-implement-powerlaw.html*)

how to implement powerLaw1 Attachment(s)
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? :confused: I would be very apprecitated, if somebody could help me. |

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 |

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 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). |

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 |

Hello,
In others software such as Fluent, the viscosity is define in the same manner : http://aerojet.engr.ucdavis.edu/flue...ug/img2159.gif and http://aerojet.engr.ucdavis.edu/flue...ug/img2160.gif are, respectively, the lower and upper limits of the power law. http://aerojet.engr.ucdavis.edu/flue...ug/img2167.gif These values are not choosen at random, they comes from rheology measurments... |

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.) |

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!! |

All times are GMT -4. The time now is 04:54. |