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

problem in transcient heat flux b.c in UDF

Register Blogs Community New Posts Updated Threads Search

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   April 8, 2003, 09:29
Default problem in transcient heat flux b.c in UDF
  #1
phani
Guest
 
Posts: n/a
i am simualating solidification and melting problems in the fluent6.0,so for that i have to give heat flux boundary condition varing with time. So i have written the Udf for that but it is diverging after time (15sec) it is diverging in the third condition of the udf.So could u plz help me

#include "udf.h"

#define d 0.04 #define C 2.18844 #define D -0.602603 #define A 762.048e04 #define B -0.217412 #define den 8960 #define kc 363 #define cp 423

DEFINE_PROFILE(heat_flux, thread,position) {

real alpha, qmax,q;

face_t f;

alpha=kc/(den*cp);

qmax=A*pow(d/alpha,B);

begin_f_loop(f,thread) { real t=RP_Get_Real("flow-time");

if(t<=5)

F_PROFILE(f,thread,position) = qmax;

else if((t>5)&&(t<=15))

F_PROFILE(f,thread,position) = qmax-6.5715e4*(t-5);

else

F_PROFILE(f,thread,position) =- 2.0152e6*C*pow(t,-D)/(pow(alpha,0.05));

} end_f_loop(f,thread) }

  Reply With Quote

Old   April 8, 2003, 10:43
Default Re: problem in transcient heat flux b.c in UDF
  #2
Alex Munoz
Guest
 
Posts: n/a
hello

Couple of mistakes

All the number must to have the form 5. or 5.0 not the form 5 in order to assign the decimal number.

also you don't need to write this sentences like this else if((t>5)&&(t<=15)) you can write the sentes like this else if(t<=15.0) F_PROFILE(f,thread,position) = qmax-6.5715e4*(t-5.0);

Best Regards

Alex Munoz
  Reply With Quote

Old   April 9, 2003, 00:13
Default Re: problem in transcient heat flux b.c in UDF
  #3
phani
Guest
 
Posts: n/a
Hai Alex,

thank's for responding,i did what u said, again the solution is diverging at the third condition i.e [F_PROFILE(f,thread,position) =- 2.0152e6*C*pow(t,-D)/(pow(alpha,0.05));] when the fluent is solving the above equation, and the solution is get diverging.
  Reply With Quote

Old   April 9, 2003, 00:58
Default Re: problem in transcient heat flux b.c in UDF
  #4
Alex Munoz
Guest
 
Posts: n/a
Hi

It is correct that you define D=-### and then in your function you writhe pow(t,-D)?

I wonder if you are making -*-=+

In addition how do you know that fluent is diverging in the third condition, the code is not able to tell you that type of information.

Just it has divergence but how you can ensure that it is due to the UDF??

Regards

Alex
  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
UDF for wall heat flux ? Seyoung Oh FLUENT 6 August 4, 2018 05:44
heat flux balance problem zhouziyi7123 FLUENT 5 May 21, 2014 03:37
Variable name for heat flux peterle CFX 4 February 13, 2014 02:21
Basic question: UDF for wall heat flux Carl FLUENT 1 August 5, 2006 19:01
Laser Heat Flux & UDF Dominick FLUENT 3 February 12, 2004 15:46


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