|
[Sponsors] |
September 19, 2005, 14:56 |
UDF fatal error
|
#1 |
Guest
Posts: n/a
|
Hello all!
I work with gas particle two phase supersonic flow in nozzle. I wrote a UDF to change the drag coefficient correlation that fluent uses to calculate the drag force on the particles. I could successfully interpret it in Fluent solver, but when I hook it in to Fluent, I get following error. ************************************************** ********** 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: () ************************************************** ********** Can someone pls tell me what is the reason for this error? This is the udf I have written.... ************************************************** ********** #include "udf.h" #include "mem.h" #define vis 1.663e-05 #define R 296.8 #define g 1.398 DEFINE_DPM_DRAG(test,Re,p) { //Variable Definitions// real a, b, d, mp, rhop, tp, dp, vp, u, v, w, cd, fd; //Defining particle variables real tg; real vg; cell_t c; Thread *t; dp = P_DIAM(p); tp = P_T(p); rhop = P_RHO(p); tg = C_T(c,t); u = C_U(c,t); v = C_V(c,t); w = C_W(c,t); vg = sqrt(u*u+v*v+w*w); vp = sqrt(pow(P_VEL(p)[0],2)+pow(P_VEL(p)[1],2)+pow(P_VEL(p)[2],2)); mp = (vg-vp)/sqrt(g*R*tg); a = (4.33+((3.65-1.53*(tp/tg))/(1+0.353*(tp/tg)))); b = 0.247*sqrt(2/g)*(Re/mp); d = (4.5+0.38*(0.03*Re+0.48*sqrt(Re))/(1+0.03*Re+0.48*sqrt(Re))); //Main Formula Calculation// cd = (24/(Re+sqrt(g/2)*mp*a*exp(-b)))+exp(-0.5*mp/sqrt(Re))*d+0.1*pow(mp,2)+0.2*pow(mp,8)+0.6*sqrt(g/2)*mp*(1-exp(-mp/Re)); fd = (18*vis*cd*Re)/(rhop*dp*dp*24); return(fd); } ************************************************** ********** |
|
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
Building OpenFOAM1.7.0 from source | ata | OpenFOAM Installation | 46 | March 6, 2022 13:21 |
polynomial thermophysical properties II | sebastian | OpenFOAM Running, Solving & CFD | 54 | November 21, 2019 07:12 |
[OpenFOAM] Native ParaView Reader Bugs | tj22 | ParaView | 270 | January 4, 2016 11:39 |
OpenFOAM install on Ubuntu Natty 11.04 | bkubicek | OpenFOAM | 13 | May 26, 2011 05:48 |
OF 1.6 | Ubuntu 9.10 (64bit) | GLIBCXX_3.4.11 not found | piprus | OpenFOAM Installation | 22 | February 25, 2010 13:43 |