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

UDF for inlet velocity alongwith UDF for properties

Register Blogs Community New Posts Updated Threads Search

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   February 1, 2018, 09:17
Default UDF for inlet velocity alongwith UDF for properties
  #1
New Member
 
Akshayy Tiwari
Join Date: Apr 2017
Location: Allahabad, India
Posts: 2
Rep Power: 0
akshayy224 is on a distinguished road
Hello,
I want to use velocity UDF alongwith UDF for temperature dependent thermal conductivity and viscosity. For that I've created following UDF:

/* UDF for specifying inlet velocity , nanofluid thermal conductivity and viscosity */

#include "udf.h"
#define Br 0.1
DEFINE_PROPERTY(cell_conductivity,cell,thread)
{
real ktc;
real temp = C_T(cell,thread);
ktc=0.6+38.82*(pow(temp,1.2321));
return ktc;
}

DEFINE_PROPERTY(cell_viscosity,cell,thread)
{
real mu;
real temp = C_T(cell,thread);
mu=-0.155-2.1754*0.01*(pow(temp,-2));
return mu;
}

DEFINE_PROFILE(inlet_x_velocity,thread,position)
{
face_t f;
real temp = C_T(cell,thread);

begin_f_loop(f,thread)
{
F_PROFILE(f,thread,position) = pow(0.5035*Br*(pow(-0.155-2.1754*0.01*(pow(temp,-2)),-1)),0.5);
}
end_f_loop(f,thread)
}

It is showing an Error: line 24:cell: undeclared variable i.e. in real temp = C_T(cell,thread);
I'm new in writing UDF and so I can't understand what FLUENT is indicating.
I'd be grateful if someone help me by rectifying it.
Thanks
akshayy224 is offline   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
Velocity boundary condtion UDF help victoryv Fluent UDF and Scheme Programming 2 October 9, 2012 15:27
UDF velocity and temperature Raj FLUENT 3 February 1, 2009 18:29
Variables Definition in CFX Solver 5.6 R P CFX 2 October 26, 2004 02:13
Terrible Mistake In Fluid Dynamics History Abhi Main CFD Forum 12 July 8, 2002 09:11
UDF component in Cyliderical Velocity? Hongchan Kim FLUENT 3 April 24, 2001 12:20


All times are GMT -4. The time now is 03:04.