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

UDF for heat source in Soldification and melting model

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

Like Tree1Likes
  • 1 Post By karthik82

Reply
 
LinkBack Thread Tools Display Modes
Old   June 23, 2014, 02:14
Default UDF for heat source in Soldification and melting model
  #1
New Member
 
karthik
Join Date: Oct 2013
Posts: 7
Rep Power: 3
karthik82 is on a distinguished road
Hi all,

I am using solidification and melting model for simulating melting process for a phase change material in a spherical capsule. Only energy equation is solved. The default model assumes linear temperature enthalpy relationship. But I need to use a heat source in energy equation (enthalpy varies with temp) to incorporate polynomial enthalpy temperature relationship.

My source term is:
Se = density/deltaT*f[T] , (unit will be W/meter cube, since f(T) is J/kg).

I wrote my UDF which is shown below.


#include "udf.h"
#define C1 1757.9
#define C2 3.0e6
#define C3 2e9
#define C4 1e12
#define C5 2e14
#define C6 3e16
#define C7 1e18
DEFINE_SOURCE(phase_change,cell,thread)
{
real source,time,rho,temp,pretime;
rho = C_R(c,t);
temp = C_T(c,t);
time = CURRENT_TIME;
pretime= PREVIOUS_TIME;
source = -(rho/(time-pretime))*(C1*pow(temp,6)-C2*pow(temp,5)+C3*pow(temp,4)-C4*pow(temp,3)+C5*pow(temp,2)-C6*temp+C7);
return source;
}

Negative sign in source indicates the process is melting ( heat sink).
Please kindly advise me whether this is right format and once I interpret the simulation says
temp definition shadows previous definition

and

This deltaT is time difference between real flow time ( whether we have to take time-step difference or real flow time difference ?)
During execution the cell temperature is too low. And I get temperature limited to 1.0 K in the output.
Please kindly advise me about this UDF.

Thanks

Regards,
Karthik
thermal energy likes this.
karthik82 is offline   Reply With Quote

Old   June 23, 2014, 05:39
Default
  #2
New Member
 
karthik
Join Date: Oct 2013
Posts: 7
Rep Power: 3
karthik82 is on a distinguished road
Awaiting for reply. Thanks
karthik82 is offline   Reply With Quote

Reply

Thread Tools
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 On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
UDF for heat source in Soldification and melting model karthik82 Fluent UDF and Scheme Programming 6 June 30, 2014 02:45


All times are GMT -4. The time now is 06:35.