- **Fluent UDF and Scheme Programming**
(*http://www.cfd-online.com/Forums/fluent-udf/*)

- - **Does F_YI(f,t,i) get average mass fraction or not?**
(*http://www.cfd-online.com/Forums/fluent-udf/89755-does-f_yi-f-t-i-get-average-mass-fraction-not.html*)

Does F_YI(f,t,i) get average mass fraction or not?There is a so2-air mixture passing through a surface inlet, I want to know the SO2 mass flow rate, so I need to use F_YI(f,t,i), my question is, is this F_YI (f,t,i) the average mass fraction already, or it is something else? I know that by writing f,t, the program will automatically go through all the surfaces on the same thread to calculate the mass fraction, without using begin_f_loop, am I getting this right?
My old code is: begin_f_loop(f,t) if PRINCIPAL_FACE_P(f,t) /* tests if the face is the principle face FOR COMPILED UDFs ONLY */ { NV_D(flux, =, F_U(f,t), F_V(f,t), F_W(f,t)); /* defining flux in terms of velocity field */ NV_S(flux, *=, F_R(f,t)); /* multiplying density to get flux vector */ F_AREA(A,f,t); /* face normal vector returned from F_AREA */ massflowrate += F_YI(f,t,i)*NV_DOT(flux,A); /* dot product of the inlet surface flux and area vector, multiplied by the mass fraction of species i */ } end_f_loop(f,t) I guess I don't need the begin_f_loop and end_f_loop, right? but how am I supposed to do with "massflowrate += F_YI(f,t,i)*NV_DOT(flux,A); " thanks |

All times are GMT -4. The time now is 23:37. |