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

UDF error !!

Register Blogs Community New Posts Updated Threads Search

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   October 12, 2010, 05:27
Default UDF error !!
  #1
Member
 
Join Date: Sep 2010
Posts: 60
Rep Power: 16
stage81 is on a distinguished road
xr xr plaese

Last edited by stage81; October 13, 2010 at 06:37.
stage81 is offline   Reply With Quote

Old   October 12, 2010, 10:07
Default
  #2
Member
 
lehoang_mai's Avatar
 
User_CFD
Join Date: Mar 2010
Posts: 48
Rep Power: 16
lehoang_mai is on a distinguished road
Hey, hello stage81! I got it.
for your problem, I think UDF is:

/**************************************/
#include "udf.h"

DEFINE_SOURCE(energy_source,c,t,dS,eqn)
{
real x[ND_ND];
real source;

C_CENTROID(x,c,t);

if (x[1]==10.)

source = 10000.;
else
source = 0.;

return source;
}
/******************************************/
Best wish for you!
lehoang_mai is offline   Reply With Quote

Old   October 12, 2010, 11:14
Default
  #3
Member
 
Join Date: Sep 2010
Posts: 60
Rep Power: 16
stage81 is on a distinguished road
Quote:
Originally Posted by lehoang_mai View Post
Hey, hello stage81! I got it.
for your problem, I think UDF is:

/**************************************/
#include "udf.h"

DEFINE_SOURCE(energy_source,c,t,dS,eqn)
{
real x[ND_ND];
real source;

C_CENTROID(x,c,t);

if (x[1]==10.)

source = 10000.;
else
source = 0.;

return source;
}
/******************************************/
Best wish for you!
and you know why I have this error when i compile UDF ?
for the UDF, I improved it
stage81 is offline   Reply With Quote

Old   October 12, 2010, 15:36
Default
  #4
Member
 
lehoang_mai's Avatar
 
User_CFD
Join Date: Mar 2010
Posts: 48
Rep Power: 16
lehoang_mai is on a distinguished road
You haven't correctly write UDF
lehoang_mai is offline   Reply With Quote

Old   October 12, 2010, 15:39
Default
  #5
Member
 
Join Date: Sep 2010
Posts: 60
Rep Power: 16
stage81 is on a distinguished road
Quote:
Originally Posted by lehoang_mai View Post
You haven't correctly write UDF
NOT THis Udf, but i have a correct udf
stage81 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
Accessing phi from a fvPatchField at same patch johndeas OpenFOAM 1 September 13, 2010 21:23
Installation OF1.5-dev ttdtud OpenFOAM Installation 46 May 5, 2009 03:32
Problem with compile the setParabolicInlet ivanyao OpenFOAM Running, Solving & CFD 6 September 5, 2008 21:50
Errors running allwmake in OpenFOAM141dev with WM_COMPILE_OPTION%3ddebug unoder OpenFOAM Installation 11 January 30, 2008 21:30
[Netgen] Compiling Netgen on Fedora Core is driving me crazy jango OpenFOAM Meshing & Mesh Conversion 3 November 9, 2007 14:29


All times are GMT -4. The time now is 15:02.