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

Can not to interpret UDF

Register Blogs Community New Posts Updated Threads Search

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   June 15, 2009, 07:06
Default Can not to interpret UDF
  #1
New Member
 
Alexander Sventitskiy
Join Date: Jun 2009
Posts: 4
Rep Power: 17
AlexanderSventitskiy is on a distinguished road
Hallo,

I have a problem with interpreting my UDF. The UDF defunes unsteady boundary conditions and looks as

#include "udf.h"

DEFINE_PROFILE(unsteady_mass_flow, thread, position)
{
double fact=1.E-06;
double S=1.5E-03;
double t, mass_flow;
face_t f;

t=RP_Get_Real("flow-time");
mass_flow=fact*57.6975*sin(6.2832*t);
begin_f_loop(f, thread)
{
F_PROFILE(f, thread, position)=mass_flow;
}
end_f_loop(f, thread)
}

Fluent reports the following error:

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>" "D:\Fluent data\Mask_test\Simulation\mfsin.c"
Error: D:\Fluent data\Mask_test\Simulation\mfsin.c: line 1: parse error.

What can it be??

Thank you.
AlexanderSventitskiy is offline   Reply With Quote

Old   June 15, 2009, 22:52
Default
  #2
New Member
 
Eric
Join Date: Apr 2009
Posts: 23
Rep Power: 17
duaiduaihu is on a distinguished road
Quote:
Originally Posted by AlexanderSventitskiy View Post
Hallo,

I have a problem with interpreting my UDF. The UDF defunes unsteady boundary conditions and looks as

#include "udf.h"

DEFINE_PROFILE(unsteady_mass_flow, thread, position)
{
double fact=1.E-06;
double S=1.5E-03;
double t, mass_flow;
face_t f;

t=RP_Get_Real("flow-time");
mass_flow=fact*57.6975*sin(6.2832*t);
begin_f_loop(f, thread)
{
F_PROFILE(f, thread, position)=mass_flow;
}
end_f_loop(f, thread)
}

Fluent reports the following error:

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>" "D:\Fluent data\Mask_test\Simulation\mfsin.c"
Error: D:\Fluent data\Mask_test\Simulation\mfsin.c: line 1: parse error.

What can it be??

Thank you.

i have interpreted it in my computer,no error。。。。。。。。。
duaiduaihu is offline   Reply With Quote

Old   June 16, 2009, 12:13
Default
  #3
Senior Member
 
vinerm's Avatar
 
Vinerm
Join Date: Jun 2009
Location: Nederland
Posts: 2,946
Blog Entries: 1
Rep Power: 36
vinerm will become famous soon enough
First thing, it is better to compile it.
Second thing, use real in place of float and double.

There is no error with your UDF. Just use compiled one and it will work
vinerm is offline   Reply With Quote

Old   June 17, 2009, 08:07
Default
  #4
New Member
 
Alexander Sventitskiy
Join Date: Jun 2009
Posts: 4
Rep Power: 17
AlexanderSventitskiy is on a distinguished road
What is an advantage to use real instead of double?

The problem with the UDF was that FLUENT could not read file from WordPad. After I had used Notepad++ everything was ok.

Thank you for your replies.
AlexanderSventitskiy is offline   Reply With Quote

Old   August 18, 2011, 09:10
Default
  #5
New Member
 
Join Date: Nov 2009
Posts: 13
Rep Power: 17
shaoda169 is on a distinguished road
Quote:
Originally Posted by AlexanderSventitskiy View Post
Hallo,

I have a problem with interpreting my UDF. The UDF defunes unsteady boundary conditions and looks as

#include "udf.h"

DEFINE_PROFILE(unsteady_mass_flow, thread, position)
{
double fact=1.E-06;
double S=1.5E-03;
double t, mass_flow;
face_t f;

t=RP_Get_Real("flow-time");
mass_flow=fact*57.6975*sin(6.2832*t);
begin_f_loop(f, thread)
{
F_PROFILE(f, thread, position)=mass_flow;
}
end_f_loop(f, thread)
}

Fluent reports the following error:

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>" "D:\Fluent data\Mask_test\Simulation\mfsin.c"
Error: D:\Fluent data\Mask_test\Simulation\mfsin.c: line 1: parse error.

What can it be??

Thank you.
you should add the udfconfig.h in your working directory. The header file can be downloaded from internet.
Hope this helps you!
shaoda169 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


Similar Threads
Thread Thread Starter Forum Replies Last Post
parse error while interpreting udf Kristin Fluent UDF and Scheme Programming 3 March 15, 2012 07:43
interpret or compile an UDF (emergency) Lotfi FLUENT 1 August 26, 2007 13:58
Not able to interpret UDF Prasad FLUENT 1 August 15, 2007 09:44
Interpret three UDF for property Atsu FLUENT 4 April 22, 2006 16:04
UDF Interpret - Syntax Error Leonard FLUENT 1 October 22, 2005 11:06


All times are GMT -4. The time now is 17:31.