CFD Online Logo CFD Online URL
Home > Forums > FLUENT

user defined functions

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

LinkBack Thread Tools Display Modes
Old   August 20, 2012, 03:40
Default user defined functions
New Member
Join Date: Aug 2012
Posts: 10
Rep Power: 7
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 :
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)
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


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
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 11:31
User Defined Scalars - Returning Values Carlos V. FLUENT 0 April 19, 2006 18: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 17:07.