|
[Sponsors] |
![]() |
![]() |
#1 |
New Member
Join Date: Jul 2013
Posts: 2
Rep Power: 0 ![]() |
Hello,
I'm having trouble "Interpreted" a udf.c file. I'm applying the udf.c to an energy source, to be modeled as a flame/combustion. Currently, my code is: #include "udf.h" DEFINE_SOURCE(energy_source, c, t, dS, eqn) { real source, Qdot, r, length, Vavg, rho; Qdot = 460; r = 0.010; length = 0.001; Vavg = 1.0; rho = 1.25 source = (Qdot/(3.1415*r*r*length))*C_U(c,t)*C_R(c,t)/(rho*Vin); dS[eqn] = 0; return source; } I'm getting an parse error on line 10. I've defined all the variables. Can anyone shed some light on this question? Thank you. |
|
![]() |
![]() |
![]() |
![]() |
#2 | |
Senior Member
|
You are not so innocent as you might think.
1) you have missed a semi-colon; 2) you did not declare the variable "Vin". See the highlighted part. Quote:
|
||
![]() |
![]() |
![]() |
![]() |
#3 |
New Member
Join Date: Jul 2013
Posts: 2
Rep Power: 0 ![]() |
Thank you so much blackmask!
|
|
![]() |
![]() |
![]() |
|
|
![]() |
||||
Thread | Thread Starter | Forum | Replies | Last Post |
A Problem of Fluent Interpreted UDF: parse error | knight | Fluent UDF and Scheme Programming | 25 | August 16, 2018 11:26 |
use several interpreted UDFs | eddiegolpesar | FLUENT | 2 | October 16, 2010 04:29 |
Unsteady and Flux UDFs for UDSs | tom | FLUENT | 0 | February 13, 2009 11:27 |
error in interpreted udf's for two macro | Asghari | FLUENT | 0 | August 7, 2006 03:10 |
Experimental Repository for UDFs, Journal Files and Scheme Scripts | Jonas Larsson | FLUENT | 0 | March 5, 2000 16:36 |