|
[Sponsors] |
December 16, 2003, 04:28 |
UDF interpreted
|
#1 |
Guest
Posts: n/a
|
Hello, everybody
I have tried to compile the following source code (as interpreted code) in Fluent 6.0. It is given as an example UDF by Fluent but the statement t0 = t->t0; is not recognised by the compiler. The comment it gives is: "line 25: structure reference not implemented". Please, give me some help. Thank you. Johannes Soulis Greece #include "udf.h" DEFINE_PROFILE(coupled_uds, t, position) { real C1_COORD[ND_ND]; real C0_COORD[ND_ND]; real F_COORD[ND_ND]; real x0[ND_ND],x1[ND_ND],Area[ND_ND],DIFF0,DIFF1,y; real Coef0,Coef1; real e_x0[ND_ND],e_x1[ND_ND]; cell_t c0; cell_t c1; Thread *t0; Thread *t1; face_t f; real A0,A1,dx0,dx1; begin_f_loop(f, t) { c0 = F_C0(f, t); c1 = F_C1(f, t); t0 = t->t0; t1 = t->t1; C_CENTROID(C0_COORD, c0, t0); C_CENTROID(C1_COORD, c1, t1); F_CENTROID(F_COORD, f, t); NV_VV(x0, =, F_COORD, -, C0_COORD); dx0 = NV_MAG(x0); NV_VV(x1, =, F_COORD, -, C1_COORD); dx1 = NV_MAG(x1); NV_VS(e_x0, =, x0, /, dx0); /* e_x0 is the unit vector */ NV_VS(e_x1, =, x1, /, dx1); /* e_x1 is the unit vector */ F_AREA(Area, f, t); Coef0 = (dx0 * NV_MAG(Area))/NV_DOT(Area,e_x0); Coef1 = (dx1 * NV_MAG(Area))/NV_DOT(Area,e_x1); Coef0 = sqrt(Coef0*Coef0); Coef1 = sqrt(Coef1*Coef1); DIFF0 = C_UDSI_DIFF(c0,t0,0); DIFF1 = C_UDSI_DIFF(c1,t1,0); A0 = DIFF0/Coef0; A1 = DIFF1/Coef1; y = (A0 * C_UDSI(c0,t0,0) + A1 * C_UDSI(c1,t1,0)) / (A0 + A1); F_PROFILE(f, t, position) = y; } end_f_loop(f, t) } |
|
December 16, 2003, 05:49 |
Re: UDF interpreted
|
#2 |
Guest
Posts: n/a
|
as I remember, the "structure" date type can not be used in interpreted udf. Hope it helps.
Regards Emma |
|
December 16, 2003, 09:03 |
Re: UDF interpreted
|
#3 |
Guest
Posts: n/a
|
If you use such a kind of istruction, you have to use compiled UDF.
Hi ap |
|
December 21, 2003, 06:57 |
Re: UDF interpreted
|
#4 |
Guest
Posts: n/a
|
yes ap had answered to your questions.
When you are using interpreted UDF's you cannt use the by accessing memory. |
|
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
Interpreted UDF | Bikash | FLUENT | 10 | December 3, 2019 00:52 |
A Problem of Fluent Interpreted UDF: parse error | knight | Fluent UDF and Scheme Programming | 25 | August 16, 2018 10:26 |
Interpreted UDF in parallel | David Chabot | Fluent UDF and Scheme Programming | 8 | May 30, 2012 03:18 |
compiled or interpreted udf | Aireen | FLUENT | 11 | August 25, 2005 00:54 |
error of Interpreted udf | Zhang Junmei | FLUENT | 6 | December 12, 2001 08:03 |