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

user defined functions

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

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   August 20, 2012, 04:40
Default user defined functions
  #1
New Member
 
Join Date: Aug 2012
Posts: 10
Rep Power: 13
mike2 is on a distinguished road
hi to everyone. i have a problem, i have to create an user defined function for an heat flow along z axis in a 3D geometry.the equation of the flow is a bell shape (see the image).the code that i wrote is :
Code:
DEFINE_PROFILE(flusso_radiativo, thread, position)
{
real x[ND_ND]; /* this will hold the position vector */
real z;
face_t f;
begin_f_loop(f, thread)
{
F_CENTROID(x,f,thread);
z = x[2];
F_PROFILE(f, thread, position) = 149529572.*1./(sqrt((2.*3.141593*(0.051*0.051))))*exp((-(z-0.2)*(z-0.2))/(2.*(0.051*0.051)));
}
end_f_loop(f, thread)
}
is it well written?thanks for help
Attached Images
File Type: jpg image.jpg (26.2 KB, 4 views)
mike2 is offline   Reply With Quote

Reply

Thread Tools Search this Thread
Search this Thread:

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


Similar Threads
Thread Thread Starter Forum Replies Last Post
USER DEFINED SCALARS yann Phoenics 6 November 14, 2013 09:46
Wall Treatment of User defined Turbulence Model Yang Chung FLUENT 0 August 23, 2008 12:31
User Defined Scalars - Returning Values Carlos V. FLUENT 0 April 19, 2006 19:18
Source term for user defined scalars Mech.eng. Siemens 0 March 16, 2006 07:15
User defined functions Tuomas Koiranen FLUENT 2 December 29, 1999 08:41


All times are GMT -4. The time now is 19:49.