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

Volumetric Heat Source define

Register Blogs Community New Posts Updated Threads Search

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   November 12, 2018, 01:52
Default Volumetric Heat Source define
  #1
New Member
 
NhanLe
Join Date: Jan 2016
Posts: 7
Rep Power: 10
NhanLe is on a distinguished road
Hi all, I am a newbie and dealing with simulating a laser irradiating a metal subtrate. When defining the heat source, I used the Gaussian distribution heat flux as defined by the UDF below (x,y plane)

#include "udf.h"
#define PI 3.1415926 //Pi, a constant
#define sigma_q 0.35 //Absorptivity
#define P 146.8 //Laser power
#define R 5.250e-3 //Radius of laser beam
#define v 3.000e-3 //Scanning velocity
DEFINE_PROFILE(heat_flux,thread,position) //The UDF profile will have the name “heat_flux”
{
face_t f; //Define face variable
double x[ND_ND],r,time,vol; //Define face centroid vector, distance, time, and exponential for laser
double tempp,conv,emiss; //Define temperature, convection and emission energy
time=RP_Get_Real("flow-time"); //Acquire time from FLUENT solver
begin_f_loop(f,thread) //Loop through all relevant boundary faces
{
tempp=F_T(f,thread); //Get the temperature of the face
F_CENTROID(x,f,thread); //Acquire the face centroid location
r=sqrt(pow((x[0]+R-v*time),2.0)+pow(x[1]-0.085725,2.0)); //Determine distance from beam center
conv=0.0*17.0*(tempp-299.4); //Calculate convective losses
emiss=0.0*5.67e-8*(pow(tempp,4.0)-pow(299.0,4.0)); //Calculate radiation losses
if (conv<0.0) {conv=0.0;} //Prevent convection if surface is colder than surroundings
if (emiss<0.0) {emiss=0.0;} //Prevent radiation if surface is colder than surroundings
//calculate the intensity with convective and radiation losses in the next two lines
vol=2.0*r*r/(R*R);
F_PROFILE(f,thread,position)=(2.0*P*sigma_q*exp(-vol)/(PI*R*R)-conv-emiss); //Set face flux
end_f_loop(f,thread)
}

However, I would like to construct a 3-D volumetric heat source by implementing the absorptivity profile along the thickness (Tabulated data). I have learnt that I should use the HEAT GENERATION RATE UDF, can anyone shed a light for me about the issue ? Thanks and have a good day.
NhanLe 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
[swak4Foam] swak4foam building problem GGerber OpenFOAM Community Contributions 54 April 24, 2015 16:02
Problem compiling a custom Lagrangian library brbbhatti OpenFOAM Programming & Development 2 July 7, 2014 11:32
[swak4Foam] build problem swak4Foam OF 2.2.0 mcathela OpenFOAM Community Contributions 14 April 23, 2013 13:59
OpenFOAM on MinGW crosscompiler hosted on Linux allenzhao OpenFOAM Installation 127 January 30, 2009 19:08
DxFoam reader update hjasak OpenFOAM Post-Processing 69 April 24, 2008 01:24


All times are GMT -4. The time now is 16:58.