|
[Sponsors] |
August 20, 2008, 18:05 |
UDF for transient inlet pressure
|
#1 |
Guest
Posts: n/a
|
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. |
|
August 21, 2008, 06:22 |
Re: UDF for transient inlet pressure
|
#2 |
Guest
Posts: n/a
|
If C you cannot use: if(0<=t<=2)
So expand it to: if(0<=t && t<=2) |
|
August 21, 2008, 06:22 |
Re: UDF for transient inlet pressure
|
#3 |
Guest
Posts: n/a
|
if (2<=5)
You can omit this, because it is always true. |
|
August 22, 2008, 03:59 |
Re: UDF for transient inlet pressure
|
#4 |
Guest
Posts: n/a
|
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.
|
|
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
Pressure driven laminar flow simpleFoam pressure higher at the outlet than inlet | gabriel | OpenFOAM Running, Solving & CFD | 16 | September 30, 2009 18:20 |
Transient inlet condition? | empirer2002 | CFX | 2 | June 4, 2007 15:18 |
Transient Flow, Transient Pressure in Work Bench | Erich | CFX | 1 | May 8, 2007 11:55 |
Transient Velocity Inlet | kapel | OpenFOAM Running, Solving & CFD | 3 | June 6, 2006 10:03 |
UDF for transient inlet velocity | sharath | FLUENT | 2 | September 13, 2004 23:37 |