|
[Sponsors] |
November 28, 2002, 11:21 |
UDF
|
#1 |
Guest
Posts: n/a
|
Dear I am sorry disturb your mind . .. Today , i have thorny problem regarding writting the mass diffusion coefficient . Can you assist me to modify this program .. Because,i study this problem for a long times (about one to two years )...
In my model ,five species was be existed indie the model . H2,O2,H2O,CO2,N2 I don't want to choose a default setting from FLUENT's softward . It isn't suited for my model .....must to write a new program of mass diffusion coefficient . Dij=3.64e-8* T^2.334*(Pci*Pcj)^0.3333* (Tci*Tcj)^- 0.48625*(1/Mi+1/Mj)^0.5 /P { T ----cell temperature P ----total pressure Pci---critical pressure of species i Pcj---critical pressure of species j Tci---critical temperature of species i Tcj---critical temperature of species j } i want to solve the Dij from above equation . so. i also wrote a program of UDF by visual C++ Unfortunately , The software occurred a serious error message continuously to me ....The program is wrong in FLUENT . Who can assist to modify this thorny program ?? DEFINE_PROPERTY(Binary_diffusion,cell,thread) { int i,j; real Dij; if(i==0. || j==1.) { C_DIFF_L(cell,thread,0,1)=3.64e-8*pow(C_T(cell,thread),2.334)/C_P(cell,thread)*pow((Pc0*Pc1),1/3)*pow((Tc0*Tc1),-0.48625)*((1/M0+1/M1),1/2); Dij=C_DIFF_L(cell,thread,0,1); } else if(i==0. || j==2.) { C_DIFF_L(cell,thread,0,2)=3.64e-8*pow(C_T(cell,thread),2.334)/C_P(cell,thread)*pow((Pc0*Pc2),1/3)*pow((Tc0*Tc2),-0.48625)*((1/M0+1/M2),1/2); Dij= C_DIFF_L(cell,thread,0,2); } else if(i==0. || j==3.) { C_DIFF_L(cell,thread,0,3)=3.64e-8*pow(C_T(cell,thread),2.334)/C_P(cell,thread)*pow((Pc0*Pc3),1/3)*pow((Tc0*Tc3),-0.48625)*((1/M0+1/M3),1/2); Dij=C_DIFF_L(cell,thread,0,3); } else if(i==0. || j==4.) { C_DIFF_L(cell,thread,0,4)=3.64e-8*pow(C_T(cell,thread),2.334)/C_P(cell,thread)*pow((Pc0*Pc4),1/3)*pow((Tc0*Tc4),-0.48625)*((1/M0+1/M4),1/2); Dij=C_DIFF_L(cell,thread,0,4); } else { C_DIFF_L(cell,thread,1,2)=3.64e-8*pow(C_T(cell,thread),2.334)/C_P(cell,thread)*pow((Pc1*Pc2),1/3)*pow((Tc1*Tc2),-0.48625)*((1/M1+1/M2),1/2); Dij=C_DIFF_L(cell,thread,1,2); } return Dij; } |
|
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
Dynamic Mesh UDF | Qureshi | FLUENT | 7 | March 23, 2017 07:37 |
UDF parallel error: chip-exec: function not found????? | shankara.2 | Fluent UDF and Scheme Programming | 1 | January 16, 2012 22:14 |
How to add a UDF to a compiled UDF library | kim | FLUENT | 3 | October 26, 2011 21:38 |
UDF...UDF...UDF...UDF | Luc SEMINEL | FLUENT | 0 | November 25, 2002 04:03 |
UDF, UDF, UDF, UDF | Luc SEMINEL | Main CFD Forum | 0 | November 25, 2002 04:01 |