|
[Sponsors] |
April 7, 2013, 13:41 |
problem in compailing udf
|
#1 |
New Member
rizky
Join Date: Mar 2013
Posts: 2
Rep Power: 0 |
hi, i want to simulate air flow through a loopwing wind turbine in fluent 14. i use anguler velocity variabel, i use MSVS 2010 to compile my udf
this is my udf file #include "udf.h" #include "dynamesh_tools.h" DEFINE_SDOF_PROPERTIES(loopwing, prop, dt, time, dtime) { FILE *pf; prop[SDOF_MASS]= 0.386; prop[SDOF_IXX]= 7035.89e-6 ; prop[SDOF_IYY]= 7689.16e-6 ; prop[SDOF_IZZ]= 7689.16e-6; prop[SDOF_ZERO_TRANS_X] = TRUE; prop[SDOF_ZERO_TRANS_Y] = TRUE; prop[SDOF_ZERO_TRANS_Z] = TRUE; prop[SDOF_ZERO_ROT_Y] = TRUE; prop[SDOF_ZERO_ROT_Z] = TRUE; omega[0]=75; if(NULL == (pf = fopen("omeega.txt","a"))) Error("File tidak dapat ditulis!\n"); fprintf(pf,"%f %f\n", time, DT_THETA(dt)[0]); fclose(pf); Message("\nposisi= %f rad/s\n", DT_THETA(dt)[0]); } when i build there was an error : ..\..\src\loopwing.c(20) : error C2065: 'omega' : undeclared identifier ..\..\src\loopwing.c(20) : error C2109: subscript requires array or pointer type can you give me some advices? thanks |
|
April 24, 2013, 04:32 |
|
#2 |
Senior Member
Paritosh Vasava
Join Date: Oct 2012
Location: Lappeenranta, Finland
Posts: 732
Rep Power: 23 |
Do you compile it or interpret it?
Why do you have #include "dynamesh_tools.h"? |
|
April 26, 2013, 12:47 |
|
#3 |
New Member
rizky
Join Date: Mar 2013
Posts: 2
Rep Power: 0 |
||
May 1, 2013, 12:47 |
|
#4 | |
New Member
Amit Singh
Join Date: Feb 2013
Posts: 4
Rep Power: 13 |
As per the error message, it seems that you should have declared the variable 'omega' before you used it. You may need something like:
Quote:
|
||
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
ATTN ALL: SOLUTON TO UDF COMPILE PROBLEM | Rizwan | Fluent UDF and Scheme Programming | 40 | March 18, 2018 07:05 |
what's the problem with my udf | zzyan | FLUENT | 0 | November 4, 2010 04:56 |
Problem with my udf | july | Fluent UDF and Scheme Programming | 3 | June 20, 2010 07:56 |
udf compiling problem | akr | FLUENT | 3 | August 22, 2007 08:14 |
UDF problem | chiseung | FLUENT | 4 | January 10, 2002 10:58 |