CFD Online Discussion Forums

CFD Online Discussion Forums (https://www.cfd-online.com/Forums/)
-   FLUENT (https://www.cfd-online.com/Forums/fluent/)
-   -   Parse error in UDF, URGENT HELP NEEDED!!! (https://www.cfd-online.com/Forums/fluent/70898-parse-error-udf-urgent-help-needed.html)

Boris Kloser December 9, 2009 06:24

Parse error in UDF, URGENT HELP NEEDED!!!
 
Hi, I am trying to write a UDF to define a temperature gradient along a boundary. When I try to interpret my UDF a message appears saying "line 7: parse error." which is the DEFINE_PROFILE(temperature_profile,t,i) line of my UDF shown below. I am relatively new to UDFs and can't see what is wrong with it. Can anybody help? Thank you.

#inlcude "udf.h"
#define TMAX 400.0
#define TATM 300.0
#define A 0.00001
DEFINE_PROFILE(temperature_profile,t,i)
{
face_t f;
real x[ND_ND];
real r, k ,h;

begin_f_loop(f,t)
{
F_CENTROID(x,f,t);
k = x[0];
h = x[1];
r = sqrt(k*k+h*h);
F_PROFILE(f,t,i) = (TMAX-TATM)*(exp(-(A/3)*r*r))+TATM;
}
end_f_loop(f,t)
}

sircorp December 10, 2009 19:14

Well

NO PROBLEM WITH YOUR CODE AT ALL.

"Include" is proper english word. You got a TYPO ERROR, Change very first word to "include".

Sircorp

z701531118 December 12, 2009 03:16

Hw to link Fluent and MATLAB and exchange data?
 
1. My aim is to use Matlab as a "master" program and fluent as a "slave", analyzing flow in Fluent and do multiobjective optimization in MATLAB.

2. How can I convert *.jun to *.bat in order to import data into MATALB.

3. I want to implement gene algorithm on MATLAB to tune the value of flow rate and rpm in Fluent.


All times are GMT -4. The time now is 05:16.