|
[Sponsors] |
May 30, 2013, 19:57 |
Errors in UDF
|
#1 |
Member
Shashank
Join Date: Apr 2011
Posts: 74
Rep Power: 15 |
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 |
|
May 30, 2013, 20:51 |
|
#3 |
Member
Shashank
Join Date: Apr 2011
Posts: 74
Rep Power: 15 |
Its written as:
#include "mem.h" Is that wrong? |
|
May 30, 2013, 21:25 |
|
#4 |
Member
Shashank
Join Date: Apr 2011
Posts: 74
Rep Power: 15 |
I see what you mean. Maybe I should go and look into that src folder.
|
|
May 30, 2013, 21:28 |
|
#5 |
Member
Shashank
Join Date: Apr 2011
Posts: 74
Rep Power: 15 |
I compiled the code again and it didn't give me space before mem.h, so I guess the error lies elsewhere.
|
|
May 30, 2013, 21:29 |
|
#6 |
Member
Shashank
Join Date: Apr 2011
Posts: 74
Rep Power: 15 |
C:\PROGRA~1\ANSYSI~1\v145\fluent\fluent14.5.0\src\ mem.h(802) : see declaration of 'Thread'
|
|
May 30, 2013, 21:30 |
|
#7 |
Member
Shashank
Join Date: Apr 2011
Posts: 74
Rep Power: 15 |
Once I copy-paste in here, it gives a space. There is no space in the FLUENT GUI.
|
|
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
AMI speed performance | danny123 | OpenFOAM | 21 | October 24, 2020 05:13 |
Dynamic Mesh UDF | Qureshi | FLUENT | 7 | March 23, 2017 08:37 |
Errors when Compiling UDF: error C2040/error C2099 | Julian K. | FLUENT | 1 | December 21, 2008 01:23 |
errors in interpreted udf for two macro | Asghari | FLUENT | 0 | August 7, 2006 03:29 |
UDF...UDF...UDF...UDF | Luc SEMINEL | FLUENT | 0 | November 25, 2002 05:03 |