CFD Online Discussion Forums
(
)
-
FLUENT
(
)
- -
UDF for transient inlet pressure
(
)
Mohsen Keshavarzian
August 20, 2008 18:05
UDF for transient inlet pressure
Hello everybody I have used following udf for pressure inlet, but there is an error.
#include "udf.h" DEFINE_PROFILE(pressure_inlet, thread, position) { face_t f; real t = RP_Get_Real("flow-time"); begin_f_loop(f, thread) { if(0<=t<=2) F_PROFILE(f, thread, position) = t; else if (2<t<=5) F_PROFILE(f, thread, position) = t*t; } end_f_loop(f, thread) }
The error is:
cpp -I"C:\Fluent.Inc\fluent6.3.26/src" -I"C:\Fluent.Inc\fluent6.3.26/cortex/src" -I"C:\Fluent.Inc\fluent6.3.26/client/src" -I"C:\Fluent.Inc\fluent6.3.26/multiport/src" -I. -DUDFCONFIG_H="<udfconfig.h>" "C:\Documents and Settings\home\Desktop\mohsen\exam le\main.c"
please tell me what to do? thanks a lot.
Rok Sibanc
August 21, 2008 06:22
Re: UDF for transient inlet pressure
If C you cannot use: if(0<=t<=2)
So expand it to: if(0<=t && t<=2)
Rok Sibanc
August 21, 2008 06:22
Re: UDF for transient inlet pressure
if (2<=5)
You can omit this, because it is always true.
Mohsen Keshavarzian
August 22, 2008 03:59
Re: UDF for transient inlet pressure
Dear Rok I made the changes you have mentioned, but the error was the same. Then I used a simple transient UDF from fluent manual, but the error did not change. What should I do now? Thanks a lot.
All times are GMT -4. The time now is
12:25
.