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

Errors in UDF

Register Blogs Members List Search Today's Posts Mark Forums Read

Reply
 
LinkBack Thread Tools Display Modes
Old   May 30, 2013, 18:57
Default Errors in UDF
  #1
Member
 
Shashank
Join Date: Apr 2011
Posts: 70
Rep Power: 5
shashank312 is on a distinguished road
Getting the following errors when I compile my code.


..\..\src\PhaseChangeModel.c(193) : error C2275: 'real' : illegal use of this type as an expression
c:\program files\ansys inc\v145\fluent\fluent14.5.0\src\global.h(166) : see declaration of 'real'
..\..\src\PhaseChangeModel.c(193) : error C2146: syntax error : missing ';' before identifier 'mass_liquid'
..\..\src\PhaseChangeModel.c(193) : error C2143: syntax error : missing ')' before 'type'
..\..\src\PhaseChangeModel.c(193) : error C2059: syntax error : ')'
..\..\src\PhaseChangeModel.c(196) : error C2275: 'Thread' : illegal use of this type as an expression
C:\PROGRA~1\ANSYSI~1\v145\fluent\fluent14.5.0\src\ mem.h(802) : see declaration of 'Thread'
..\..\src\PhaseChangeModel.c(196) : error C2065: 'tm' : undeclared identifier
..\..\src\PhaseChangeModel.c(198) : error C2065: 'massliquidsource' : undeclared identifier
..\..\src\PhaseChangeModel.c(198) : error C2065: 'tm' : undeclared identifier
..\..\src\PhaseChangeModel.c(198) : error C2223: left of '->storage' must point to struct/union
..\..\src\PhaseChangeModel.c(198) : error C2065: 'cell' : undeclared identifier
..\..\src\PhaseChangeModel.c(198) : error C2065: 'cell' : undeclared identifier
..\..\src\PhaseChangeModel.c(199) : error C2065: 'tm' : undeclared identifier
..\..\src\PhaseChangeModel.c(199) : error C2223: left of '->storage' must point to struct/union
..\..\src\PhaseChangeModel.c(199) : error C2065: 'cell' : undeclared identifier
..\..\src\PhaseChangeModel.c(199) : error C2065: 'massliquidsource' : undeclared identifier
..\..\src\PhaseChangeModel.c(201) : error C2065: 'dS' : undeclared identifier
..\..\src\PhaseChangeModel.c(201) : error C2065: 'eqn' : undeclared identifier
..\..\src\PhaseChangeModel.c(201) : error C2109: subscript requires array or pointer type
..\..\src\PhaseChangeModel.c(201) : error C2065: 'tm' : undeclared identifier
..\..\src\PhaseChangeModel.c(201) : error C2223: left of '->storage' must point to struct/union
..\..\src\PhaseChangeModel.c(201) : error C2065: 'cell' : undeclared identifier
..\..\src\PhaseChangeModel.c(203) : error C2065: 'massliquidsource' : undeclared identifier
..\..\src\PhaseChangeModel.c(203) : warning C4098: 'massenergy_transfer' : 'void' function returning a value
..\..\src\PhaseChangeModel.c(206) : error C2275: 'real' : illegal use of this type as an expression
c:\program files\ansys inc\v145\fluent\fluent14.5.0\src\global.h(166) : see declaration of 'real'
..\..\src\PhaseChangeModel.c(206) : error C2146: syntax error : missing ';' before identifier 'mass_vapor'
..\..\src\PhaseChangeModel.c(206) : error C2143: syntax error : missing ')' before 'type'
..\..\src\PhaseChangeModel.c(206) : error C2059: syntax error : ')'
..\..\src\PhaseChangeModel.c(209) : error C2275: 'Thread' : illegal use of this type as an expression
C:\PROGRA~1\ANSYSI~1\v145\fluent\fluent14.5.0\src\ mem.h(802) : see declaration of 'Thread'
..\..\src\PhaseChangeModel.c(209) : error C2065: 'tm' : undeclared identifier
..\..\src\PhaseChangeModel.c(209) : error C2065: 'vt' : undeclared identifier
..\..\src\PhaseChangeModel.c(209) : error C2223: left of '->super_thread' must point to struct/union
..\..\src\PhaseChangeModel.c(211) : error C2065: 'massvaporsource' : undeclared identifier
..\..\src\PhaseChangeModel.c(211) : error C2065: 'tm' : undeclared identifier
..\..\src\PhaseChangeModel.c(211) : error C2223: left of '->storage' must point to struct/union
..\..\src\PhaseChangeModel.c(211) : error C2065: 'cell' : undeclared identifier
..\..\src\PhaseChangeModel.c(211) : error C2065: 'vt' : undeclared identifier
..\..\src\PhaseChangeModel.c(211) : error C2223: left of '->storage' must point to struct/union
..\..\src\PhaseChangeModel.c(211) : error C2065: 'cell' : undeclared identifier
..\..\src\PhaseChangeModel.c(212) : error C2065: 'tm' : undeclared identifier
..\..\src\PhaseChangeModel.c(212) : error C2223: left of '->storage' must point to struct/union
..\..\src\PhaseChangeModel.c(212) : error C2065: 'cell' : undeclared identifier
..\..\src\PhaseChangeModel.c(212) : error C2065: 'massvaporsource' : undeclared identifier
..\..\src\PhaseChangeModel.c(214) : error C2065: 'dS' : undeclared identifier
..\..\src\PhaseChangeModel.c(214) : error C2065: 'eqn' : undeclared identifier
..\..\src\PhaseChangeModel.c(214) : error C2109: subscript requires array or pointer type
..\..\src\PhaseChangeModel.c(214) : error C2065: 'tm' : undeclared identifier
..\..\src\PhaseChangeModel.c(214) : error C2223: left of '->storage' must point to struct/union
..\..\src\PhaseChangeModel.c(214) : error C2065: 'cell' : undeclared identifier
..\..\src\PhaseChangeModel.c(216) : error C2065: 'massvaporsource' : undeclared identifier
..\..\src\PhaseChangeModel.c(216) : warning C4098: 'massenergy_transfer' : 'void' function returning a value
..\..\src\PhaseChangeModel.c(219) : error C2275: 'real' : illegal use of this type as an expression
c:\program files\ansys inc\v145\fluent\fluent14.5.0\src\global.h(166) : see declaration of 'real'
..\..\src\PhaseChangeModel.c(219) : error C2146: syntax error : missing ';' before identifier 'energy'
..\..\src\PhaseChangeModel.c(219) : error C2143: syntax error : missing ')' before 'type'
..\..\src\PhaseChangeModel.c(219) : error C2059: syntax error : ')'
..\..\src\PhaseChangeModel.c(222) : error C2065: 'energysource' : undeclared identifier
..\..\src\PhaseChangeModel.c(222) : error C2065: 'thread' : undeclared identifier
..\..\src\PhaseChangeModel.c(222) : error C2223: left of '->storage' must point to struct/union
..\..\src\PhaseChangeModel.c(222) : error C2065: 'cell' : undeclared identifier
..\..\src\PhaseChangeModel.c(222) : error C2065: 'thread' : undeclared identifier
..\..\src\PhaseChangeModel.c(222) : error C2223: left of '->storage' must point to struct/union
..\..\src\PhaseChangeModel.c(222) : error C2065: 'cell' : undeclared identifier
..\..\src\PhaseChangeModel.c(222) : error C2065: 'thread' : undeclared identifier
..\..\src\PhaseChangeModel.c(222) : error C2223: left of '->storage' must point to struct/union
..\..\src\PhaseChangeModel.c(222) : error C2065: 'cell' : undeclared identifier
..\..\src\PhaseChangeModel.c(222) : error C2065: 'thread' : undeclared identifier
..\..\src\PhaseChangeModel.c(222) : error C2223: left of '->storage' must point to struct/union
..\..\src\PhaseChangeModel.c(222) : error C2065: 'cell' : undeclared identifier
..\..\src\PhaseChangeModel.c(223) : error C2065: 'thread' : undeclared identifier
..\..\src\PhaseChangeModel.c(223) : error C2223: left of '->storage' must point to struct/union
..\..\src\PhaseChangeModel.c(223) : error C2065: 'cell' : undeclared identifier
..\..\src\PhaseChangeModel.c(223) : error C2065: 'energysource' : undeclared identifier
..\..\src\PhaseChangeModel.c(225) : error C2065: 'dS' : undeclared identifier
..\..\src\PhaseChangeModel.c(225) : error C2065: 'eqn' : undeclared identifier
..\..\src\PhaseChangeModel.c(225) : error C2109: subscript requires array or pointer type
..\..\src\PhaseChangeModel.c(225) : error C2065: 'thread' : undeclared identifier
..\..\src\PhaseChangeModel.c(225) : error C2223: left of '->storage' must point to struct/union
..\..\src\PhaseChangeModel.c(225) : error C2065: 'cell' : undeclared identifier
..\..\src\PhaseChangeModel.c(225) : error C2065: 'thread' : undeclared identifier
..\..\src\PhaseChangeModel.c(225) : error C2223: left of '->storage' must point to struct/union
..\..\src\PhaseChangeModel.c(225) : error C2065: 'cell' : undeclared identifier
..\..\src\PhaseChangeModel.c(227) : error C2065: 'energysource' : undeclared identifier
..\..\src\PhaseChangeModel.c(227) : warning C4098: 'massenergy_transfer' : 'void' function returning a value


