|
[Sponsors] |
December 23, 2010, 05:27 |
error in mass diffusivity UDF
|
#1 |
New Member
vaibhav vashistha
Join Date: Dec 2010
Location: New-delhi
Posts: 1
Rep Power: 0 |
Hello all,
I wrote my first UDF for giving different mass diffusivity for different zones, but I am getting following error in interpretation: cpp -I"C:\Fluent.Inc\fluent6.3.26/src" -I"C:\Fluent.Inc\fluent6.3.26/cortex/src" -I"C:\Fluent.Inc\fluent6.3.26/client/src" -I"C:\Fluent.Inc\fluent6.3.26/multiport/src" -I. -DUDFCONFIG_H="<udfconfig.h>" "E:\vaibhav\with_HAMP\DIFF.c" Error: E:\vaibhav\with_HAMP\DIFF.c: line 1: parse error. my UDF was following: #include "udf.h" DEFINE_DIFFUSIVITY(DIFF,c,t,i) { real diff; int zone_ID = THREAD_ID(t); if (zone_ID==2) { if(i==0) DIFF= 5.22e-7; else DIFF=5.22e-7; } else { if(i==0) DIFF=2.6e-5; else DIFF=2.6e-5; } return DIFF; } please help me Vaibhav Last edited by vaibhav_v; December 28, 2010 at 09:45. |
|
December 31, 2010, 13:13 |
|
#2 |
Senior Member
Real Name :)
Join Date: Jan 2010
Location: United States
Posts: 192
Rep Power: 16 |
I have no trouble with the following:
Code:
#include "udf.h" DEFINE_DIFFUSIVITY(DIFFU,c,t,i) { real DIFF; int zone_ID = THREAD_ID(t); if (zone_ID==2) { if(i==0) DIFF= 5.22e-7; else DIFF=5.22e-7; } else { if(i==0) DIFF=2.6e-5; else DIFF=2.6e-5; } return DIFF; } |
|
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
PB: Saving mass fraction of species on two points with an udf | biget.a | FLUENT | 2 | July 23, 2009 04:06 |
UDF mass flow rate | Juan | FLUENT | 2 | December 22, 2007 10:29 |
UDF solution variable for time-averaged mass frac? | A. S. | FLUENT | 0 | May 14, 2007 17:44 |
Heat and Mass Transfer UDF | Srinivas Parimi | FLUENT | 3 | August 22, 2005 14:49 |
UDF for Species mass fraction | daniel | FLUENT | 3 | June 22, 2005 09:40 |