How to get UDS on interior face?
Hi guys,
I want to get the UDS on a interior face. As the 'UDF manual' says, no value of UDS is stored on face. So I tried to find the value on adjacent cell. Here comes the questions: 1. First thing I should do is find the face thread of interior. Knowing the ID of interior, which domain should I look up into for the interior, when the interior is a interface between two different fluid zones? Will that make any difference? 2. After I find the interior face thread from one zone, are the values of adjacent cell on both sides available for me? Here is the UDF which I used. But I did not get any value return.:confused: /*Description:3 fluid zones (ID 17,19 and 18 from left to right);*/ /* 2 interior faces between 3 zones (ID 29,30 from left to right)*/ DEFINE_DIFFUSIVITY(myuds_diffusivity,c,t,i) { Thread *sr,*rl,*src,*rlc; int a; real dif; cell_t c0; face_t f; real tall,tavesr,taverl; Domain *domain0,*domain1; domain0=Get_Domain(17); domain1=Get_Domain(18); sr=Lookup_Thread(domain0,29); /*LOOKUP THREAD 29 IN ZOON 17*/ rl=Lookup_Thread(domain1,30); /*LOOKUP THREAD 30 IN ZONE 18*/ src=THREAD_T0(sr); /*FIND THE CELL THREAD*/ rlc=THREAD_T0(rl); /*FIND THE CELL THREAD*/ a=0; tall=0.0; begin_c_loop(c0,src) /*LOOP IN CELL THREAD*/ { a=a+1; tall=tall+C_UDSI(c0,src,0); C_UDMI(c0,src,2)=C_UDSI(c0,src,0); } end_c_loop(c0,src) tavesr=tall/a; tall=0.0; a=0; begin_c_loop(c0,rlc) /*LOOP IN CELL THREAD*/ { a=a+1; tall=tall+C_UDSI(c0,rlc,0); C_UDMI(c0,rlc,3)=C_UDSI(c0,rlc,0); } end_c_loop(c0,rlc) taverl=tall/a; dif=5.67*(pow(taverl/100,4)-pow(tavesr/100,4))*emissivity*sample_length/1000/(taverl-tavesr); } |
All times are GMT -4. The time now is 22:38. |