Any help will be appreciated.

Shashank
shashank312 is offline   Reply With Quote

Old   May 30, 2013, 19:38
Default
  #2
Senior Member
 
Join Date: Aug 2011
Posts: 315
Rep Power: 11
blackmask will become famous soon enough
why is there a space before mem.h?
blackmask is offline   Reply With Quote

Old   May 30, 2013, 19:51
Default
  #3
Member
 
Shashank
Join Date: Apr 2011
Posts: 70
Rep Power: 5
shashank312 is on a distinguished road
Its written as:

#include "mem.h"

Is that wrong?
shashank312 is offline   Reply With Quote

Old   May 30, 2013, 20:25
Default
  #4
Member
 
Shashank
Join Date: Apr 2011
Posts: 70
Rep Power: 5
shashank312 is on a distinguished road
I see what you mean. Maybe I should go and look into that src folder.
shashank312 is offline   Reply With Quote

Old   May 30, 2013, 20:28
Default
  #5
Member
 
Shashank
Join Date: Apr 2011
Posts: 70
Rep Power: 5
shashank312 is on a distinguished road
I compiled the code again and it didn't give me space before mem.h, so I guess the error lies elsewhere.
shashank312 is offline   Reply With Quote

Old   May 30, 2013, 20:29
Default
  #6
