CFD Online Logo CFD Online URL
Home > Forums > Fluent UDF and Scheme Programming

Error in Simple UDF!

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

LinkBack Thread Tools Display Modes
Old   March 14, 2013, 09:21
Question Error in Simple UDF!
Join Date: Jul 2012
Posts: 45
Rep Power: 7
Abhya is on a distinguished road
Hi everyone!
There's a very simple on demand udf I'm writing ... using DEFINE_ON_DEMAND .. and I dont get the error its on the line where DEFINE_ON_DEMAND is defined .. theCode and error are:
The udf code is :
#include "udf.h"
FILE *fout;
void get_req_cells_coords(Domain *domain, int id)
    real CC[2];
    cell_t c;
    Thread *t = Lookup_Thread(domain, id);
    fprintf(fout,"thread id %d\n", id);
        fprintf(fout, "f%d %g %g %g\n", c, CC[0], CC[1], CC[2]);
    fprintf(fout, "\n");
    Domain *domain;
    domain = Get_Domain(1);
    fout = fopen("req_cells.out", "w");
    get_req_cells_coords(domain, 3);
    get_req_cells_coords(domain, 4);

The error is:

# Generating ud_io1.h
..\..\src\get_req_cells_coords.c(19) : error C2143: syntax error : missing ';' before 'type'
can anyone help me ?
Im using Microsoft Visual Studio 2010 with FLUENT v14.5
Abhya is offline   Reply With Quote

Old   March 14, 2013, 09:36
Join Date: Jul 2012
Posts: 45
Rep Power: 7
Abhya is on a distinguished road
Another thing I'd like to mention is that I've been able to compile some other udfs using DEFINE_SOURCE without errors ...
but y this doesn't work ???
Abhya is offline   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
FLUENT UDF Simple error. startup0820 Fluent UDF and Scheme Programming 0 August 14, 2012 03:54
parse error while interpreting udf Kristin Fluent UDF and Scheme Programming 3 March 15, 2012 07:43
I need UDF help. S.Whitney FLUENT 0 October 15, 2007 11:29
simple rigid body motion UDF Dan FLUENT 0 January 11, 2006 06:48
UDF, UDF, UDF, UDF Luc SEMINEL Main CFD Forum 0 November 25, 2002 05:01

All times are GMT -4. The time now is 11:52.