|
[Sponsors] |
March 13, 2014, 05:48 |
Loop over define_profile
|
#1 |
New Member
Lukasz
Join Date: Feb 2014
Posts: 5
Rep Power: 12 |
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. |
|
March 14, 2014, 05:10 |
|
#2 |
Senior Member
Join Date: Nov 2013
Posts: 1,965
Rep Power: 27 |
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. |
|
March 17, 2014, 04:28 |
|
#3 |
New Member
Lukasz
Join Date: Feb 2014
Posts: 5
Rep Power: 12 |
I'd like to have both. It means 30 different profiles of heat flux on 30 different faces. Indexes starts from 4 to 33.
|
|
March 17, 2014, 04:43 |
|
#4 |
Senior Member
Join Date: Nov 2013
Posts: 1,965
Rep Power: 27 |
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? |
|
March 17, 2014, 05:08 |
|
#5 |
New Member
Lukasz
Join Date: Feb 2014
Posts: 5
Rep Power: 12 |
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
|
|
March 20, 2014, 08:14 |
|
#6 |
Senior Member
Join Date: Nov 2013
Posts: 1,965
Rep Power: 27 |
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. |
|
Tags |
heat flux udf, loop over define_profile |
|
|
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 |