CFD Online Logo CFD Online URL
Home > Forums > Fluent UDF and Scheme Programming

UDF for absorption coefficient

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

LinkBack Thread Tools Display Modes
Old   August 11, 2017, 04:20
Default UDF for absorption coefficient
New Member
Join Date: Jan 2017
Posts: 12
Rep Power: 2
paolofug87 is on a distinguished road
Sponsored Links
Hi guys,
I'm not able to find what's wrong with this code:

#include "udf.h"
#include "materials.h"

#define sootDens 1000;
#define C_1_coef 4;
#define C_2_coef 0.014388;
#define C_3_coef 3.72;


real cellTemp;
real cellRho;
real cellM1;
real sootvf;
real absCoeff;

cellTemp = C_T(c,t);
cellRho = C_R(c,t);
cellM1 = C_UDSI(c,t,0);
sootvf = cellM1*cellRho/sootDens;
absCoeff = C_3_coef*C_1_coef*sootvf*cellTemp/C_2_coef;

return absCoeff;

the aim is to define the absoprtion coefficient linked to the UDS mass fraction and temperature.
The problem rises when i try to build the library, the software returns:

..\..\src\udf_absorption_coef.c(22) : error C2100: riferimento indiretto non valido
..\..\src\udf_absorption_coef.c(22) : warning C4552: '/': l'operatore non ha effetto. Previsto operatore con effetto collaterale.

P.S. I need to make the udf suitable for parallel processing

Thank you in advance

paolofug87 is offline   Reply With Quote
Sponsored Links


Thread Tools
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 On
Pingbacks are On
Refbacks are On

Similar Threads
Thread Thread Starter Forum Replies Last Post
Calculation of lift/drag coefficient by FLUENT UDF rsarma Fluent UDF and Scheme Programming 0 August 5, 2015 05:16
Lift Coefficient UDF for phase interaction emrahdeniz Fluent UDF and Scheme Programming 2 January 15, 2011 12:34
udf of heat transfer coefficient me FLUENT 1 June 24, 2005 14:05
UDF macro for surface tension coefficient Frederik FLUENT 2 May 30, 2005 10:54
heat transfer coefficient udf nam su FLUENT 0 March 25, 2005 03:28

Sponsored Links

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