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

error correction

Register Blogs Community New Posts Updated Threads Search

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   November 18, 2014, 00:38
Default error correction
  #1
New Member
 
reza
Join Date: Nov 2014
Posts: 1
Rep Power: 0
mohammad reza keshtkar is on a distinguished road
Hello
I got some problems with my UDF file when I compiled it in Fluent.
I hope someone could help me ,the error text is written below:

cpp -I"D:\Fluent.Inc\fluent6.3.26/src" -I"D:\Fluent.Inc\fluent6.3.26/cortex/src" -I"D:\Fluent.Inc\fluent6.3.26/client/src" -I"D:\Fluent.Inc\fluent6.3.26/multiport/src" -I. -DUDFCONFIG_H="<udfconfig.h>" "C:\Users\reza\Desktop\1234.c"
Error: udfconfig.h: line 22: parse error.

the udf is written below:
/************************************************** ********************
unsteady.c
UDF for specifying a transient velocity profile boundary condition
************************************************** *********************/
#include "udf.h"
DEFINE_PROFILE(unsteady_radiation, thread, position)
{
face_t f;
real t = CURRENT_TIME;
begin_f_loop(f, thread)
{
F_PROFILE(f, thread, position) = 0.0552*pow(((2e-6)*pow((t*3600),6)-0.0001*pow((t*3600),5)+0.0046*pow((t*3600),4)-0.0765*pow((t*3600),3)+0.4478*pow((t*3600),2)+1.03 64*pow((t*3600),1)+7.9474),1.5);
}
end_f_loop(f, thread)
}
/************************************************** ********************
unsteady.c
UDF for specifying a transient velocity profile boundary condition
************************************************** *********************/
#include "udf.h"
DEFINE_PROFILE(unsteady_freestreamtemp, thread, position)
{
face_t f;
real t = CURRENT_TIME;
begin_f_loop(f, thread)
{
F_PROFILE(f, thread, position) =(2e-6)*pow((t*3600),6)-0.0001*pow((t*3600),5)+0.0046*pow((t*3600),4)-0.0765*pow((t*3600),3)+0.4478*pow((t*3600),2)+1.03 64*pow((t*3600),1)+7.9474;
}
end_f_loop(f, thread)
}

/************************************************** ********************
unsteady.c
UDF for specifying a transient velocity profile boundary condition
************************************************** *********************/
#include "udf.h"
DEFINE_PROFILE(unsteady_convection, thread, position)
{
face_t f;
real t = CURRENT_TIME;
begin_f_loop(f, thread)
{
F_PROFILE(f, thread, position) =12.1*(-0.0004*pow((t*3600),5)+0.0091*pow((t*3600),4)-0.0906*pow((t*3600),3)+0.4774*pow((t*3600),2)-1.0279*pow((t*3600),1)+1.0073);
}
end_f_loop(f, thread)
}

/************************************************** ********************
unsteady.c
UDF for specifying a transient velocity profile boundary condition
************************************************** *********************/
#include "udf.h"
DEFINE_PROFILE(unsteady_solarflux, thread, position)
{
face_t f;
real t = CURRENT_TIME;
begin_f_loop(f, thread)
{
F_PROFILE(f, thread, position) =0.0085*pow((t*3600),6)+0.3306*pow((t*3600),5)+5.2 103*pow((t*3600),4)-43.001*pow((t*3600),3)+162.66*pow((t*3600),2)-23.449*pow((t*3600),1)+17.905;
}
end_f_loop(f, thread)
}
mohammad reza keshtkar is offline   Reply With Quote

Old   November 18, 2014, 04:16
Default
  #2
Member
 
Join Date: Jul 2013
Posts: 80
Rep Power: 13
upeksa is on a distinguished road
It works for me. Note that you have omitted something when you go the the next line in the code you have attached. I have corrected it but I don't know what you meant. Check it.

/************************************************** ********************
unsteady.c
UDF for specifying a transient velocity profile boundary condition
************************************************** *********************/
#include "udf.h"
DEFINE_PROFILE(unsteady_radiation, thread, position)
{
face_t f;
real t = CURRENT_TIME;
begin_f_loop(f, thread)
{
F_PROFILE(f, thread, position) = 0.0552*pow(((2e-6)*pow((t*3600),6)-0.0001*pow((t*3600),5)+0.0046*pow((t*3600),4)-0.0765*pow((t*3600),3)+0.4478*pow((t*3600),2)+1.03 64*pow((t*3600),1)+7.9474),1.5);
}
end_f_loop(f, thread)
}
/************************************************** ********************
unsteady.c
UDF for specifying a transient velocity profile boundary condition
************************************************** *********************/
#include "udf.h"
DEFINE_PROFILE(unsteady_freestreamtemp, thread, position)
{
face_t f;
real t = CURRENT_TIME;
begin_f_loop(f, thread)
{
F_PROFILE(f, thread, position) =(2e-6)*pow((t*3600),6)-0.0001*pow((t*3600),5)+0.0046*pow((t*3600),4)-0.0765*pow((t*3600),3)+0.4478*pow((t*3600),2)+1.03 64*pow((t*3600),1)+7.9474;
}
end_f_loop(f, thread)
}

/************************************************** ********************
unsteady.c
UDF for specifying a transient velocity profile boundary condition
************************************************** *********************/
#include "udf.h"
DEFINE_PROFILE(unsteady_convection, thread, position)
{
face_t f;
real t = CURRENT_TIME;
begin_f_loop(f, thread)
{
F_PROFILE(f, thread, position) =12.1*(-0.0004*pow((t*3600),5)+0.0091*pow((t*3600),4)-0.0906*pow((t*3600),3)+0.4774*pow((t*3600),2)-1.0279*pow((t*3600),1)+1.0073);
}
end_f_loop(f, thread)
}

/************************************************** ********************
unsteady.c
UDF for specifying a transient velocity profile boundary condition
************************************************** *********************/
#include "udf.h"
DEFINE_PROFILE(unsteady_solarflux, thread, position)
{
face_t f;
real t = CURRENT_TIME;
begin_f_loop(f, thread)
{
F_PROFILE(f, thread, position) =0.0085*pow((t*3600),6)+0.3306*pow((t*3600),5)+5.2 103*pow((t*3600),4)-43.001*pow((t*3600),3)+162.66*pow((t*3600),2)-23.449*pow((t*3600),1)+17.905;
}
end_f_loop(f, thread)
}
upeksa is offline   Reply With Quote

Reply


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



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