CFD Online Logo CFD Online URL
www.cfd-online.com
[Sponsors]
Home > Forums > Software User Forums > ANSYS > FLUENT > Fluent UDF and Scheme Programming

Problem with compiling UDF in Fluent

Register Blogs Community New Posts Updated Threads Search

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   April 13, 2014, 05:36
Default Problem with compiling UDF in Fluent
  #1
New Member
 
Amir
Join Date: Feb 2013
Location: Iran
Posts: 6
Rep Power: 13
amojodi is on a distinguished road
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.
amojodi is offline   Reply With Quote

Old   April 17, 2014, 07:26
Default
  #2
New Member
 
Amir
Join Date: Feb 2013
Location: Iran
Posts: 6
Rep Power: 13
amojodi is on a distinguished road
there is no body
Please help me?
amojodi is offline   Reply With Quote

Old   April 26, 2014, 07:51
Default
  #3
New Member
 
Amir
Join Date: Feb 2013
Location: Iran
Posts: 6
Rep Power: 13
amojodi is on a distinguished road
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.
Attached Files
File Type: c diskmotion.c (4.6 KB, 151 views)
amojodi is offline   Reply With Quote

Old   April 14, 2015, 08:39
Default
  #4
New Member
 
Andrej
Join Date: Mar 2015
Posts: 18
Rep Power: 11
perun333 is on a distinguished road
Try to instal VS 2012 express. For Ansys 15 is this required.
perun333 is offline   Reply With Quote

Old   April 14, 2015, 09:01
Default
  #5
Senior Member
 
Join Date: Nov 2013
Posts: 1,965
Rep Power: 26
pakk will become famous soon enough
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.
pakk is offline   Reply With Quote

Reply


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 Off
Pingbacks are On
Refbacks are On


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 14:52
The fluent stopped and errors with "Emergency: received SIGHUP signal" yuyuxuan FLUENT 0 December 3, 2013 22:56
my problem wuth UDF compiling m.beh FLUENT 3 November 22, 2011 00:47
UDF compiling problem in Flient 6.3 jeevan kumar FLUENT 2 February 25, 2009 00:43
fluent UDF external library lapack problem Rick FLUENT 0 May 7, 2008 10:16


All times are GMT -4. The time now is 06:25.