CFD Online Discussion Forums

CFD Online Discussion Forums (https://www.cfd-online.com/Forums/)
-   STAR-CCM+ (https://www.cfd-online.com/Forums/star-ccm/)
-   -   user-defined functions with strain rate (https://www.cfd-online.com/Forums/star-ccm/64889-user-defined-functions-strain-rate.html)

ems May 27, 2009 12:46

user-defined functions with strain rate
 
I am trying to model a non-newtonian fluid (blood) that depends on shear rate. I used the equation:

0.026314*pow($StrainRate,(0.47234-1)) + 3.117316

but I get an error that $StrainRate is not recognized. Is this not the correct term for strain rate, or am I using it incorrectly? I haven't been able to find the correct usage in the help or anywhere else. Any help or advice would be appreciated.

Thanks,

Eric

vishyaroon May 28, 2009 07:40

Go into Tools > Field Functions and check the format for Strain Rate. I do not have experience in non-Newtonian fluids, but if the Strain Rate exists it should be listed in the Field Functions. The Function Name should give you the syntax when you use the function.

ems May 28, 2009 14:33

After talking to support, I understand what I was doing wrong. If anyone has the same problem in the future, you have to check the box for "Temporary Storage Retained" under Solvers->"solver_used," then strain rate appears in the field function list. Thanks for your help.

ahmadbakri May 30, 2010 07:56

Quote:

Originally Posted by ems (Post 217469)
After talking to support, I understand what I was doing wrong. If anyone has the same problem in the future, you have to check the box for "Temporary Storage Retained" under Solvers->"solver_used," then strain rate appears in the field function list. Thanks for your help.


Hi, how can I use the function Strain Rate magnitude

what is the syntax to follow

thanks

ems June 2, 2010 09:38

As I had mentioned, you will have to check the box for "Temporary Storage Retained" in the solvers section. On my particular simulation, I had it checked for Lagrangian Multiphase, Segregated Flow, and K-epsilon Turbulence. Then, in your user-defined field function, call strain rate magnitude using the handle $StrainRate

As a note, there is no strain rate for the first iteration. So, you should let your simulation run one or two iterations without calling the $StrainRate function and then stop it and apply the field function. As an example, my program used a strain-rate dependent viscosity. So for the first couple iterations I used a constant viscosity, then paused and changed my viscosity definition to my field function that included $StrainRate. If I had tried to use that field function from the beginning, I would have gotten an error.

Let me know if you are still having trouble.

-Eric


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