|
[Sponsors] |
June 13, 2008, 11:28 |
Problem in Parallel UDF
|
#1 |
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 |
|
|
|
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 |