|
[Sponsors] |
April 13, 2014, 06:36 |
Problem with compiling UDF in Fluent
|
#1 |
New Member
Amir
Join Date: Feb 2013
Location: Iran
Posts: 6
Rep Power: 13 |
Dear
I am running ANSYS Fluent 15.0 and am trying to compile a UDF (Dynamic mesh udf) into Fluent. But I cannot compile it. The following error emerges. udf_names.c(13) : warning C4113: 'void (*)()' differs in parameter lists from 'void (*)(void)' udf_names.c(14) : warning C4113: 'void (*)()' differs in parameter lists from 'void (*)(void)' udf_names.c(15) : warning C4113: 'void (*)()' differs in parameter lists from 'void (*)(void)' udf_names.c(16) : warning C4113: 'void (*)()' differs in parameter lists from 'void (*)(void)' udf_names.c(17) : warning C4113: 'void (*)()' differs in parameter lists from 'void (*)(void)' udf_names.c(18) : warning C4113: 'void (*)()' differs in parameter lists from 'void (*)(void)' # Linking libudf.dll because of makefile user_nt.udf udf_names.obj udf_meshmotion.obj Microsoft (R) Incremental Linker Version 11.00.50727.1 Copyright (C) Microsoft Corporation. All rights reserved. Creating library libudf.lib and object libudf.exp Creating user_nt.udf file for 3d_node ... (system "copy "C:\PROGRA~1\ANSYSI~1\v150\fluent"\fluent15.0.0\sr c\makefile_nt.udf "libudf\win64\3d_node\makefile" ") 1 file(s) copied. (chdir "libudf")(chdir "win64\3d_node")# Generating ud_io1.h udf_meshmotion.c ..\..\src\udf_meshmotion.c(38) : error C2275: 'Thread' : illegal use of this type as an expression C:\PROGRA~1\ANSYSI~1\v150\fluent\fluent15.0.0\src\ mem.h(256) : see declaration of 'Thread' ..\..\src\udf_meshmotion.c(38) : error C2065: 'thread1' : undeclared identifier ..\..\src\udf_meshmotion.c(40) : error C2275: 'Thread' : illegal use of this type as an expression C:\PROGRA~1\ANSYSI~1\v150\fluent\fluent15.0.0\src\ mem.h(256) : see declaration of 'Thread' ..\..\src\udf_meshmotion.c(40) : error C2065: 'thread2' : undeclared identifier ..\..\src\udf_meshmotion.c(41) : error C2275: 'face_t' : illegal use of this type as an expression c:\program files\ansys inc\v150\fluent\fluent15.0.0\src\mem_grid.h(119) : see declaration of 'face_t' ..\..\src\udf_meshmotion.c(41) : error C2146: syntax error : missing ';' before identifier 'face' ..\..\src\udf_meshmotion.c(41) : error C2065: 'face' : undeclared identifier ..\..\src\udf_meshmotion.c(43) : error C2275: 'real' : illegal use of this type as an expression c:\program files\ansys inc\v150\fluent\fluent15.0.0\src\global.h(182) : see declaration of 'real' ..\..\src\udf_meshmotion.c(43) : error C2146: syntax error : missing ';' before identifier 'area' ..\..\src\udf_meshmotion.c(43) : error C2065: 'area' : undeclared identifier ..\..\src\udf_meshmotion.c(43) : error C2109: subscript requires array or pointer type ..\..\src\udf_meshmotion.c(45) : error C2065: 'thread1' : undeclared identifier ..\..\src\udf_meshmotion.c(45) : warning C4047: '=' : 'int' differs in levels of indirection from 'Thread *' ..\..\src\udf_meshmotion.c(46) : error C2065: 'thread2' : undeclared identifier ..\..\src\udf_meshmotion.c(46) : warning C4047: '=' : 'int' differs in levels of indirection from 'Thread *' ..\..\src\udf_meshmotion.c(48) : error C2065: 'thread1' : undeclared identifier ..\..\src\udf_meshmotion.c(48) : error C2223: left of '->nelements_in_layer' must point to struct/union ..\..\src\udf_meshmotion.c(48) : error C2065: 'face' : undeclared identifier ..\..\src\udf_meshmotion.c(49) : error C2065: 'thread1' : undeclared identifier ..\..\src\udf_meshmotion.c(49) : error C2223: left of '->storage' must point to struct/union ..\..\src\udf_meshmotion.c(49) : error C2065: 'face' : undeclared identifier ..\..\src\udf_meshmotion.c(49) : error C2223: left of '->head' must point to struct/union ..\..\src\udf_meshmotion.c(49) : fatal error C1903: unable to recover from previous error(s); stopping compilation Done. I am using Ansys Fluent 15.0 and Visula studio 11 (x64). I also installed Visaul C++ 2010 and ran the Fluent from visual studio comment, but the problem still exists. Can anyone please help me? Your help would be greatly appreciated. |
|
April 17, 2014, 08:26 |
|
#2 |
New Member
Amir
Join Date: Feb 2013
Location: Iran
Posts: 6
Rep Power: 13 |
there is no body
Please help me? |
|
April 26, 2014, 08:51 |
|
#3 |
New Member
Amir
Join Date: Feb 2013
Location: Iran
Posts: 6
Rep Power: 13 |
I have attached my udf, this udf has been written to calculate movement of the disk in a safety relief valve. Any help would be highly appreciated.
|
|
April 14, 2015, 09:39 |
|
#4 |
New Member
Andrej
Join Date: Mar 2015
Posts: 18
Rep Power: 11 |
Try to instal VS 2012 express. For Ansys 15 is this required.
|
|
April 14, 2015, 10:01 |
|
#5 |
Senior Member
Join Date: Nov 2013
Posts: 1,965
Rep Power: 27 |
Your line 35 (pressure_force1=0 is an assignment.
Your line 38 (Thread *thread1 is a declaration. For the type of c that Fluent uses (ansi c?), you need to put assignments after declarations. |
|
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
fluent udf error while compiling: unknown type name __locale_t | aditya.pandare | Fluent UDF and Scheme Programming | 3 | April 12, 2014 15:52 |
The fluent stopped and errors with "Emergency: received SIGHUP signal" | yuyuxuan | FLUENT | 0 | December 3, 2013 23:56 |
my problem wuth UDF compiling | m.beh | FLUENT | 3 | November 22, 2011 01:47 |
UDF compiling problem in Flient 6.3 | jeevan kumar | FLUENT | 2 | February 25, 2009 01:43 |
fluent UDF external library lapack problem | Rick | FLUENT | 0 | May 7, 2008 11:16 |