|
[Sponsors] |
August 14, 2012, 04:54 |
FLUENT UDF Simple error.
|
#1 |
New Member
Jong Hwan Park
Join Date: Oct 2011
Posts: 12
Rep Power: 15 |
Hello~!
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" DEFINE_ON_DEMAND(locate_point) { 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++ ) { fscanf(points,"%e%e%e\n",&x[0],&x[1],&x[2]); SV_locate_point(x, z, c); ct = c->ct.c; t = c->ct.t; C_CENTROID(z, ct, t); /*Returns centroid of the cell*/ pressure=C_P(ct,t); 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); } fclose(output); fclose(points); } |
|
Tags |
udf and programming |
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
Compile calcMassFlowC | aurore | OpenFOAM Programming & Development | 13 | March 23, 2018 08:43 |
[OpenFOAM] Native ParaView Reader Bugs | tj22 | ParaView | 270 | January 4, 2016 12:39 |
[swak4Foam] groovyBC: problems compiling: "flex: not found" and "undefined reference to ..." | sega | OpenFOAM Community Contributions | 12 | February 17, 2010 10:30 |
Installation OF1.5-dev | ttdtud | OpenFOAM Installation | 46 | May 5, 2009 03:32 |
attach/detach (valve opening/closing) | phsieh2005 | OpenFOAM Running, Solving & CFD | 2 | March 21, 2009 06:18 |