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

Loop over define_profile

Register Blogs Community New Posts Updated Threads Search

 
 
LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
Old   March 13, 2014, 04:48
Default Loop over define_profile
  #1
New Member
 
Lukasz
Join Date: Feb 2014
Posts: 5
Rep Power: 12
lukasz0004 is on a distinguished road
Hello,

I'd like to do for loop over dozens of faces in order to specify heat flux profile on each of them. This heat flux profile has different mean value for each face.

How should I do for loop over DEFINE_PROFILE?

for ( i = 1 ; i<=30 ; i++)
{
DEFINE_PROFILE(hf_profile_i, ft, var) - I don't know how to treat hf_profile_i that index "i" will be recognized in loop
{
float x[3];
float z;
face_t f;
float q0 = q[i];

begin_f_loop(f,ft)
{
F_CENTROID(x,f,ft);
z = x[2];
F_PROFILE(f,ft,var)= q0*sin(((z/0.02)*M_PI);
}
end_f_loop(f,ft)
}
}

Later in journal file I will do loop and prescribe heat flux profiles to adequate faces.

Thanks you for any help.
lukasz0004 is offline   Reply With Quote

 

Tags
heat flux udf, loop over define_profile


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
[Gmsh] Problem with Gmsh nishant_hull OpenFOAM Meshing & Mesh Conversion 23 August 5, 2015 02:09
Optimizing the solution of tridiagonal linear systems CCKM Main CFD Forum 14 March 14, 2012 07:40
Possible to loop a face thread inside a cell thread loop? MarcusW FLUENT 3 March 7, 2012 06:32
[CAD formats] my stl surface is seen as just a line rcastilla OpenFOAM Meshing & Mesh Conversion 2 January 6, 2010 01:30
NACA0012 geometry/design software needed Franny Main CFD Forum 13 July 7, 2007 15:57


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