|
[Sponsors] |
May 11, 2018, 03:25 |
UDF interpreted Error
|
#1 |
New Member
Join Date: May 2018
Posts: 5
Rep Power: 8 |
Hi, Eeverybody!
I'm using fluent 17. my udf is as bellowacturally, it's partly copied from the Ansys help) #include "udf.h"; #inclue "math.h"; ....... DEFINE_VR_RATE(reforming_rate,c,t,re,mw,yi,rr,rr_t ) { .......... if (!strcmp(re->name, "reaction-1")) -----line 49 { *rr=r1v } else if (!strcmp(re->name, "reaction-2")) { *rr=r2v } else if (!strcmp(re->name, "reaction-3")) { *rr=r3v } else { /* Message("Unknown Reaction\n"); */ } } when the UDF is interpreted in fluent, a error ( line 49:structure reference not implemented) occured. Is there any parse error? Or should I include more head files? Many thanks in advance! |
|
May 11, 2018, 05:36 |
|
#2 |
Senior Member
Alexander
Join Date: Apr 2013
Posts: 2,363
Rep Power: 34 |
was
Code:
*rr=r1v Code:
*rr=r1v; best regards |
|
May 11, 2018, 21:28 |
|
#3 |
New Member
Join Date: May 2018
Posts: 5
Rep Power: 8 |
Missing of symbol ";" is another obvious error, thanks a lot!
However,i'm afraid that the problem mentioned in my post is about the variable "r", which is defined by fluent macro. I have tried to used the example udf in fluent help, the error still occured"structure reference not implemented". it make me crazy.Could you please tell me why? Many thanks! the example udf from fluent helps is as below: #include "udf.h" DEFINE_VR_RATE(myrate,c,t,r,mw,yi,rr,rr_t) { /*If more than one reaction is defined, it is necessary to distinguish between these using the names of the reactions. */ if (!strcmp(r->name, "reaction-1")) { /* Reaction 1 */ } else if (!strcmp(r->name, "reaction-2")) { /* Reaction 2 */ } else { /* Message("Unknown Reaction\n"); */ } /* Message("Actual Reaction: %s\n",r->name); */ } |
|
May 13, 2018, 22:22 |
|
#4 |
Senior Member
Alexander
Join Date: Apr 2013
Posts: 2,363
Rep Power: 34 |
Use compile instead of interpretation
best regards |
|
May 14, 2018, 23:26 |
|
#5 |
New Member
Join Date: May 2018
Posts: 5
Rep Power: 8 |
||
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
Compile calcMassFlowC | aurore | OpenFOAM Programming & Development | 13 | March 23, 2018 08:43 |
long error when using make-install SU2_AD. | tomp1993 | SU2 Installation | 3 | March 17, 2018 07:25 |
Pressure outlet boundary condition | rolando | OpenFOAM Running, Solving & CFD | 62 | September 18, 2017 07:45 |
Compile problem | ivanyao | OpenFOAM Running, Solving & CFD | 1 | October 12, 2012 10:31 |
UDF: DEFINE_CG_MOTION for vertical jump motion of an electrode! | alban | Fluent UDF and Scheme Programming | 2 | June 8, 2010 19:54 |