CFD Online Logo CFD Online URL
www.cfd-online.com
[Sponsors]
Home > Forums > Fluent UDF and Scheme Programming

Velocity(inlet Boundary)

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

Reply
 
LinkBack Thread Tools Display Modes
Old   July 18, 2012, 05:26
Default Velocity(inlet Boundary)
  #1
New Member
 
Amir sadeghi pour marvi
Join Date: Dec 2011
Posts: 25
Rep Power: 5
Prince of Persia is on a distinguished road
Hi everyone;

I simulated 3D water tank.
Changes in the Y direction is not important.
when i add the Velocity.c to fluent this error appear:

line 20: i: undeclared variable

#include "udf.h"
#define ZMIN 0.0
#define ZMAX 0.8
#define UH 0.063
#define UMEAN 0.15625
#define P 0.21
DEFINE_PROFILE(x_velocity,t,i)
{
real z, x[ND_ND], h;
face_t f;

h=ZMAX-ZMIN;

begin_f_loop(f,t)
{
F_CENTROID(x,f,t);
z=x[1];

if (z<=0.4)
F_PROFILE(f,t,i)=UH*pow(z/0.1,P);
else
F_PROFILE(f,t,i)=UMEAN;

}
end_f_loop(f,t)
}


what is problem?

Last edited by Prince of Persia; July 18, 2012 at 06:47.
Prince of Persia is offline   Reply With Quote

Old   July 18, 2012, 07:58
Default
  #2
Senior Member
 
flotus1's Avatar
 
Alex
Join Date: Jun 2012
Location: Germany
Posts: 1,098
Rep Power: 19
flotus1 will become famous soon enoughflotus1 will become famous soon enough
I am pretty sure that the pow(x,y) function is a part of the math library.
Try adding #include "math.h" to the header.
flotus1 is offline   Reply With Quote

Old   July 18, 2012, 13:19
Default
  #3
akm
New Member
 
Join Date: Jan 2010
Location: United Kingdom
Posts: 27
Rep Power: 7
akm is on a distinguished road
udf.h takes care of including other file header files for math functions.

try defining the profile by:
Code:
begin_c_loop(c,t)
{
  C_CENTROID(x,c,t);
  ..
  ..
  F_PROFILE(c,t,i) = 
}
end_c_loop(c,t)
akm is offline   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
Implementation of boundary conditions for FVM Tom Main CFD Forum 7 August 26, 2014 05:58
RPM in Wind Turbine Pankaj CFX 9 November 23, 2009 05:05
CFX doesn't continue calculation... mactech001 CFX 6 November 15, 2009 22:25
Boundary conditions? Tom Main CFD Forum 0 November 5, 2002 02:54
Boundary Conditions Jan Ramboer Main CFD Forum 11 August 16, 1999 08:59


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