Interpreted Error in SourceTerm of k-omeca Model
My FLUENT5.5 has standard k-epsilon model but I would like to build k-omeca model which differ from k-epsilon in source term only. It has strain rate which already have function in FLUENT [Strainrate_Mag(c,t)]. When I interpreted it the message is:
cpp -ID:\FLUENT.INC\fluent5.5/src -ID:\FLUENT.INC\fluent5.5/cortex/src -ID:\FLUENT.INC\fluent5.5/client/src -ID:\FLUENT.INC\fluent5.5/multiport/src -I. -DUDFCONFIG_H="<udfconfig.h>" Test_2.c Error: Test_2.c: line 63: function "Strainrate_Mag" not found (pc=24). Error: Test_2.c: line 63: function "Strainrate_Mag" not found (pc=31). Error: Test_2.c: line 63: function "Strainrate_Mag" not found (pc=238). Error: Test_2.c: line 63: function "Strainrate_Mag" not found (pc=245). .entry Because it said that "call Strainrate_Mag (-1)" The message on FLUENT is: Material water-liquid: New property "UDS Diffusivity" has been added. Selecting uds method for "UDS Diffusivity" -- data required. Material air: New property "UDS Diffusivity" has been added. Selecting uds method for "UDS Diffusivity" -- data required. chip-exec: k_source: wrong return type: void udf function expectedTest_2.c:2: math.h: No such file or directory 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: () chip-exec: k_source: wrong return type: void udf function expected This is my C code: #include "udf.h" #include "math.h" /* Turbulence model constants */ #define C_MU 0.09 #define SIG_TKE 2.0 #define SIG_TDR 2.0 #define C1_D 0.556 #define C2_D 1.92 /*Use-defined scalars*/ enum { TKE, TDR, N_REQUIRED_UDS }; DEFINE_SOURCE(k_source,c,t,dS,eqn) { real G_k; 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*C_UDSI(c,t,TKE)/C_MU_T(c,t); return G_k-(C_R(c,t)*C_R(c,t)*C_MU*SQR(C_UDSI(c,t,TKE))/C_MU_T(c,t)); } DEFINE_SOURCE(d_source,c,t,dS,eqn) { real G_k; 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*C_UDSI(c,t,TKE); return C1_D*C_UDSI(c,t,TDR)*G_k/C_UDSI(c,t,TKE)-C2_D*C_R(c,t)*SQR(C_UDSI(c,t,TDR))/C_UDSI(c,t,TKE); } DEFINE_ADJUST(turb_adjust , domain) { Thread *t; cell_t c; /* set the turbulent viscosity */ thread_loop_c(t,domain) { if (FLUID_THREAD_P(t)) { begin_c_loop(c,t) { C_MU_T(c,t) =C_R(c,t)*C_UDSI(c,t,TKE)/C_UDSI(c,t,TDR); } end_c_loop(c,t) } } } Another problem, at if (FLUID_THREAD_P(t)) it said structure reference not implemented. I don't know why. |
All times are GMT -4. The time now is 03:55. |