Member
 
Shashank
Join Date: Apr 2011
Posts: 70
Rep Power: 5
shashank312 is on a distinguished road
C:\PROGRA~1\ANSYSI~1\v145\fluent\fluent14.5.0\src\ mem.h(802) : see declaration of 'Thread'
shashank312 is offline   Reply With Quote

Old   May 30, 2013, 20:30
Default
  #7
Member
 
Shashank
Join Date: Apr 2011
Posts: 70
Rep Power: 5
shashank312 is on a distinguished road
Once I copy-paste in here, it gives a space. There is no space in the FLUENT GUI.
shashank312 is offline   Reply With Quote

Reply

Thread Tools
Display Modes

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


Similar Threads
Thread Thread Starter Forum Replies Last Post
AMI speed performance danny123 OpenFOAM 19 October 24, 2012 07:44
Dynamic Mesh UDF Qureshi FLUENT 1 December 2, 2009 00:27
Errors when Compiling UDF: error C2040/error C2099 Julian K. FLUENT 1 December 21, 2008 00:23
errors in interpreted udf for two macro Asghari FLUENT 0 August 7, 2006 02:29
UDF...UDF...UDF...UDF Luc SEMINEL FLUENT 0 November 25, 2002 04:03


All times are GMT -4. The time now is 18:01.