CFD Online Logo CFD Online URL
Home > Forums > FLUENT

UDF error ?

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

LinkBack Thread Tools Display Modes
Old   December 21, 2006, 13:24
Default UDF error ?
St├ęphane Champmartin
Posts: n/a
Does anyone understand why I get an error message when I try to compile the udf below? This udf is directly inspired by an example found in Fluent's help so i'm a bit confused... The mistake occurs at the line beginning with "sub_domain_loop(subdomain, mixture_domain, phase_domain_index)"

#include "udf.h"

#define Pi 3.14159

#define amp 0.1

#define l 1.

int phase_domain_index;

cell_t cell;

Thread *cell_thread;

Domain *subdomain;

real xc[ND_ND];

/* loop over all subdomains (phases) in the superdomain (mixture) */

sub_domain_loop(subdomain, mixture_domain, phase_domain_index)


/* loop if secondary phase */

if (DOMAIN_ID(subdomain) == 2)

/* loop over all cell threads in the secondary phase domain */

thread_loop_c (cell_thread,subdomain)


/* loop over all cells in secondary phase cell threads */

begin_c_loop_all (cell,cell_thread)



if (x[1] >= amp*sin(2*Pi*x[0]/l))

/* set volume fraction to 1 for centroid */

C_VOF(cell,cell_thread) = 1.;


/* otherwise initialize to zero */

C_VOF(cell,cell_thread) = 0.; } end_c_loop_all (cell,cell_thread) } } } }

  Reply With Quote


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
Problem with UDF compiling for kTkLW model Wantami FLUENT 0 July 18, 2011 05:11
ParaView for OF-1.6-ext Chrisi1984 OpenFOAM Installation 0 December 31, 2010 07:42
Accessing phi from a fvPatchField at same patch johndeas OpenFOAM 1 September 13, 2010 20:23
Installation OF1.5-dev ttdtud OpenFOAM Installation 46 May 5, 2009 02:32
Problem with compile the setParabolicInlet ivanyao OpenFOAM Running, Solving & CFD 6 September 5, 2008 20:50

All times are GMT -4. The time now is 22:48.