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

Heat generation is depend on x value and time.

Register Blogs Members List Search Today's Posts Mark Forums Read

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   September 5, 2010, 14:17
Default Heat generation is depend on x value and time.
  #1
New Member
 
Omur
Join Date: Mar 2010
Posts: 4
Rep Power: 16
omurakbayir is on a distinguished road
Hi,

Heat generation is depend on x value and time in my simulation.
How to add x variation below code?

#include "udf.h"
DEFINE_SOURCE(heat_gen_time,cell,thread,dS,eqn)
{
real source;
real time;
time = CURRENT_TIME;
source = 86.44*pow(time,-.3);
dS[eqn] = -25.932*pow(time,-1.3);
return source;
}
omurakbayir is offline   Reply With Quote

Old   September 20, 2010, 08:08
Unhappy how i can solve this error in fluent heat vulometric source
  #2
New Member
 
behzad
Join Date: Sep 2010
Posts: 3
Rep Power: 15
behzadniknam is on a distinguished road
#include "udf.h"
#include "defines.h"
#define Q 20000000
#define H 5// flame hight above floor
#define D .5//cell size
#define DX D
#define DY D
#define DZ D
DEFINE_SOURCE(heat_source, c, t, dS, eqn)
{
real x[ND_ND];
real V=DX*DY*DZ;
C_CENTROID(x,c,t);
if (fabs(x[0])<DX/2 && fabs(x[2])<DZ/2 && fabs(x[1]+DY)<H){
return Q/V;
}
else {
return 0.0;
}
}
************************************************** **
*************************************************
error how i can solve this error
************************************************** *******
chip-exec: heat_source: wrong return type: void udf function expected
Error:
FLUENT received fatal signal (ACCESS_VIOLATION)
1. Note exact events leading to error.
2. Save case/data under new name.
3. Exit program and restart to continue.
4. Report error to your distributor.
Error Object: ()
behzadniknam is offline   Reply With Quote

Old   October 26, 2010, 16:46
Default
  #3
New Member
 
Omur
Join Date: Mar 2010
Posts: 4
Rep Power: 16
omurakbayir is on a distinguished road
Hi,

Heat generation is depend on x value in my simulation.


What is problem in my udf?

#include "udf.h"
#define pi 3.141592653589793238462643383279502884197169399375 10
DEFINE_SOURCE(heat_gen_x,cell,thread,dS,eqn)
{
real source;
real x [ND_ND];
real a;
face_t f;
begin_f_loop(f,thread)
{
F_CENTROID(x, f, thread);
a=x[0];
source = 6500000*1.2*cos(pi*(1.0267*((2*(a-1.189)/0.793)-1)));
}
end_f_loop(f,thread)
}
omurakbayir is offline   Reply With Quote

Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

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 18:17.