|
[Sponsors] |
October 8, 2013, 06:30 |
What’s the problem with this udf?
|
#1 |
New Member
neda rahimi
Join Date: May 2013
Posts: 13
Rep Power: 13 |
What’s the problem with this udf?
#include "udf.h" #define K 1.38e-23 #define e 1.6e-19 #define T 293 #define ci 240 #define E0 8.854e-12 #define pi 3.141593 #define KP 2.5 /* relative permittivity-particle dielectric constatnt */ #define Dp 4e-6 /* diameter of particles */ #define bi 0.00015 /* ion mobility */ DEFINE_DPM_BODY_FORCE(particle_body_force, p, i) { Domain*d; real bforcex,bforcey, Qs, E, Q, tow, towc, Qp; real bforce=0; Thread *t; cell_t c; face_t f; d=Get_Domain(2); thread_loop_c(t,d) { begin_c_loop(c,t) { E=sqrt(ND_SUM(pow(C_UDMI(c,t,0),2),pow(C_UDMI(c,t, 1),2))); Qs=(3*pi*E0*KP*pow(Dp,2)*E)/(KP+2); tow=(4*E0)/(C_UDSI(c,t,1)*bi); towc=(8*E0*K*T)/(Dp*e*ci*C_UDSI(c,t,1)); Qp=Qs*(P_TIME(p)/(P_TIME(p)+tow))+(2*pi*E0*Dp*K*T/e)*log(1+(P_TIME(p)/C_UDMI(c,t,2))); C_UDMI(c,t,3)=Qp; bforcex=Qp*C_UDMI(c,t,0); bforcey=Qp*C_UDMI(c,t,1); bforce=sqrt(ND_SUM(pow(bforcex,2),pow(bforcey,2))) ; C_UDMI(c,t,4)=bforce; } end_c_loop(c,t) } I consider 2 uds and 5 udm in define/user define/scalars or memories. It compiled successfully but when I want track particle in fluent, this error appear. 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: () If anybody know what should I do please help me. Thank you. |
|
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
ATTN ALL: SOLUTON TO UDF COMPILE PROBLEM | Rizwan | Fluent UDF and Scheme Programming | 40 | March 18, 2018 06:05 |
what's the problem with my udf | zzyan | FLUENT | 0 | November 4, 2010 03:56 |
Problem with my udf | july | Fluent UDF and Scheme Programming | 3 | June 20, 2010 06:56 |
udf compiling problem | akr | FLUENT | 3 | August 22, 2007 07:14 |
UDF problem | chiseung | FLUENT | 4 | January 10, 2002 09:58 |