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

parse error udf

Register Blogs Members List Search Today's Posts Mark Forums Read

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   June 26, 2012, 18:22
Default parse error udf
  #1
New Member
 
Ch_Flame
Join Date: Apr 2012
Location: Iran
Posts: 13
Rep Power: 13
fatemeh chitgarha is on a distinguished road
HI
When i interpret my UDF file, it says parse error in line 33,
#include "udf.h"
#include "sg_mem.h"
#include "outlet.h"
DEFINE_INIT(my_uds0, domain)
{
cell_t c;
Thread *t;

/* loop over all cell threads in the domain */
thread_loop_c (t,domain)
{
/* loop over all cells */
begin_c_loop_all (c,t)
{
if (C_FMEAN(c,t)>0.06)

C_UDSI(c,t,0) = 1.0;
else
C_UDSI(c,t,0) = 0.0;
}
end_c_loop_all (c,t)
}
}
DEFINE_DIFFUSIVITY(diffu,c,t,i)
{
return (C_MU_T(c,t)) / 0.9;
}

DEFINE_PROFILE(scaler_outlet,t,i)
{/*________ scaler outlet (ds/dn =0)(n:Boundary normal vector) _______*/}
real s;
face_t f;
begin_f_loop(f,t)
{
s=C_UDSI(F_C0(f,t),THREAD_T0(t),0);
F_PROFILE(f,t,i) = s;
}
end_f_loop(f,t)
}
Someone knows the problem?
plz help meeeeeeee!
fatemeh chitgarha is offline   Reply With Quote

Old   June 29, 2012, 03:56
Default
  #2
New Member
 
Majid Mostafazadeh
Join Date: Nov 2011
Posts: 15
Rep Power: 14
forgottenman is on a distinguished road
Hi
Try this one, it works.

#include "udf.h"
#include "sg_mem.h"
#include "outlet.h"
DEFINE_INIT(my_uds0, domain)
{
cell_t c;
Thread *t;

/* loop over all cell threads in the domain */
thread_loop_c (t,domain)
{
/* loop over all cells */
begin_c_loop_all (c,t)
{
if (C_FMEAN(c,t)>0.06)

C_UDSI(c,t,0) = 1.0;
else
C_UDSI(c,t,0) = 0.0;
}
end_c_loop_all (c,t)
}
}
DEFINE_DIFFUSIVITY(diffu,c,t,i)
{
return (C_MU_T(c,t)) / 0.9;
}

DEFINE_PROFILE(scaler_outlet,t,i)
{
real s;
face_t f;
begin_f_loop(f,t)
{
s=C_UDSI(F_C0(f,t),THREAD_T0(t),0);
F_PROFILE(f,t,i) = s;
}
end_f_loop(f,t)
}
forgottenman is offline   Reply With Quote

Old   June 29, 2012, 05:33
Default
  #3
New Member
 
Ch_Flame
Join Date: Apr 2012
Location: Iran
Posts: 13
Rep Power: 13
fatemeh chitgarha is on a distinguished road
Quote:
Originally Posted by forgottenman View Post
Hi
Try this one, it works.

#include "udf.h"
#include "sg_mem.h"
#include "outlet.h"
DEFINE_INIT(my_uds0, domain)
{
cell_t c;
Thread *t;

/* loop over all cell threads in the domain */
thread_loop_c (t,domain)
{
/* loop over all cells */
begin_c_loop_all (c,t)
{
if (C_FMEAN(c,t)>0.06)

C_UDSI(c,t,0) = 1.0;
else
C_UDSI(c,t,0) = 0.0;
}
end_c_loop_all (c,t)
}
}
DEFINE_DIFFUSIVITY(diffu,c,t,i)
{
return (C_MU_T(c,t)) / 0.9;
}

DEFINE_PROFILE(scaler_outlet,t,i)
{
real s;
face_t f;
begin_f_loop(f,t)
{
s=C_UDSI(F_C0(f,t),THREAD_T0(t),0);
F_PROFILE(f,t,i) = s;
}
end_f_loop(f,t)
}
yes THAnx, but when i hook scaler_oulet in outlet, fluent gives access violation fatal error!
Thanks in advance ...
fatemeh chitgarha is offline   Reply With Quote

Old   June 29, 2012, 06:18
Default
  #4
New Member
 
Majid Mostafazadeh
Join Date: Nov 2011
Posts: 15
Rep Power: 14
forgottenman is on a distinguished road
Close FLUENT and run it again to eliminate the error...
good luck
forgottenman is offline   Reply With Quote

Old   June 29, 2012, 06:21
Default
  #5
New Member
 
Ch_Flame
Join Date: Apr 2012
Location: Iran
Posts: 13
Rep Power: 13
fatemeh chitgarha is on a distinguished road
Quote:
Originally Posted by forgottenman View Post
Close FLUENT and run it again to eliminate the error...
good luck
SORRY. BUt my problem dont solve! i tested in my pc & notebook! but the same error repeated.
fatemeh chitgarha is offline   Reply With Quote

Old   June 29, 2012, 06:24
Default
  #6
New Member
 
Majid Mostafazadeh
Join Date: Nov 2011
Posts: 15
Rep Power: 14
forgottenman is on a distinguished road
save your case in another name and try it again...
forgottenman is offline   Reply With Quote

Old   June 29, 2012, 06:30
Default
  #7
New Member
 
Ch_Flame
Join Date: Apr 2012
Location: Iran
Posts: 13
Rep Power: 13
fatemeh chitgarha is on a distinguished road
Quote:
Originally Posted by forgottenman View Post
save your case in another name and try it again...
no! it not resolved!
fatemeh chitgarha is offline   Reply With Quote

Old   June 29, 2012, 06:37
Default
  #8
New Member
 
Majid Mostafazadeh
Join Date: Nov 2011
Posts: 15
Rep Power: 14
forgottenman is on a distinguished road
I tested your UDF in a case and it worked...
Set your problem from beginning:
Read the mesh file and first of all, interpret the UDF.
Then set the boundary conditions.

Let me know if it works.
forgottenman is offline   Reply With Quote

Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

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
parse error in transient udf spring FLUENT 1 July 6, 2010 07:26
parse error with udf sofie1 Fluent UDF and Scheme Programming 1 April 9, 2010 12:34
Parse Error Message While interpreting UDF in FLUENT dhimans Fluent UDF and Scheme Programming 1 July 10, 2009 07:29
PARSE ERROR Message when interpreting UDF in FLUENT dhimans FLUENT 0 May 24, 2009 12:40
UDF parse error on line 1 ..... (Unusual) Amit Maha FLUENT 4 June 30, 2006 13:15


All times are GMT -4. The time now is 07:09.