CFD Online Discussion Forums

CFD Online Discussion Forums (https://www.cfd-online.com/Forums/)
-   FLUENT (https://www.cfd-online.com/Forums/fluent/)
-   -   3D parabolic equation for fluid flow (https://www.cfd-online.com/Forums/fluent/43425-3d-parabolic-equation-fluid-flow.html)

Nelly January 22, 2007 00:51

3D parabolic equation for fluid flow
 
Hi, I am doing a fluid flow stimulation through a tube 15mm wide. The flow is laminar with a parabolic velocity profile. The maximum velocity is 0.1374m. I need to write a udf for the above 3D parabolic velocity profile. Was wondering is the below codes are correct as fluent do not seem to be able to interprete it. Not sure if the equations are correct. Thanks in advance if anyone could help..

#include "udf.h"

DEFINE_PROFILE(inlet_y_velocity,thread,position) {

real y[ND_ND];

real x,z;

face_t f;

begin_f_loop(f,thread)

{

F_CENTROID(y,f,thread);

x=y[0];

z=y[2];

F_PROFILE(f,thread,position)=.1374*(x*x+z*z)/(.0075*.0075)*.1374*2;

}

end_f_loop(f,thread);

}

Sing January 22, 2007 02:24

Re: 3D parabolic equation for fluid flow
 
What's your error when interpreting the udf?

Nelly January 22, 2007 05:19

Re: 3D parabolic equation for fluid flow
 
Error: /scratch_o2k/public/bel/ss1.c: line 2: syntax error

Sujith January 22, 2007 14:03

Re: 3D parabolic equation for fluid flow
 
If you are getting this error in linux this may be due to a stray ^m character, by the editor in windows. run the command : dos2unix <filename.c> /* this will clean the file for linux*/ and then interpret in Fluent.


All times are GMT -4. The time now is 02:10.