CFD Online Logo CFD Online URL
Home > Forums > FLUENT

Transient udf for limiting flux (solid fuel combustion)

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

LinkBack Thread Tools Display Modes
Old   February 23, 2015, 09:46
Default Transient udf for limiting flux (solid fuel combustion)
Baradwaj B S
Join Date: Jan 2015
Posts: 75
Rep Power: 4
Bharadwaj B S is on a distinguished road
Sponsored Links
Hi everyone,

My name is Bharadwaj B S, I am currently doing a project on solid fuel combustion (Single particle). In this I have created a sphere inside a cylindrical fluid domain.

There will be velocity inlet from one side of cylinder and another inlet from the surface of the sphere as mass flux( kg/m^2 s) signifying volatile release.

I have written a simple code where the flux from the sphere is arbitrarily dependent on sphere face temperature (F_T(f, t)). Upto 20 seconds there should be mass flux from the surface of the sphere, when the time reaches 20 seconds the mass flux from surface should stop. For this I have used the if else condition.

From the logic side it seems to be fine. But when I hook and see the result. It is not showing the flux from the surface.


1. Is there any mistake in UDF (macro used, logic or anything)?
Because there is a separate macro for transient Profiles. (DEINE_TRANSIENT_PROFILE).
3. Is there any correction in condition (if (time <= 20))??

Please reply at your earliest convenience. Any help will be of great use for me. Thanks in Advance.


#include "udf.h"
#include "math.h"

real time;
real tmp;
real flx;
real a;
real b;
int i;
int ID = 13;
Thread *t;
face_t f;
cell_t c;

DEFINE_PROFILE(flux, t, i)
Domain *d;

d = Get_Domain(1);
t = Lookup_Thread(d, ID);
flx = 0.0;
tmp = 0.0;
a = - 0.5;
b = 0.0;

begin_f_loop(f, t)
if(time <= 20)
flx = - a * tmp;
tmp = F_T(f, t);
F_PROFILE(f, t, i) = flx;
F_PROFILE(f, t, i) = b;
Bharadwaj B S is offline   Reply With Quote
Sponsored Links


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
Combustion of fuel mixture muizzlkfle FLUENT 0 December 10, 2014 12:22
solid fuel combustion apo FLUENT 0 December 1, 2014 13:20
Error finding variable "THERMX" sunilpatil CFX 8 April 26, 2013 07:00
2 solid fuel combustion giant Main CFD Forum 0 May 24, 2005 06:46
udf for transient heat flux BC isaac FLUENT 1 June 3, 2004 16:29

Sponsored Links

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