CFD Online Logo CFD Online URL
www.cfd-online.com
[Sponsors]
Home > Forums > Software User Forums > ANSYS > FLUENT > Fluent UDF and Scheme Programming

power law udf code

Register Blogs Community New Posts Updated Threads Search

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   August 5, 2015, 14:10
Default power law udf code
  #1
New Member
 
bijan
Join Date: Aug 2015
Posts: 1
Rep Power: 0
b.p.v is on a distinguished road
hello all
i write a udf code (below) to simulate power law fluid but it doesn't work . it has some errors . please help me .

#include "udf.h"

DEFINE_PROPERTY(user_power_law,c,t)

{

real visc_dyn_min=0.0001;
real visc_dyn_max=10000;
real index_n=0.78;
real k=1.65;
real T0=0;
real temp=C_T(c,t);
real mu_app;
real mu_temp;

mu_temp=k*pow(C_STRAIN_RATE_MAG(c,t),index_n-1)*exp(T0/(temp));

if (N_ITER<1)
{
mu_app=k;
}
else if((N_ITER>=1)&&
(mu_temp>visc_dyn_min)&&
(mu_temp<visc_dyn_max))
{
mu_app=mu_temp;
}
else if ((N_ITER>=1)&&
(mu_temp>=visc_dyn_max))
{
mu_app=visc_dyn_max;
}
else if ((N_ITER>=1)&&
(mu_temp<=visc_dyn_min))
{
mu_app=visc_dyn_min;
}
return mu_app;
}


Error: line 41: label "count2" not found (pc=517).
Error: line 41: label "count2" not found (pc=556).
Error: line 41: label "count2" not found (pc=613).
Error: line 41: label "count2" not found (pc=661).


thanks
b.p.v is offline   Reply With Quote

Old   April 4, 2019, 03:33
Default
  #2
New Member
 
Join Date: Apr 2019
Posts: 2
Rep Power: 0
RaheelAhmed is on a distinguished road
N_ITER can only be utilized in compiled UDFs.
https://www.sharcnet.ca/Software/Fluent6/html/udf/node105.htm
RaheelAhmed 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
One-Seventh power law in turbulent pipe flows selvam2487 CFX 3 September 9, 2013 18:46
udf for Power Profile sarah l Fluent UDF and Scheme Programming 0 August 16, 2013 19:05
about one seventh power law in CFX Eric CFX 3 January 10, 2007 08:16
POWER LAW DISCRETISATION SCHEME Dammy FLUENT 6 September 7, 2005 10:45
Non newtonian power law model in pipe annulus Poly FLUENT 0 March 24, 2005 16:12


All times are GMT -4. The time now is 15:02.