|
[Sponsors] |
May 28, 2013, 19:40 |
Urgent UDF Problem ....
|
#1 |
New Member
angelicapeygo
Join Date: May 2013
Posts: 7
Rep Power: 13 |
Friends,
I have a proble with my UDF. There is no problem about compilation and interpreting but I can not apply my udf to the boundaries. I get error message: Error: cx-set-real-entry: wta[2] (float) Error Object : ((constant .1) (profile """""") Could you please help me about the case? my UDF is like that: #include "udf.h" #define Tm 938 Domain *d; DEFINE_PROFILE(wall_temp, thread, nv) { real T2solid=0.; real T2liquid=0.; real temp=0.; real tmax=0.; real tmin=0.; real y=0.; Thread *t; cell_t c; /* Loop over all cell threads in the domain */ thread_loop_c(t,d) { /* Compute max, min, volume-averaged temperature */ /* Loop over all cells */ begin_c_loop(c,t) { temp = C_T(c,t); /* get cell temperature */ if (temp < tmin || tmin == 0.) tmin = temp; if (temp > tmax || tmax == 0.) tmax = temp; } end_c_loop(c,t) printf("\n Tmin = %g Tmax = %g",tmin,tmax); T2solid=Tm+100.0*y ; T2liquid=Tm+40.0*y ; begin_c_loop(c,t) { temp = C_T(c,t); } end_c_loop(c,t) } } thanks alot.... |
|
May 29, 2013, 07:11 |
|
#3 |
New Member
angelicapeygo
Join Date: May 2013
Posts: 7
Rep Power: 13 |
what do you advise me to do? I am new with the UDFs ..
|
|
May 29, 2013, 07:29 |
|
#5 |
New Member
angelicapeygo
Join Date: May 2013
Posts: 7
Rep Power: 13 |
I changed it to DEFINE_ON_DEMAND but the result is same. what can be the other reason :S
|
|
May 29, 2013, 07:49 |
|
#7 |
New Member
angelicapeygo
Join Date: May 2013
Posts: 7
Rep Power: 13 |
I realized it and add it but nothing changed.
/************************************************** ********************* vprofile.c UDF for specifying steady-state temperature profile boundary condition ************************************************** **********************/ #include "udf.h" #define Tm 938 Domain *d; DEFINE_ON_DEMAND(wall_temp) { real T2solid=0.; real T2liquid=0.; real temp=0.; real tmax=0.; real tmin=0.; real y=0.; Thread *t; cell_t c; d = Get_Domain(1); /* Get the domain using Fluent utility */ /* Loop over all cell threads in the domain */ thread_loop_c(t,d) { /* Compute max, min, volume-averaged temperature */ /* Loop over all cells */ begin_c_loop(c,t) { temp = C_T(c,t); /* get cell temperature */ if (temp < tmin || tmin == 0.) tmin = temp; if (temp > tmax || tmax == 0.) tmax = temp; } end_c_loop(c,t) printf("\n Tmin = %g Tmax = %g",tmin,tmax); T2solid=Tm+100.0*y ; T2liquid=Tm+40.0*y ; begin_c_loop(c,t) { temp = C_T(c,t); } end_c_loop(c,t) } } |
|
May 29, 2013, 08:01 |
|
#9 |
New Member
angelicapeygo
Join Date: May 2013
Posts: 7
Rep Power: 13 |
it says:
CX_message not found. Do you know the reason? thanks alot. |
|
May 29, 2013, 08:11 |
|
#11 |
New Member
angelicapeygo
Join Date: May 2013
Posts: 7
Rep Power: 13 |
it still does not work ..
do you think the other parts of my UDF is correct? thanks alot. |
|
May 29, 2013, 10:29 |
|
#13 |
Member
Jim Knopf
Join Date: Dec 2010
Posts: 60
Rep Power: 15 |
What is the current error?
Printing is done via: Code:
double var = 0.; Message("text %g",var); Code:
#define TM 938 Code:
static const double var = 4.5; Greetz Jim |
|
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
UDF Problem | ozgur | Fluent UDF and Scheme Programming | 18 | January 17, 2016 15:40 |
Pressure profile UDF for unsteady-state problem? | Mohsen Keshavarzian | FLUENT | 2 | August 20, 2008 05:22 |
parallel UDF problem | kerem | FLUENT | 2 | June 20, 2006 07:56 |
Switch problem! using 2 custom udf laws at the same time | HP | FLUENT | 0 | September 15, 2004 10:48 |
UDF variables F1, y / problem with UDF | Fabian | FLUENT | 6 | June 2, 2003 11:22 |