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

Problem in Parallel UDF

Register Blogs Community New Posts Updated Threads Search

 
 
LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
Old   June 13, 2008, 11:28
Default Problem in Parallel UDF
  #1
Giacomo de Renzi
Guest
 
Posts: n/a
Hello, I've a problem using UDF with Parallel Computing: the main part of the UDF is a DEFINE EXECUTE AT END macro that calculates the average temperature on a face. In Serial Computing it works, but in Parallel Computing (and I need it!!!) it doesn't work fine because the macro is read by all partitions, while the face belongs to only one partition, how can I select the partition that is involved in the macro??

the UDF is attached below:

DEFINE_EXECUTE_AT_END(DEAE_T_rack_NO1_in) { real A_tot = 0.0; real ma_sum = 0.0; real T_sum = 0.0;

step = CURRENT_TIMESTEP; current_time = CURRENT_TIME; if (current_time > step) { Domain *d = Get_Domain(1);

real A[ND_ND]; Thread *t; face_t f; int id=62 ; /* ZONE ID RACK-NO1-IN */ t= Lookup_Thread(d,id);

begin_f_loop(f,t) { F_AREA(A,f,t); T_sum = T_sum + (F_T(f,t) * NV_MAG(A)); ma_sum = ma_sum + NV_MAG(A); } end_f_loop(f,t)

T_rack_NO1_in=T_sum/ma_sum; RP_Set_Real("controllo_no1",T_rack_NO1_in); } else {

T_rack_NO1_in = t_init; RP_Set_Real("controllo_no1",T_rack_NO1_in);

}

printf("T_rack_NO1_in: %g\n", T_rack_NO1_in); }

thank You, I hope someone could help me.. Giacomo de Renzi
  Reply With Quote

 


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
Parallel UDF problem Lindsay FLUENT 4 June 20, 2016 09:37
Parallel UDF Problem Dimitris Fluent UDF and Scheme Programming 7 September 20, 2013 01:51
parallel problem siyu Siemens 6 March 6, 2009 23:38
parallel problem rui Siemens 2 July 31, 2007 13:23
parallel UDF problem kerem FLUENT 2 June 20, 2006 06:56


All times are GMT -4. The time now is 10:16.