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

FLUENT received fatal signal (ACCESS_VIOLATION)

Register Blogs Community New Posts Updated Threads Search

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   November 10, 2007, 13:09
Default FLUENT received fatal signal (ACCESS_VIOLATION)
  #1
samy
Guest
 
Posts: n/a
Hallo I am trying to code for equation turbulence model by means of UDF and UDS. Now I can complie my UDF very well but when I try to initialize the following error message is displyed 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: Then I searched the internet, I found UDF written for low Re k-e model. I checked the code and it is appear correct. after compiling the UDF and hoocking the function as given in the UDF manual the same error message appeared. also the UDS number was increased to 2 from define.....> user-defined....>scalers. following the UDF code

#include "udf.h" #include "sg_udms.h"

/* Turbulence model constants */ const real C_MU=0.09; const real SIG_K=1.0; const real SIG_D=1.3; const real C1_D=1.44; const real C2_D=1.92; /*DEFINE_EXECUTE_ON_LOADING(onloading,libudf) { void Set_User_Scaler_Name(int 0,char K); void Set_User_Scaler_Name(int 1,char D); }*/

/* User-defined scalars */ enum { K, D, N_REQUIRED_UDS };

/* Reynolds number definitions */ real Re_y(cell_t c, Thread *t) { real c_k = C_UDSI(c,t,K); real rr= C_R(c,t)*sqrt(c_k)*C_WALL_DIST(c,t)/C_MU_L(c,t); return rr; }

real Re_t(cell_t c, Thread *t) { real c_k, c_d;

c_k = C_UDSI(c,t,K); c_d = C_UDSI(c,t,D);

return C_R(c,t)*SQR(c_k)/C_MU_L(c,t)/c_d; }

/* Damping Functions */ real f_mu(cell_t c, Thread *t) { real dd= tanh(0.008*Re_y(c,t))*(1.+4/pow(Re_t(c,t),0.75)); return dd; }

real f_1(cell_t c, Thread *t) { return 1.; }

real f_2(cell_t c, Thread *t) { real ee= (1.-2/9*exp(-MIN(Re_t(c,t)*Re_t(c,t)/36,10))) *(1.-exp(-MIN(Re_y(c,t)/12,10))); return ee; }

DEFINE_SOURCE(k_source, c, t, dS, eqn) { real c_k, c_d; real mu_t, G_k, source;

c_k = C_UDSI(c,t,K); c_d = C_UDSI(c,t,D);

mu_t = C_MU_T(c,t) + C_MU_L(c,t)*1.0E-10; G_k = C_MU_T(c,t)*SQR(Strainrate_Mag(c,t));

dS[eqn] = -2.*C_R(c,t)*C_R(c,t)*C_MU*f_mu(c,t)*c_k/mu_t; source= G_k - C_R(c,t)*C_R(c,t)*C_MU*f_mu(c,t)*SQR(c_k)/mu_t; return source; }

DEFINE_SOURCE(d_source, c, t, dS, eqn) { real c_k, c_d; real G_k;

c_k = C_UDSI(c,t,K); c_d = C_UDSI(c,t,D);

G_k = C_MU_T(c,t)*SQR(Strainrate_Mag(c,t));

dS[eqn] = C1_D*f_1(c,t)*G_k/c_k - 2.*C2_D*f_2(c,t)*C_R(c,t)*c_d/c_k; return C1_D*f_1(c,t)*G_k*c_d/c_k - C2_D*f_2(c,t)*C_R(c,t)*SQR(c_d)/c_k; }

DEFINE_DIFFUSIVITY(ke_diffusivity, c, t, eqn) { real diff; real mu = C_MU_L(c,t); /* real mu_t = C_MU_T(c,t); */ real c_k = C_UDSI(c,t,K); real c_d = C_UDSI(c,t,D); real mu_t = C_R(c,t)*C_MU*f_mu(c,t)*SQR(c_k)/c_d;

switch (eqn) { case K: diff = mu_t/SIG_K + mu; break; case D: diff = mu_t/SIG_D + mu; break; default: diff = mu_t + mu; } return diff; }

DEFINE_TURBULENT_VISCOSITY(ke_mut, c, t) /* Set the turbulent viscosity */ { real c_k = C_UDSI(c,t,K); real c_d = C_UDSI(c,t,D); real mu_t = C_R(c,t)*C_MU*f_mu(c,t)*SQR(c_k)/c_d;

return mu_t; }

/*DEFINE_ADJUST(turb_adjust, domain) { /* do something... */ /*}*/

DEFINE_INIT(turb_init, dom) { cell_t c; Thread *t; thread_loop_c(t,dom) { begin_c_loop(c,t) { C_UDSI(c,t,K)=0.07*20*20; C_UDSI(c,t,D)=1; } end_c_loop(c,t) } }

DEFINE_PROFILE(wall_d_bc, t, position) { face_t f; cell_t c0; Thread *t0 = t->t0; /* t0 is cell thread */ real xw[ND_ND], xc[ND_ND], dx[ND_ND], rootk, dy, dro, drootkdy;

/* Do nothing if wall distance not computed or not in fluid zone */ if (!Data_Valid_P() || !FLUID_THREAD_P(t0)) return;

begin_f_loop(f,t) { c0 = F_C0(f,t); rootk = sqrt(MAX(C_UDSI(c0,t0,K), 0.)); F_CENTROID(xw,f,t); C_CENTROID(xc,c0,t0); NV_VV(dx, =, xc, -, xw); dy = ND_MAG(dx[0], dx[1], dx[2]); drootkdy = rootk/dy; F_PROFILE(f,t,position) = 2.*C_MU_L(c0,t0)/C_R(c0,t0)*drootkdy*dro; } end_f_loop(f,t) }

----------- please help me to overcome this problem thanks in advance
  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
Free Surface Ship Flow timfranke OpenFOAM Running, Solving & CFD 322 March 3, 2021 09:04
FLUENT received fatal signal (ACCESS_VIOLATION) CHAKER FLUENT 4 December 11, 2015 03:20
Fatal Signal (ACCESS_VIOLATION) Joe101 FLUENT 3 November 18, 2010 23:59
Problems in lauching FLUENT Lourival FLUENT 3 January 16, 2008 16:48
fatal signal (ACCESS_VIOLATION) manu FLUENT 0 December 10, 2007 06:10


All times are GMT -4. The time now is 09:00.