|
[Sponsors] |
May 6, 2011, 09:23 |
Udf error problem
|
#1 |
New Member
hasan
Join Date: Apr 2011
Posts: 1
Rep Power: 0 |
I write this udf and when I run it in fluent I have this 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: () " and my udf is: #include "udf.h" #define C_teta 0.3 #define P_t 0.85 enum { source1, source2, source3, source4 }; DEFINE_SOURCE(source_energy , cell, thread, dS, eqn) { real coord[ND_ND]; real source,y,T,nu_t,S11,S12,S22; C_CENTROID(coord,cell, thread); y = coord[1]; nu_t = C_MU_T(cell,thread)/C_R(cell,thread); T = C_K(cell, thread)/C_D(cell, thread); S11 = 0.5*(C_DUDX(cell,thread)+C_DUDX(cell,thread)); S12 = 0.5*(C_DUDY(cell,thread)+C_DVDX(cell,thread)); S22 = 0.5*(C_DVDY(cell,thread)+C_DVDY(cell,thread)); C_UDSI(cell, thread,source1) = T*(2*C_K(cell, thread)/3-2*nu_t*S11)*C_T_G(cell,thread)[0]+T*(-2*nu_t*S12)*C_T_G(cell,thread)[1]; C_UDSI(cell, thread,source2) = T*(-2*nu_t*S11)*C_T_G(cell,thread)[0]+T*(2*C_K(cell, thread)/3-2*nu_t*S22)*C_T_G(cell,thread)[1]; C_UDSI(cell, thread,source3) = nu_t*C_T_G(cell,thread)[0]/P_t; C_UDSI(cell, thread,source4) = nu_t*C_T_G(cell,thread)[1]/P_t; source = 0.4*C_teta*C_R(cell,thread)*C_CP(cell,thread)*((C_ UDSI_G(cell, thread,source1)[0])+(C_UDSI_G(cell, thread,source2)[1])-(C_UDSI_G(cell, thread,source3)[0])-(C_UDSI_G(cell, thread,source4)[1])); dS[eqn] = 0.0; return source; } plz help me. |
|
|
|
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 |