Modelling Solidification and Melting
Hello,
I am trying to solve for solidification in simple binary systems with convection and Species transport. At the end I want to plot species fraction in terms of C_mix(mixture concentration) which is defined as C_mix=fl*Cl+C_new C_new=C_old+del_f*k*Cl fl=Liquid fraction Cl= Liquid concentration del_f = Difference in liquid fraction in successive time steps. k= Partition Coefficient C0= Alloy Composition C_old = acts as counter (initialized as C_old=K*C0) I am trying to write the UDF but do not know where to hook up the UDF in species model. Here is my UDF #include "udf.h" DEFINE_PROPERTY(c_mix,c,t) { real c_m,k=0.3,c_new,c_old=k*0.1; begin_c_loop(c,t) { del_f=C_LIQF(c,t,1)-C_LIQF(c,t,0); c_new=c_old+del_f*k*C_YI(c,t,i); c_m=C_LIQF(c,t)*C_YI(c,t,i)+c_new ; } end_c_loop(c,t) return c_m; } |
All times are GMT -4. The time now is 05:03. |