# DEFINE_PROFILE help!!

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

 June 30, 2011, 03:21 DEFINE_PROFILE help!! #1 New Member   Marlom Ramos Join Date: Jun 2011 Posts: 2 Rep Power: 0 Sponsored Links Hi! A I need that a DEFINE_PROFILE have the array value. How I do this? For example: my array is : real A[]={1,2,3,3,2,1} and this I need that be my profile of velocity. Help me please.!!

 June 30, 2011, 12:44 #2 Senior Member   Micael Boulet Join Date: Mar 2009 Location: Quebec, Canada Posts: 117 Rep Power: 11 Your DEFINE_PROFILE need to define velocity for a single face of a control volume. You should compute the value for each face using a loop. Check the UDF manual about DEFINE_PROFILE, there is example.

June 30, 2011, 14:17
#3
New Member

Marlom Ramos
Join Date: Jun 2011
Posts: 2
Rep Power: 0
Quote:
 Originally Posted by Micael Your DEFINE_PROFILE need to define velocity for a single face of a control volume. You should compute the value for each face using a loop. Check the UDF manual about DEFINE_PROFILE, there is example.

---------------------------------------------------

#include "udf.h"

{
real x[ND_ND];
real y;
face_t f;
real A[]={1,2,3,4,5};

{

}

}
---------------------------------------------------

This Correct? If the response is NOT. Any idea how to do?

NOTE: the mesh of the boundary have 5 face, by I use A of dimension 5.

Thanks you

 July 5, 2011, 17:19 #4 Senior Member   Micael Boulet Join Date: Mar 2009 Location: Quebec, Canada Posts: 117 Rep Power: 11 No, it won't works. Also, F_CENTROID really does nothing. F_PROFILE should be given a single scalar value, not an array like your code try to do. If there is 5 faces on your boundary, then the loop should loops 5 times. It is likely that the loop loops in an ordered way on the boundary, going from one extremity to the other. So this is likely to works, but it is a bit weird and I would recommand. Anyway, that could help you to understand. Code: ``` #include "udf.h" DEFINE_PROFILE(y_velocity,thread,index) { face_t f; real A[]={1,2,3,4,5}; int i = 0; begin_f_loop(f,thread) { F_PROFILE(f,thread,index)=A[i]; i++; } end_f_loop(f,thread) }```

 Thread Tools Display Modes Linear Mode

 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 OffTrackbacks are On Pingbacks are On Refbacks are On Forum Rules