CFD Online Logo CFD Online URL
www.cfd-online.com
[Sponsors]
Home > Forums > Software User Forums > ANSYS > FLUENT

UDF for transient inlet pressure

Register Blogs Community New Posts Updated Threads Search

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   August 20, 2008, 18:05
Default UDF for transient inlet pressure
  #1
Mohsen Keshavarzian
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.

  Reply With Quote

Old   August 21, 2008, 06:22
Default Re: UDF for transient inlet pressure
  #2
Rok Sibanc
Guest
 
Posts: n/a
If C you cannot use: if(0<=t<=2)

So expand it to: if(0<=t && t<=2)
  Reply With Quote

Old   August 21, 2008, 06:22
Default Re: UDF for transient inlet pressure
  #3
Rok Sibanc
Guest
 
Posts: n/a
if (2<=5)

You can omit this, because it is always true.
  Reply With Quote

Old   August 22, 2008, 03:59
Default Re: UDF for transient inlet pressure
  #4
Mohsen Keshavarzian
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.
  Reply With Quote

Reply


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are On


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


All times are GMT -4. The time now is 19:17.