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

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   March 13, 2014, 05: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

Old   March 14, 2014, 05:10
Default
  #2
Senior Member
 
Join Date: Nov 2013
Posts: 1,965
Rep Power: 27
pakk will become famous soon enough
It is not clear to me what you are trying to do here.

Do you want to have 30 different profiles for heat fluxes? Or do you want one profile that covers 30 different faces? Please explain what your variable i indexes.
pakk is offline   Reply With Quote

Old   March 17, 2014, 04:28
Default
  #3
New Member
 
Lukasz
Join Date: Feb 2014
Posts: 5
Rep Power: 12
lukasz0004 is on a distinguished road
I'd like to have both. It means 30 different profiles of heat flux on 30 different faces. Indexes starts from 4 to 33.
lukasz0004 is offline   Reply With Quote

Old   March 17, 2014, 04:43
Default
  #4
Senior Member
 
Join Date: Nov 2013
Posts: 1,965
Rep Power: 27
pakk will become famous soon enough
It is still unclear what you want.

Do you want 900 different things? (900 = 30 x 30)
Or you do you want one profile that gives 30 faces each a different value?
pakk is offline   Reply With Quote

Old   March 17, 2014, 05:08
Default
  #5
New Member
 
Lukasz
Join Date: Feb 2014
Posts: 5
Rep Power: 12
lukasz0004 is on a distinguished road
I'd like to have one profile that gives different value on each face. For every profile q0 is unique (this is mean heat flux value). q[i] is defined as a matrix with mean values that corresponds to given face
lukasz0004 is offline   Reply With Quote

Old   March 20, 2014, 08:14
Default
  #6
Senior Member
 
Join Date: Nov 2013
Posts: 1,965
Rep Power: 27
pakk will become famous soon enough
If you would like to have one profile, then just define one profile.
There is absolutely no need to loop over anything.

Maybe you did not fully understand what a profile is, check it in the help.
pakk is offline   Reply With Quote

Reply

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


All times are GMT -4. The time now is 08:56.