CFD Online Discussion Forums

CFD Online Discussion Forums (
-   Fluent UDF and Scheme Programming (
-   -   FLUENT UDF Simple error. (

startup0820 August 14, 2012 03:54

FLUENT UDF Simple error.

first of all, Thank you for sharing this UDF code.

i tried to compile this source, However, the following error occurred.
..\..\src\test23.c(53) : warning C4133: 'function' : incompatible types - from 'real [3]' to 'CX_Cell_Id *'
..\..\src\test23.c(53) : error C2197: 'SV_locate_point' : too many arguments for call

i don't know why this problem occur.

Please advise if you know:) I`m using FLUENT 14.0


#include "udf.h"

#include "dpm.h"



CX_Cell_Id *c;

cell_t ct;

Thread *t;

real z[3];

real x[3] = {0.0, 0.0, 0.0};

real pressure;

int N,i;

FILE *output,*points;

Domain *d = Get_Domain(1);

points = fopen("points.txt","r");

output = fopen("results.out","w");

fscanf(points,"%d \n",&N);

/* Read points from the file one by one and write corresponding cell centroid and pressure in 뱑esults.out?*/

for ( i=0;i<N;i++ )



SV_locate_point(x, z, c);

ct = c->ct.c;

t = c->ct.t;

C_CENTROID(z, ct, t); /*Returns centroid of the cell*/


fprintf(output, "Given point %e %e, %e\nFound Cell at %e, %e, %e\nPressure %e\n\n",x[0],x[1],x[2],z[0],z[1],z[2],pressure);





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