CFD Online Logo CFD Online URL
Home > Forums > Software User Forums > ANSYS > FLUENT > Fluent UDF and Scheme Programming

Error inputting udf into fluent for mass source

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

LinkBack Thread Tools Search this Thread Display Modes
Old   April 26, 2012, 21:42
Default Error inputting udf into fluent for mass source
New Member
Edward Overy Jr.
Join Date: Jan 2012
Posts: 5
Rep Power: 14
ejvikings is on a distinguished road
In fluent, I'm modeling the 2-D combustion of a leaf. I made a mesh in gambit that includes a small face around the leaf that is zoned as a fluid to allow mass sources in Fluent.

My problem is that I have tried to use a udf for the source term of h20 being volatilized but I always get the result "Error, Segmentation Violation". It works if I just put in a constant value for the source term of H20.

Here's a copy of the UDF that I was trying to use:

#include "udf.h"
face_t f;
real x[ND_ND]; /* this will hold the position vector */
real y;
real ti = CURRENT_TIME; /* Current time step */
/* inputs for leaf */
real tig, d, th, SurfA, pi;
real a1, b1, ae, be, dmH2O, value, total;
tig=3.0; /* Time when ignition occurs - devolatilization starts */
d=0.02736; /* diameter of leaf [m] - must go with FLUENT */
th=0.0005; /* thickness of leaf [m] - must go with FLUENT */
a1=0.483620247554468; /* Water */
if ((ti-tig)<0.) {
else {
y = x[1];
/* printf("H2O=%f\n",value); */

Any help would be greatly appreciated!!
ejvikings is offline   Reply With Quote


fluent, mass source term, segmentation violation, udf

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

Similar Threads
Thread Thread Starter Forum Replies Last Post
UDF - Source Term Question Jacques FLUENT 0 December 8, 2008 13:40
UDF for energy source João Fernandes FLUENT 4 October 17, 2008 04:53
fluent UDF external library lapack problem Rick FLUENT 0 May 7, 2008 10:16
DxFoam reader update hjasak OpenFOAM Post-Processing 69 April 24, 2008 01:24
UDF of Zimont model in fluent Z Main CFD Forum 0 February 17, 2005 03:07

All times are GMT -4. The time now is 10:50.