|
[Sponsors] |
March 21, 2011, 05:41 |
Step-by-Step Procedure for DPM body force
|
#1 |
New Member
mu lin
Join Date: Oct 2010
Posts: 8
Rep Power: 16 |
hi, everyone.
Now, i am modeling particles deposition on a wall. And at first i use a UDF to add a body force on the particles. But i really don't know how to do with it for Step-by-Step Procedure? My UDF is DEFINE_DPM_BODY_FORCE, after i have compiled my UDF, should I do something with: define-user defined-scalars or define-user defined-memory? and if not i add my udf on th panel of define-DPM-UDF-User-defined Functions. But what is the meaning of User Varibles and Number of Scalars? What should I do with it. My UDF is very simple now. /************************************************** *****/ /**********************thermal_force*************** ********/ /************************************************** *****/ DEFINE_DPM_BODY_FORCE(body_force,p,i) { real p_tem,p_dia,p_den,knudsen,viscosity,lamda,pione,al pha, cv,fai,exponent,p_meanv,fth,uth,uthplus, relax_time,den_ratio,cunn,d_fenzi; real renum,prnum,nulam,nuturb,nunum,tau,tau1; ...... FILE *fp; cell_t c=RP_CELL(&(p->cCell)); Thread *tcell=RP_THREAD(&(p->cCell)); d=Get_Domain(1); p_tem=C_T(c,tcell); p_den=P_RHO(p); p_dia=P_DIAM(p); p_meanv=sqrt(((8*C_RGAS(c,tcell))*C_T(c,tcell))/pi); lamda=2*4.4184*(pow(10,(-7)))*(pow(C_T(c,tcell),0.66666667))/C_R(c,tcell)/p_meanv; knudsen=2.*lamda/p_dia; ...... fth1=0.179021181*knudsen*n*w*1.3806504*p_dia*p_dia *pow(10,12)*wendutidu/q/d_fenzi/d_fenzi; /*need to * pow(10,-10.5)*/ uth=fth1*pow(10,(-10.5))/P_MASS(p); uthplus=fth1*pow(10,(-10.5))*relax_time/P_MASS(p)/ujianqie; return(uth); } Then. it i want to use UDF for a new drag coefficient. What should i pay more attention to while i use fluent, especially for Step-by-Step Procedure? |
|
March 21, 2011, 11:04 |
|
#2 |
Senior Member
|
Hi Mu,
it's enough to hook your UDF in DPM user defined functions. your UDF add a source term to Lagrangian equation that is solved for particle tracking and the previous drag term will be exist. you can write particle path with and without your UDF to compare its changes. the user scalar and variables in DPM panel are just an auxiliary spaces for advanced programming but you didn't use any of them in your UDF so don't set any variables. |
|
March 21, 2011, 23:42 |
|
#3 |
New Member
mu lin
Join Date: Oct 2010
Posts: 8
Rep Power: 16 |
DERA Amir:
thank U very much firstly. But when i have complied my UDF, and wanted to iterate my .cas and/or .dat, just after one iteration of DPM, it stops and shows that: Advancing DPM injections .... Injecting 68 particles Error: FLUENT received fatal signal (ACCESS_VIOLATION) 1. Note exact events leading to error. 2. Save case/data under new name. 3. Exit program and restart to continue. 4. Report error to your distributor. Error Object: () I really do not know what is wrong with my UDF. You know it is a just simple UDF to add a body force to particle motion equation. At the same time for the continuous phase i have added material property and it iterates well, but just DPM, it is really troublesome. |
|
March 22, 2011, 03:26 |
|
#4 |
Senior Member
|
Hi,
I'll help you if you post your UDF completely. in this part, you have not defined some parameters like ujianqie or relax_time, also some functions need specific headers that I don't know you've included them or not! |
|
March 22, 2011, 04:29 |
|
#5 | |
New Member
mu lin
Join Date: Oct 2010
Posts: 8
Rep Power: 16 |
Quote:
Thank you very very much for your warmheartedness. And my udf is as followed which included several simple programs. Among them, gas thermal conductivity and gas viscosity works. But drag_coefficient and thermal force dose not work. #include "udf.h" #include "dpm.h" #include "sg_mphase.h" #include "mem.h" #include "sg.h" #include "surf.h" #include "cxiface.h" # define pi 3.1415926535 # define diam2 3.e-4 # define sn 1. # define st 1. # define boltzmann 1.3806504e-23 # define tshift -536. # define vgas 11.69 # define dtube 51.e-3 # define twall 488 # define nu_s 0.27 # define nu_p 0.27 # define NUM_UDM 7 # define a 3.3333 # define b 2.4510 # define omiga 0.7644 # define fa 1.272 Domain *d; /************************************************** *****/ /******initializes particle injection properties********/ /************************************************** *****/ DEFINE_DPM_INJECTION_INIT(inj_vel,I) { Particle *p; loop(p,I->p) { cell_t c=RP_CELL(&(p->cCell)); Thread *tcell=RP_THREAD(&(p->cCell)); P_VEL(p)[0]=C_U(c,tcell); P_VEL(p)[1]=C_V(c,tcell); P_T(p)=C_T(c,tcell); } } /************************************************** *****/ /************gas thermal conductivity*******************/ /************************************************** *****/ DEFINE_PROPERTY(gas_conduct,c,t) { real conduct; conduct=4.8*(pow(10,-4))*(pow(C_T(c,t),0.717)); return conduct; } /************************************************** *****/ /*****************gas viscosity*************************/ /************************************************** *****/ DEFINE_PROPERTY(gas_vis,c,t) { real vis; vis=4.4184*(pow(10,-7))*(pow(C_T(c,t),0.66666667)); return vis; } /************************************************** *****/ /******thermophoretic coefficient(kgm2/s2)**************/ /************************************************** *****/ /*DEFINE_DPM_PROPERTY(thermo_coeff,c,tcell,p) /* c index that identifies the cell where the particle is located in the given thread*/ /* *t pointer to the thread where the particle is located*/ { real p_tem,p_dia,p_den,knudsen,viscosity,lamda,pione,al pha, cv,fai,exponent,p_meanv,fth,uth, relax_time,den_ratio,cunn,d_fenzi; real renum,prnum,nulam,nuturb,nunum,tau,tau1; real ujianqie,wendutidu_a,wendutidu_b,wendutidu; real prt; real sudu; real f1,f2,f3,f4,f5; real l,m,n,o,w,q,fth1; FILE *fp; /* cell_t c=RP_CELL(&(p->cCell)); Thread *tcell=RP_THREAD(&(p->cCell));*/ d=Get_Domain(1); p_meanv=sqrt(((8*C_RGAS(c,tcell))*C_T(c,tcell))/pi); lamda=2*4.4184*(pow(10,(-7)))*(pow(C_T(c,tcell),0.66666667))/C_R(c,tcell)/p_meanv; knudsen=2.*lamda/P_DIAM(p); pione=0.5816; fai=1.9*(718.+0.1167*C_R(c,tcell))/C_RGAS(c,tcell); alpha=0.22*sqrt((fai*pi/6.)/(1+0.5*pione*knudsen)); /* molecular diameter */ /*f1=4.4184*(pow(10,(-7)))*(pow(C_T(c,tcell),0.66666667)); f2=1/f1; f3=pow(f2,0.5); f4=4.6407*1.3806504*C_T(c,tcell)/pi; f5=pow(f4,0.25); d_fenzi=0.559016994*f3*f5; /*need to * pow(10,-10.25)*/ l=-alpha/knudsen; m=exp(l); n=1-m; o=fai*knudsen; w=pow(o,0.5); q=1+pione*knudsen/2; fth1=0.13174159*knudsen/alpha/q*n*w*1.3806504*P_DIAM(p)*P_DIAM(p)*P_MASS(p)*C_T( c,tcell)/d_fenzi/d_fenzi; /*need to * pow(10,-10.5)*/ uth=-fth1*pow(10,(-10.5)); fp=fopen("wuxingcanshu.txt","a"); fprintf(fp,"%f %f %f %f %f %f \n",C_RGAS(c,tcell),C_CP(c,tcell),C_U(c,tcell),C_M U_EFF(c,tcell),C_R(c,tcell),C_T(c,tcell)); fp=fopen("thermo.txt","a"); fprintf(fp,"%f %f \n",fth1,uth); fp=fopen("num.txt","a"); fprintf(fp,"%f %f %f %f %f %f \n",knudsen,pione,alpha,fai,d_fenzi,C_T(c,tcell) ); fp=fopen("thermo1.txt","a"); fprintf(fp,"%f %f %f %f %f %f %f \n",l,m,n,o,w,q,fth1); fp=fopen("thermo2.txt","a"); fprintf(fp,"%f %f %f %f %f %f \n",f1,f2,f3,f4,f5,d_fenzi); return uth; } /************************************************** *****/ /*****************drag_coefficient***************** *****/ /************************************************** *****/ DEFINE_DPM_DRAG(particle_drag_coeff,Re,p) { real cc,freepath,dp,gas_viscosity,cd,drag_coeff; FILE *fp; cell_t c=RP_CELL(&(p->cCell)); Thread *tcell=RP_THREAD(&(p->cCell)); /*d=Get_Domain(1);*/ gas_viscosity=4.4184*(pow(10,(-7)))*(pow(C_T(c,tcell),0.66666667)); freepath=0.013745*gas_viscosity/C_R(c,tcell)*pow(27.95/C_T(c,tcell),0.5); cc=1+2*freepath/P_DIAM(p)*(1.257+0.4*pow(2.71828,-0.55*P_DIAM(p)/freepath)); if(Re<1) { cd=24/Re; drag_coeff=18*cd*Re/cc/24; fp=fopen("dragcoeff1.txt","a"); fprintf(fp,"%f %f %f %f %f %f \n",gas_viscosity,freepath,cc,cd,drag_coeff,Re); return drag_coeff ; } else { cd=24/Re*(1+0.15*pow(Re,0.687)); drag_coeff=18*cd*Re/cc/24; fp=fopen("dragcoeff2.txt","a"); fprintf(fp,"%f %f %f %f %f %f \n",gas_viscosity,freepath,cc,cd,drag_coeff,Re); return drag_coeff ; } } /************************************************** *****/ /*******************thermal_force****************** *****/ /************************************************** *****/ DEFINE_DPM_BODY_FORCE(body_force,p,i) { real p_tem,p_dia,p_den,knudsen,viscosity,lamda,pione,al pha, cv,fai,exponent,p_meanv,fth,uth,uthplus, relax_time,den_ratio,cunn,d_fenzi; real renum,prnum,nulam,nuturb,nunum,tau,tau1; real ujianqie,wendutidu_a,wendutidu_b,wendutidu; real prt; real sudu; real f1,f2,f3,f4,f5; real l,m,n,o,w,q,fth1; FILE *fp; cell_t c=RP_CELL(&(p->cCell)); Thread *tcell=RP_THREAD(&(p->cCell)); d=Get_Domain(1); p_tem=C_T(c,tcell); p_den=P_RHO(p); p_dia=P_DIAM(p); p_meanv=sqrt(((8*C_RGAS(c,tcell))*C_T(c,tcell))/pi); lamda=2*4.4184*(pow(10,(-7)))*(pow(C_T(c,tcell),0.66666667))/C_R(c,tcell)/p_meanv; knudsen=2.*lamda/p_dia; pione=0.18*36./pi/((2-sn+st)*4./pi+sn); fai=0.25*(9.*1.4-5)*(718.+0.1167*C_R(c,tcell))/C_RGAS(c,tcell); alpha=0.22*sqrt((fai*pi/6.)/(1+0.5*pione*knudsen)); f1=4.4184*(pow(10,(-7)))*(pow(C_T(c,tcell),0.66666667)); f2=1/f1; f3=pow(f2,0.5); f4=4.6407*1.3806504*C_T(c,tcell)/pi; f5=pow(f4,0.25); d_fenzi=0.559016994*f3*f5; /*need to * pow(10,-10.25)*/ /*d_fenzi=pow((0.3125/4.4184*(pow(10,(-7)))*(pow(C_T(c,tcell),0.66666667))),0.5)*(pow(4.6 407*(pow(10.,(-26.)))*boltzmann*C_T(c,tcell)/pi,0.25));*/ den_ratio=p_den/C_R(c,tcell); cunn=1+knudsen*(1.257+0.4*pow(2.718282,(-1.1)*knudsen)); relax_time=den_ratio*p_dia*p_dia*cunn*C_R(c,tcell)/18./f1; renum=C_R(c,tcell)*C_U(c,tcell)/omiga*(dtube*pi/2)/(4.4184*(pow(10,(-7)))*(pow(C_T(c,tcell),0.66666667))); /* Reynolds number */ prt=0.7; /*prnum=C_CP(c,tcell)*C_MU_EFF(c,tcell)/C_K_EFF(c,tcell,prt);*/ prnum=C_CP(c,tcell)*9.2047*(pow(10,(-4)))*(pow(C_T(c,tcell),-0.050333333)); /* Pr number */ nulam=1/pow(pi,0.5)*pow(renum,0.5)*pow(prnum,0.5)/pow((1+9.73*pow(prnum,0.272)+21.29*prnum),(1/6)); nuturb=0.037*pow(renum,0.8)*prnum/(1+2.443*pow(renum,(-0.1))*(pow(prnum,(2/3))-1)); nunum=pow((nulam*nulam+nuturb*nuturb),0.5)*fa; /*Hans Dieter Baehr, Karl Stephan. Heat and Mass Transfer(Second, revised Edition). Springer, 2006.*/ sudu=pow((C_U(c,tcell)*C_U(c,tcell)+C_V(c,tcell)*C _V(c,tcell)),0.5); tau=nunum*C_R(c,tcell)*sudu*sudu/renum/prnum; tau1=nunum*C_R(c,tcell)*vgas*vgas/renum/prnum; ujianqie=pow(tau/C_R(c,tcell),0.5); wendutidu_a=ujianqie*ujianqie*(C_R(c,tcell)-twall)*C_R(c,tcell)/(4.4184*(pow(10,(-7)))*(pow(C_T(c,tcell),0.66666667)))/(vgas-5*ujianqie); if (wendutidu_a>0) { wendutidu=wendutidu_a; } else if (wendutidu_a<0) { wendutidu=0-wendutidu_a; } l=-alpha/knudsen; m=exp(l); n=1-m; o=fai*knudsen; w=pow(o,0.5); q=1+pione*knudsen/2; fth1=0.179021181*knudsen*n*w*1.3806504*p_dia*p_dia *pow(10,12)*wendutidu/q/d_fenzi/d_fenzi; /*need to * pow(10,-10.5)*/ /*fth=1.15*knudsen/(4.*pow(2.,0.5)/(1+pione*knudsen/2))*(1-exp(-alpha/knudsen))*pow(4*fai*pione*knudsen/3./pi,0.5)*boltzmann*p_dia*p_dia*wendutidu/d_fenzi/d_fenzi;*/ uth=fth1*pow(10,(-10.5))/P_MASS(p); uthplus=fth1*pow(10,(-10.5))*relax_time/P_MASS(p)/ujianqie; return uth ; } |
||
March 22, 2011, 14:32 |
|
#6 |
Senior Member
|
Hi,
first make sure that your energy model is activated in GUI. I made some changes and it work without errors if you disable writing to files : (drag coeff. and body force macros) Code:
#include "udf.h" #include "dpm.h" #include "sg_mphase.h" #include "mem.h" #include "sg.h" #include "surf.h" #include "cxiface.h" # define pi 3.1415926535 # define diam2 3.e-4 # define sn 1. # define st 1. # define boltzmann 1.3806504e-23 # define tshift -536. # define vgas 11.69 # define dtube 51.e-3 # define twall 488 # define nu_s 0.27 # define nu_p 0.27 # define NUM_UDM 7 # define a 3.3333 # define b 2.4510 # define omiga 0.7644 # define fa 1.272 Domain *d; /************************************************** *****/ /******initializes particle injection properties********/ /************************************************** *****/ //DEFINE_DPM_INJECTION_INIT(inj_vel,I) //{ //Particle *p; //loop(p,I->p) //{ //cell_t c=RP_CELL(&(p->cCell)); //Thread *tcell=RP_THREAD(&(p->cCell)); //P_VEL(p)[0]=C_U(c,tcell); //P_VEL(p)[1]=C_V(c,tcell); //P_T(p)=C_T(c,tcell); //} //} ///************************************************** *****/ ///************gas thermal conductivity*******************/ ///************************************************** *****/ //DEFINE_PROPERTY(gas_conduct,c,t) //{ //real conduct; //conduct=4.8*(pow(10,-4))*(pow(C_T(c,t),0.717)); //return conduct; //} ///************************************************** *****/ ///*****************gas viscosity*************************/ ///************************************************** *****/ //DEFINE_PROPERTY(gas_vis,c,t) //{ //real vis; //vis=4.4184*(pow(10,-7))*(pow(C_T(c,t),0.66666667)); //return vis; //} ///************************************************** *****/ ///******thermophoretic coefficient(kgm2/s2)**************/ ///************************************************** *****/ //DEFINE_DPM_PROPERTY(thermo_coeff,c,tcell,p) ///* c index that identifies the cell where the particle is located in the given thread*/ ///* *t pointer to the thread where the particle is located*/ //{ //real p_tem,p_dia,p_den,knudsen,viscosity,lamda,pione,al pha, //cv,fai,exponent,p_meanv,fth,uth, //relax_time,den_ratio,cunn,d_fenzi; //real renum,prnum,nulam,nuturb,nunum,tau,tau1; //real ujianqie,wendutidu_a,wendutidu_b,wendutidu; //real prt; //real sudu; //real f1,f2,f3,f4,f5; //real l,m,n,o,w,q,fth1; //FILE *fp; ///* cell_t c=RP_CELL(&(p->cCell)); //Thread *tcell=RP_THREAD(&(p->cCell));*/ //d=Get_Domain(1); //p_meanv=sqrt(((8*C_RGAS(c,tcell))*C_T(c,tcell))/pi); //lamda=2*4.4184*(pow(10,(-7)))*(pow(C_T(c,tcell),0.66666667))/C_R(c,tcell)/p_meanv; //knudsen=2.*lamda/P_DIAM(p); //pione=0.5816; //fai=1.9*(718.+0.1167*C_R(c,tcell))/C_RGAS(c,tcell); //alpha=0.22*sqrt((fai*pi/6.)/(1+0.5*pione*knudsen)); ///* molecular diameter */ ///*f1=4.4184*(pow(10,(-7)))*(pow(C_T(c,tcell),0.66666667)); //f2=1/f1; //f3=pow(f2,0.5); //f4=4.6407*1.3806504*C_T(c,tcell)/pi; //f5=pow(f4,0.25); //d_fenzi=0.559016994*f3*f5; ///*need to * pow(10,-10.25)*/ //l=-alpha/knudsen; //m=exp(l); //n=1-m; //o=fai*knudsen; //w=pow(o,0.5); //q=1+pione*knudsen/2; //fth1=0.13174159*knudsen/alpha/q*n*w*1.3806504*P_DIAM(p)*P_DIAM(p)*P_MASS(p)*C_T( c,tcell)/d_fenzi/d_fenzi; ///*need to * pow(10,-10.5)*/ //uth=-fth1*pow(10,(-10.5)); //fp=fopen("wuxingcanshu.txt","a"); //fprintf(fp,"%f %f %f %f %f %f \n",C_RGAS(c,tcell),C_CP(c,tcell),C_U(c,tcell),C_M U_EFF(c,tcell),C_R(c,tcell),C_T(c,tcell)); //fp=fopen("thermo.txt","a"); //fprintf(fp,"%f %f \n",fth1,uth); //fp=fopen("num.txt","a"); //fprintf(fp,"%f %f %f %f %f %f \n",knudsen,pione,alpha,fai,d_fenzi,C_T(c,tcell) ); //fp=fopen("thermo1.txt","a"); //fprintf(fp,"%f %f %f %f %f %f %f \n",l,m,n,o,w,q,fth1); //fp=fopen("thermo2.txt","a"); //fprintf(fp,"%f %f %f %f %f %f \n",f1,f2,f3,f4,f5,d_fenzi); //return uth; //} /************************************************** *****/ /*****************drag_coefficient***************** *****/ /************************************************** *****/ DEFINE_DPM_DRAG(particle_drag_coeff,Re,p) { real cc,freepath,dp,gas_viscosity,cd,drag_coeff; //FILE *fp; cell_t c=RP_CELL(&(p->cCell)); Thread *tcell=RP_THREAD(&(p->cCell)); /////*d=Get_Domain(1);*/ gas_viscosity=4.4184*(pow(10,(-7)))*(pow(C_T(c,tcell),0.66666667)); freepath=0.013745*gas_viscosity/C_R(c,tcell)*pow(27.95/C_T(c,tcell),0.5); cc=1+2*freepath/P_DIAM(p)*(1.257+0.4*pow(2.71828,-0.55*P_DIAM(p)/freepath)); if(Re<1) { cd=24/Re; drag_coeff=18*cd*Re/cc/24; //fp=fopen("dragcoeff1.txt","w"); //fprintf(fp,"%f %f %f %f %f %f \n",gas_viscosity,freepath,cc,cd,drag_coeff,Re); return drag_coeff ; } else { cd=24/Re*(1+0.15*pow(Re,0.687)); drag_coeff=18*cd*Re/cc/24; //fp=fopen("dragcoeff2.txt","a"); //fprintf(fp,"%f %f %f %f %f %f \n",gas_viscosity,freepath,cc,cd,drag_coeff,Re); return drag_coeff ; } } /************************************************** *****/ /*******************thermal_force****************** *****/ /************************************************** *****/ DEFINE_DPM_BODY_FORCE(body_force,p,i) { Domain *d=Get_Domain(1); Thread *tcell=RP_THREAD(&(p->cCell)); cell_t c=RP_CELL(&(p->cCell)); real p_tem,p_dia,p_den,knudsen,viscosity,lamda,pione,alpha, cv,fai,exponent,p_meanv,fth,uth,uthplus, relax_time,den_ratio,cunn,d_fenzi; real renum,prnum,nulam,nuturb,nunum,tau,tau1; real ujianqie,wendutidu_a,wendutidu_b,wendutidu; real prt; real sudu; real f1,f2,f3,f4,f5; real l,m,n,o,w,q,fth1; //FILE *fp; p_tem=C_T(c,tcell); p_den=P_RHO(p); p_dia=P_DIAM(p); p_meanv=sqrt(((8*C_RGAS(c,tcell))*C_T(c,tcell))/pi); lamda=2*4.4184*(pow(10,(-7)))*(pow(C_T(c,tcell),0.66666667))/C_R(c,tcell)/p_meanv; knudsen=2.*lamda/p_dia; pione=0.18*36./pi/((2-sn+st)*4./pi+sn); fai=0.25*(9.*1.4-5)*(718.+0.1167*C_R(c,tcell))/C_RGAS(c,tcell); alpha=0.22*sqrt((fai*pi/6.)/(1+0.5*pione*knudsen)); f1=4.4184*(pow(10,(-7)))*(pow(C_T(c,tcell),0.66666667)); f2=1/f1; f3=pow(f2,0.5); f4=4.6407*1.3806504*C_T(c,tcell)/pi; f5=pow(f4,0.25); d_fenzi=0.559016994*f3*f5; /*need to * pow(10,-10.25)*/ /*d_fenzi=pow((0.3125/4.4184*(pow(10,(-7)))*(pow(C_T(c,tcell),0.66666667))),0.5)*(pow(4.6 407*(pow(10.,(-26.)))*boltzmann*C_T(c,tcell)/pi,0.25));*/ den_ratio=p_den/C_R(c,tcell); cunn=1+knudsen*(1.257+0.4*pow(2.718282,(-1.1)*knudsen)); relax_time=den_ratio*p_dia*p_dia*cunn*C_R(c,tcell)/18./f1; renum=C_R(c,tcell)*C_U(c,tcell)/omiga*(dtube*pi/2)/(4.4184*(pow(10,(-7)))*(pow(C_T(c,tcell),0.66666667))); /* Reynolds number */ prt=0.7; /*prnum=C_CP(c,tcell)*C_MU_EFF(c,tcell)/C_K_EFF(c,tcell,prt);*/ prnum=C_CP(c,tcell)*9.2047*(pow(10,(-4)))*(pow(C_T(c,tcell),-0.050333333)); /* Pr number */ nulam=1/pow(pi,0.5)*pow(renum,0.5)*pow(prnum,0.5)/pow((1+9.73*pow(prnum,0.272)+21.29*prnum),(1/6)); nuturb=0.037*pow(renum,0.8)*prnum/(1+2.443*pow(renum,(-0.1))*(pow(prnum,(2/3))-1)); nunum=pow((nulam*nulam+nuturb*nuturb),0.5)*fa; /*Hans Dieter Baehr, Karl Stephan. Heat and Mass Transfer(Second, revised Edition). Springer, 2006.*/ sudu=pow((C_U(c,tcell)*C_U(c,tcell)+C_V(c,tcell)*C_V(c,tcell)),0.5); tau=nunum*C_R(c,tcell)*sudu*sudu/renum/prnum; tau1=nunum*C_R(c,tcell)*vgas*vgas/renum/prnum; ujianqie=pow(tau/C_R(c,tcell),0.5); wendutidu_a=ujianqie*ujianqie*(C_R(c,tcell)-twall)*C_R(c,tcell)/(4.4184*(pow(10,(-7)))*(pow(C_T(c,tcell),0.66666667)))/(vgas-5*ujianqie); if (wendutidu_a>0) { wendutidu=wendutidu_a; } else if (wendutidu_a<0) { wendutidu=0-wendutidu_a; } l=-alpha/knudsen; m=exp(l); n=1-m; o=fai*knudsen; w=pow(o,0.5); q=1+pione*knudsen/2; fth1=0.179021181*knudsen*n*w*1.3806504*p_dia*p_dia *pow(10,12)*wendutidu/q/d_fenzi/d_fenzi; /*need to * pow(10,-10.5)*/ /*fth=1.15*knudsen/(4.*pow(2.,0.5)/(1+pione*knudsen/2))*(1-exp(-alpha/knudsen))*pow(4*fai*pione*knudsen/3./pi,0.5)*boltzmann*p_dia*p_dia*wendutidu/d_fenzi/d_fenzi;*/ uth=fth1*pow(10,(-10.5))/P_MASS(p); uthplus=fth1*pow(10,(-10.5))*relax_time/P_MASS(p)/ujianqie; return uth ; } |
|
March 22, 2011, 22:13 |
|
#7 |
New Member
mu lin
Join Date: Oct 2010
Posts: 8
Rep Power: 16 |
Hi.
Dear Amir. Thank you for Ur help. With Ur advise for my UDF, it works when i disable writing to files. Maybe now i am nor sure whether the result is right or not, while at least it iterats. So thank you again! |
|
April 25, 2011, 02:13 |
Thermophoretic force
|
#8 |
Member
Join Date: Mar 2011
Posts: 50
Rep Power: 15 |
I am trying to look for a formula for thermophoretic force on a particle in liquid for discrete phase modelling. I was wondering if you could explain where you got the formula (book or peer reviewed articles) for "fth" in thermal force section of your udf? Is this force relevant to particles in liquid or gas domain? In one of the comments, it mentions this book Hans Dieter Baehr, Karl Stephan. Heat and Mass Transfer(Second, revised Edition). Springer, 2006, could you specify which section or chapter of the book. I dont have the book but I will get it once I am sure this book has the formula for thermophoretic force on the particle.
Thank You |
|
January 6, 2012, 21:06 |
DPM body force help
|
#9 |
New Member
Carlos
Join Date: Dec 2011
Posts: 14
Rep Power: 15 |
Hi everybody
I need to include forces related to interacions between solid particles. However, the ANSYS Fluent help establishes that an UDF for a body force receives parameters for one particle only. However, I need to include a force parameter that depends on the distance between two particles. For this specific force, the only option I have seen so far is a body force. I would like to know if it's possible to adjust this type of UDF to receive information (position, velocity and diameter) for more than 1 particle. Thanks in advance for your help |
|
January 17, 2017, 04:31 |
|
#10 |
New Member
Swapnil Chavanda
Join Date: Jan 2017
Location: Pune
Posts: 19
Rep Power: 9 |
please send the UDF for particulate fouling
|
|
March 22, 2017, 11:03 |
|
#11 |
New Member
Swapnil Chavanda
Join Date: Jan 2017
Location: Pune
Posts: 19
Rep Power: 9 |
Hello everyone,
If anyone has the mathematical model (mathematical formulation) for measurement of particulate fouling thickness. Please share me it. I eager to know your response. Thanks in advance Sent from my Moto G (4) using CFD Online Forum mobile app |
|
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
Body Force weighted | Sanxian | Main CFD Forum | 0 | June 15, 2007 09:21 |
Large varying body force vs. Rhie-chow correction | john | Main CFD Forum | 1 | May 23, 2007 03:27 |
Problems with SUPG body force term | FEM question | Main CFD Forum | 0 | January 21, 2006 18:51 |
outlet BC when with body force | kenn | Main CFD Forum | 0 | September 2, 2003 00:37 |
pressure Poisson equation in fractinoal step metho | Rui | Main CFD Forum | 6 | October 15, 2000 05:57 |