CFD Online Discussion Forums

CFD Online Discussion Forums (https://www.cfd-online.com/Forums/)
-   Fluent UDF and Scheme Programming (https://www.cfd-online.com/Forums/fluent-udf/)
-   -   udf problem about wall heat flux (https://www.cfd-online.com/Forums/fluent-udf/43879-udf-problem-about-wall-heat-flux.html)

stepanie February 23, 2007 16:12

udf problem about wall heat flux
 
Hi, I don't know how to define uniform heat flux of wall changing with time. Here is my code. But there is error when I start to iteration. If I should use DEFINE_HEAT_FLUX? Is there an simple example for this micro? Thanks!

#include "udf.h"

DEFINE_PROFILE(fluxflow, thread, position) { real tim;

face_t f; cell_t c; Thread *t;

begin_f_loop(f, thread) { tim=RP_Get_Real("flow-time");

F_PROFILE(f, thread, position)=10tim } end_f_loop(f, thread) }


shanti February 23, 2007 17:06

Re: udf problem about wall heat flux
 
I think there are syntax errors. There is no semicolon at the end of F_PROFILE statement.

F_PROFILE(f, thread, position) = 10* time;

try this..if its working or not..

shanti

stepanie February 23, 2007 18:02

Re: udf problem about wall heat flux
 
Hi shanti,

Thanks for your suggestion, I will try later when I finish my class now.


stepanie February 23, 2007 19:45

Re: udf problem about wall heat flux
 
Hi,

I have modified the F_PROFILE(f, thread, position)=10*time; Now it can pass interperted. But when I initialize and run, there is error message.

I want to give a heat flux changing with time into the sidewall of a solid cylinder. How to define it? Which macro should I use? Thanks.

chip-exec: fluxflow: argument 1: incorrect type (36): int expectedchip-exec: fluxflow: argument 2: incorrect type (5): pointer expectedchip-exec: fluxflow: argument 3: incorrect type (0): int expectedchip-exec: fluxflow: argument 4: incorrect type (0): pointer expectedchip-exec: fluxflow: argument 5: incorrect type (0): pointer expectedchip-exec: fluxflow: argument 6: incorrect type (0): pointer expected


shanti February 23, 2007 19:54

Re: udf problem about wall heat flux
 
Hi

do you want the flux value to be 10*time?

shanti

stepanie February 23, 2007 19:57

Re: udf problem about wall heat flux
 
Yes. I want the flux is the function of time, and the time is from 0~120 sec.


shanti February 23, 2007 19:59

Re: udf problem about wall heat flux
 
Can you give the exact relation between the heat flux and the time?

stepanie February 23, 2007 20:06

Re: udf problem about wall heat flux
 
flux=10*time;

That is when time=0, flux=0;

time=1, flux=10;

time=2, flux=20;

. .

. .

. .

time=120,flux=1200;


shanti February 23, 2007 20:09

Re: udf problem about wall heat flux
 
sorry, I have no clue about the error. I will lwt you know if i can figure it out..

shanti

stepanie February 23, 2007 20:13

Re: udf problem about wall heat flux
 
Thanks. I think should use DEFINE_HEAT_FLUX to give the condition of wall flux. But I don't konw how to use DEFINE_HEAT_FLUX....

prasanth February 26, 2007 05:25

Re: udf problem about wall heat flux
 
hi stepaine,

why cant you go to the require reference in the fluent documentation using index option.

regarding your query for DEFINE_HEAT_FLUX, please refer section no. 4.3.8 in fluent documentation (6.2. version).

asal August 5, 2015 00:09

Hi!

I have the same problem when I run a case with a UDF. I receive this error:

this the UDF:

#include "udf.h"

DEFINE_DIFFUSIVITY(mean_age_diff,c,t,i)
{
return C_R(c,t) * 2.88e-05 + C_MU_EFF(c,t) / 0.7;
}




and this is the error:

ip-exec: mean_age_diff: argument 4:
incorrect type (0): int expectedchip-exec: mean_age_diff: argument 3: incorrect type (5): pointer expectedchip-exec: mean_age_diff: argument 4:
incorrect type (0): int expectedchip-exec: mean_age_diff: argument 3: incorrect type (5): pointer expectedchip-exec: mean_age_diff: argument 4:
incorrect type (490510): int expectedchip-exec: mean_age_diff: argument 3: incorrect type (5): pointer expectedchip-exec: mean_age_diff: argument 4:
incorrect type (0): int expectedchip-exec: mean_age_diff: argument 3: incorrect type (5): pointer expectedchip-exec: mean_age_diff: argument 4:
incorrect type (0): int expectedchip-exec: mean_age_diff: argument 3: incorrect type (5): pointer expectedchip-exec: mean_age_diff: argument 4:
incorrect type (0): int expectedchip-exec: mean_age_diff: argument 3: incorrect type (5): pointer expectedchip-exec: mean_age_diff: argument 4:
incorrect type (0): int expectedchip-exec: mean_age_diff: argument 3: incorrect type (5): pointer expectedch 40047 2.4

Is there any solution to fix this?
Thanks.


All times are GMT -4. The time now is 15:39.