|
[Sponsors] |
May 4, 2011, 03:53 |
Change the energy Eq.
|
#1 |
Member
m.reza
Join Date: Apr 2011
Posts: 38
Rep Power: 15 |
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 |
energy in sonicFoam | joern | OpenFOAM Running, Solving & CFD | 1 | September 24, 2019 00:15 |
Incompressible flow: mechanical energy terms | Pinaki Bhattacharya | FLUENT | 0 | January 29, 2009 12:33 |
SIMPLE and energy equation convergence | Fabio | Main CFD Forum | 0 | June 1, 2007 06:06 |
Multicomponent fluid | Andrea | CFX | 2 | October 11, 2004 05:12 |
The energy conservation in a case of phase change | robin | Phoenics | 2 | April 6, 2002 00:09 |