CFD Online Logo CFD Online URL
www.cfd-online.com
[Sponsors]
Home > Forums > Software User Forums > ANSYS > FLUENT > Fluent UDF and Scheme Programming

DPM UDF - Segmentation Violation & Stack Backtrace

Register Blogs Community New Posts Updated Threads Search

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   February 23, 2009, 18:55
Default DPM UDF - Segmentation Violation & Stack Backtrace
  #1
Prashanth
Guest
 
Posts: n/a
Hi All

I am working on my Masters Thesis which involves FLUENT modeling of particle deposition. I am a greenhorn when it comes to UDF's and the following is the first UDF I have ever created. The UDF is compiling without any errors and I am also able to choose it as a Boundary Condition in my setup. When I run the particle tracking though, I get the following error:

Stack backtrace generated for node id 3 on signal 11 : Please include this information with any bug report you file on this issue

/nfs/14/osu5206/.bashrc: line 1: module: command not found Primitive Error at Node 3: received Segmentation Violation

I have the code below if that would help in debugging the problem. The BC is basically calculating the particle normal velocity and critical velocity, comparing the both and determining if particle sticks based on this condition. Any help would be greatly appreciated as I have a 5 day deadline to get this working.

#include "udf.h" #include "dpm.h" #define nu_s 0.27 #define nu_p 0.27 #define YMIN 0.0 #define YMAX 0.4 #define UMEAN 1.0 #define B 1./7. #define DELOVRH 0.5 #define VISC 1.7894e-05 #define RGAS (UNIVERSAL_GAS_CONSTANT/MW) #define Tdatum 288.15 #define NUM_UDM 2

DEFINE_DPM_BC(deposition_bc, p, thread, f, f_normal, dim) { Domain *d; cell_t c; Thread *t; d=Get_Domain(1);

real Tavg,Ep,vcr; /*real norm_coeff=1.; real tang_coeff=1.;*/ real vn=0.; real R=287.; real normal[3]; int i,idim=dim; real x[ND_ND];

for (i=0.; i<idim; i++)

normal[i] = f_normal[i];

if(p->type==DPM_TYPE_INERT)

{

/*computing normal velocity*/

for(i=0.;i<idim;i++)

vn += p->state.V[i]*normal[i];

/*computing critical velocity*/

Tavg = (F_T(f,t)+P_T(p))/2.;

Ep = (3.*(pow(10.,20.)))*exp(-0.02365*Tavg);

vcr = pow(((2.*Ep)/P_DIAM(p)),(10./7.));

/*particle continues its path - no sticking*/

if (vn > vcr)

{

return PATH_ACTIVE;

}

/*particle sticks*/

else

{

thread_loop_c(t,d)

{

begin_c_loop(c,t)

{

C_UDMI(c,t,0) += P_MASS(p); /*mass of particles deposited*/

}

end_c_loop(c,t)

}

return PATH_ABORT;

} } }

  Reply With Quote

Old   July 11, 2009, 06:33
Default any solution
  #2
New Member
 
Mayank Kumar
Join Date: May 2009
Posts: 4
Rep Power: 17
kmayank is on a distinguished road
Hey Prashant,

I am getting the same segementation error (with backtrace) problem with execute_at_end UDF. Did you get any solution to this?

Thanks
Mayank
kmayank is offline   Reply With Quote

Old   March 11, 2011, 02:26
Default
  #3
New Member
 
Chao Li
Join Date: Mar 2010
Location: Shanghai.PRC
Posts: 9
Rep Power: 16
LICH is on a distinguished road
Hi kmayank, I got the same problem when I was runing a parallel calculation with a UDF about DPM, can you give any suggestions?
Thanks a lot. lich
LICH is offline   Reply With Quote

Old   March 15, 2012, 00:12
Default
  #4
Member
 
Join Date: Mar 2011
Posts: 50
Rep Power: 15
cdf_user is on a distinguished road
From where did you get the formula for critical velocity?
cdf_user is offline   Reply With Quote

Old   July 10, 2012, 11:39
Default critical velocity of gaseous particle
  #5
Member
 
Join Date: Mar 2011
Posts: 50
Rep Power: 15
cdf_user is on a distinguished road
Here is the formula for critical velocity of a particle written in udf form:

real bk_cgs = 1.38e-16; /* cm^2-g/s */
real bk_si = 1.38e-23; /* m^2-kg/s */

lam =(1.3807e-23*P_T(p))/(3*3.141592*C_R(c,cthread)*(1/1000)*C_MU_L(c,cthread)*C_MU_L(c,cthread)*100*Reyo lds)
cdf_user is offline   Reply With Quote

Reply


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Error " stack backtrace " Arnaud FLUENT 2 May 25, 2011 16:57
Segmentation fault No stack lakeat OpenFOAM Installation 0 December 4, 2007 09:57
SEGMENTATION VIOLATION kROZ FLUENT 1 May 4, 2006 10:12
SEGMENTATION VIOLATION ashish FLUENT 0 April 22, 2006 13:51
SEGMENTATION VIOLATION Arif FLUENT 3 May 27, 2003 09:24


All times are GMT -4. The time now is 18:13.