|
[Sponsors] |
February 20, 2004, 07:11 |
pressure boundary condition
|
#1 |
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) } ************************************************** * |
|
February 20, 2004, 07:34 |
Re: pressure boundary condition
|
#2 |
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 |
|
February 20, 2004, 08:23 |
Re: pressure boundary condition
|
#3 |
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) |
|
February 20, 2004, 08:23 |
Re: pressure boundary condition
|
#4 |
Guest
Posts: n/a
|
no, that was not the problem, the bracker disappeared while copy-pasting. somebody else has an idea? thanks anyway wim
|
|
February 20, 2004, 08:52 |
Re: pressure boundary condition
|
#5 |
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
|
|
February 20, 2004, 09:14 |
Re: pressure boundary condition
|
#6 |
Guest
Posts: n/a
|
thanks again for the advise, but i still get the same error message. wim
|
|
February 20, 2004, 09:56 |
Re: pressure boundary condition
|
#7 |
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) } ************************************************** *** |
|
February 22, 2004, 12:12 |
Re: pressure boundary condition
|
#8 |
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. |
|
February 23, 2004, 05:24 |
Re: pressure boundary condition
|
#9 |
Guest
Posts: n/a
|
thank u all guys, today it is working, strange things those pc's wim
|
|
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
Wind turbine simulation | Saturn | CFX | 60 | July 17, 2024 06:45 |
mixed inflow/outflow downstream boundary condition question | peob | OpenFOAM Running, Solving & CFD | 3 | February 3, 2017 11:54 |
Pressure boundary condition | C-H Kuo | Main CFD Forum | 18 | September 16, 2016 04:19 |
Water subcooled boiling | Attesz | CFX | 7 | January 5, 2013 04:32 |
Pressure Boundary condition | abishek | FLUENT | 1 | July 28, 2008 09:14 |