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

OSI UDF problem in FLUENT

Register Blogs Community New Posts Updated Threads Search

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   October 15, 2016, 14:40
Default OSI UDF problem in FLUENT
  #1
New Member
 
Siyeongju
Join Date: Sep 2016
Posts: 1
Rep Power: 0
tmxmfhr is on a distinguished road
Hello,

I added the new output parameter with OSI function in FLUENT.
However, no data showed up in Parameter Chart.

Would you mind letting me know how to deal with this problem?

/************************************************** ****
Oscillatory shear index
************************************************** ****/

#include "udf.h"
#include "math.h"
#include "storage.h"
#include "sg_udms.h"

#define domain_ID 1
#define zone_ID 7




/* Initialize the UDM value to zero in complete domain */
DEFINE_INIT(meminit,domain)
{
Thread *c_thread;
cell_t c;

thread_loop_c(c_thread,domain)
{
begin_c_loop(c, c_thread)
{
C_UDMI(c,c_thread,0)= 0;
C_UDMI(c,c_thread,1)= 0;
C_UDMI(c,c_thread,2)= 0;
C_UDMI(c,c_thread,3)= 0;
C_UDMI(c,c_thread,4)= 0;
}
end_c_loop(c, c_thread)
}
}

/* Calculate wall shear stress and store them in UDM */
DEFINE_EXECUTE_AT_END(OSI)
{
Domain *domain;
real area;
face_t f;
real A[ND_ND];
cell_t c, c0;
Thread *t,*t0, *c_thread;
real wallshear [ND_ND];

domain = Get_Domain(domain_ID);
t = Lookup_Thread(domain,zone_ID);

begin_f_loop(f, t)
{
F_AREA(A,f,t);
area = NV_MAG(A);
NV_V(wallshear,=,F_STORAGE_R_N3V(f,t, SV_WALL_SHEAR));
c0 = F_C0(f,t);
t0 = THREAD_T0(t);
C_UDMI(c0,t0,0) += NV_MAG(wallshear)/area;
C_UDMI(c0,t0,1) += -wallshear[0]/area;
C_UDMI(c0,t0,2) += -wallshear[1]/area;
C_UDMI(c0,t0,3) += -wallshear[2]/area;
C_UDMI(c0,t0,4) = (1.-sqrt(C_UDMI(c0,t0,1)*C_UDMI(c0,t0,1) + C_UDMI(c0,t0,2)*C_UDMI(c0,t0,2) + C_UDMI(c0,t0,3)*C_UDMI(c0,t0,3))/C_UDMI(c0,t0,0))/2;
}
end_f_loop(f,t)
}
tmxmfhr is offline   Reply With Quote

Reply

Tags
osi, udf


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
problem of running parallel Fluent on linux cluster ivanbuz FLUENT 15 September 23, 2017 20:12
UDF for 3d boundary conditions problem in fluent pawanh Fluent UDF and Scheme Programming 8 July 19, 2013 15:27
problem in using parallel process in fluent 14 aydinkabir88 FLUENT 1 July 10, 2013 03:00
problem with udf programming in fluent saranyasimi Main CFD Forum 0 December 1, 2009 13:19
fluent udf problem for 3d case srsahu Fluent UDF and Scheme Programming 0 July 28, 2009 08:25


All times are GMT -4. The time now is 01:06.