UDF to calculate mass flow rate
Can someone find mistake in given below udf. Value calculated by udf at different time steps & reported by printf function is always coming zero......Why???please help
DEFINE_EXECUTE_AT_END(mass_flow) { Domain *d; real flow=0.0; Thread *f_thread; face_t f; d=Get_Domain(1); f_thread=Lookup_Thread(d, 13); begin_f_loop(f,f_thread) { flow += F_FLUX(f,f_thread); } end_f_loop(f, f_thread) printf("Mass flow rate is %g kg/s\t \n",flow); flow_tot=flow; } |
All times are GMT -4. The time now is 22:02. |