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

pressure boundary condition

Register Blogs Members List Search Today's Posts Mark Forums Read

Reply
 
LinkBack Thread Tools Display Modes
Old   February 20, 2004, 07:11
Default pressure boundary condition
  #1
wim vos
Guest
 
Posts: n/a
hello, i'm using a 3D model of a nose and i want a time dependent pressure in my troath (constant over all the surface but changing in time). i tried to wright a c-file for a user-defined function but when i compile it i get this error message :

************************************************** *

cpp -IC:\FLUENT.INC\fluent6.1.22/src -IC:\FLUENT.INC\fluent6.1.22/cortex/src -IC:\FLUENT.INC\fluent6.1.22/client/src -IC:\FLUENT.INC\fluent6.1.22/multiport/src -I. -DUDFCONFIG_H="<udfconfig.h>" C:\wim\unsteady\sniffing1.c Error: C:\FLUENT.INC\fluent6.1.22/src/dpm.h: line 855: parse error.

************************************************** *

i hope someone could give me an advise for this thanks WIm

i include my c-file too

************************************************** *

#include "udf.h"

DEFINE_PROFIL(outlet_snif, thread, nv)

face_t f; real t = RP_Get_Real("flow-time");

begin_f_loop (f,thread) {

F_PROFILE(f,thread,nv) = 61.03 * t^5 - 106.7 * t^4 + 67.71 * t^3 - 19.72 * t^2 + 2.673 * t - 0.1366 ; } end_f_loop (f,thread) } ************************************************** *
  Reply With Quote

Old   February 20, 2004, 07:34
Default Re: pressure boundary condition
  #2
thomas
Guest
 
Posts: n/a
Hi, I do not know if it is an error when you copy/past your c-file in the window but you have a parse error due to your brackets {}. You forgot to open the brackets ' { ' after your DEFINE_PROFIL(outlet_snif, thread, nv) declaration. Here is the correction

#include "udf.h"

DEFINE_PROFIL(outlet_snif, thread, nv) { face_t f; real t = RP_Get_Real("flow-time");

begin_f_loop (f,thread) {

F_PROFILE(f,thread,nv) = 61.03 * t^5 - 106.7 * t^4 + 67.71 * t^3 - 19.72 * t^2 + 2.673 * t - 0.1366 ; } end_f_loop (f,thread) } ************************************************** *

Hope it is that you were looking for. Cheers thomas

  Reply With Quote

Old   February 20, 2004, 08:23
Default Re: pressure boundary condition
  #3
Anon
Guest
 
Posts: n/a
You missing an 'E' from your macro definition below,

DEFINE_PROFIL(outlet_snif, thread, nv)

^ It should read

DEFINE_PROFILE(outlet_snif, thread, nv)
  Reply With Quote

Old   February 20, 2004, 08:23
Default Re: pressure boundary condition
  #4
wim vos
Guest
 
Posts: n/a
no, that was not the problem, the bracker disappeared while copy-pasting. somebody else has an idea? thanks anyway wim
  Reply With Quote

Old   February 20, 2004, 08:52
Default Re: pressure boundary condition
  #5
Doctor Love
Guest
 
Posts: n/a
Hello, The command t^n does not exist in C Language. try pow(t,n). Also if you had compiled your c file instead of interpreting you would have seen the error message referring to t^n. The Doc
  Reply With Quote

Old   February 20, 2004, 09:14
Default Re: pressure boundary condition
  #6
wim vos
Guest
 
Posts: n/a
thanks again for the advise, but i still get the same error message. wim
  Reply With Quote

Old   February 20, 2004, 09:56
Default Re: pressure boundary condition
  #7
Doctor Love
Guest
 
Posts: n/a
Okay i do not what you do or if you gave us the right part of your UDF but I sucessfuly interpret or compile your UDF.

Interprete: cpp -I/usr/local/Fluent.Inc/release/fluent6.1.22/src -I/usr/local/Fluent.Inc/release/fluent6.1.22/cortex/src -I/usr/local/Fluent.Inc/release/fluent6.1.22/client/src -I/usr/local/Fluent.Inc/release/fluent6.1.22/multiport/src -I. -DUDFCONFIG_H="<udfconfig.h>" /.automount/portos/root/home/stag3/test.c

************************************************** *** #include "udf.h"

DEFINE_PROFILE(outlet_snif, thread, nv) { face_t f; real t = RP_Get_Real("flow-time");

begin_f_loop (f,thread) {

F_PROFILE(f,thread,nv) = 61.03 * pow(t,5) - 106.7 * pow(t,4) + 67.71 * pow(t,3) - 19.72 * pow(t,2) + 2.673 * t - 0.1366 ; } end_f_loop (f,thread) } ************************************************** ***

  Reply With Quote

Old   February 22, 2004, 12:12
Default Re: pressure boundary condition
  #8
ccc
Guest
 
Posts: n/a
hi wim vos,

Doctor Love is right. I also have compiled and interpreted your udf and both worked well. Maybe you should reinstall fluent to fix the problem.

good luck.
  Reply With Quote

Old   February 23, 2004, 05:24
Default Re: pressure boundary condition
  #9
wim vos
Guest
 
Posts: n/a
thank u all guys, today it is working, strange things those pc's wim
  Reply With Quote

Reply

Thread Tools
Display Modes

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 On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Wind turbine simulation Saturn CFX 45 February 8, 2016 05:42
Pressure boundary condition C-H Kuo Main CFD Forum 11 September 17, 2015 11:41
mixed inflow/outflow downstream boundary condition question peob OpenFOAM Running, Solving & CFD 2 August 14, 2014 09:07
Water subcooled boiling Attesz CFX 7 January 5, 2013 04:32
Pressure Boundary condition abishek FLUENT 1 July 28, 2008 08:14


All times are GMT -4. The time now is 09:40.