how to define udf file for for source term, scattering, absorption coefficient.
hello,
i am working on solar collector modeling, but I have failed to write udf file for user defined function for momentum source term, scattering, absorption coefficient. this is the error i am getting for cords of momentum source term (structure reference not implemented) cords: #include "udf.h" #include "math.h" #define H 2 #define To 300 #define kio 0.06 #define pi 3.14 DEFINE_SOURCE(ymom_source,cell,thread,ds,eqn) { real x[1]; double Fk; double beta=0.000222297; real T=C_T(cell,thread); double kim; kim=kio/(1+beta*(T-To)); Fk=(2*kim*pow(H,2)*(-kio*beta)/(1+beta*pow(T-To,2))*x[1].ds[T]*x[1]; return Fk; } |
All times are GMT -4. The time now is 06:43. |