Hallo,
Am Ende habe ich mich enscheidet mit Define-on-demand Macro zu arbeiten:
/***********************************************************************
UDF to calculate energycoeficient-Zeta field function and store in
user-defined memory. Also print Zeta.
***********************************************************************/
#include "udf.h"
#define k 2078.5
#define p1 110000
DEFINE_ON_DEMAND(on_demand_calc)
{
Domain *d; /* declare domain pointer since it is not passed as an
argument to the DEFINE macro */
real temp,pres,velx,vely,velz;
Thread *t;
cell_t c;
d = Get_Domain(1); /* Get the domain using Fluent utility */
/* Loop over all cell threads in the domain */
thread_loop_c(t,d)
{
/* Loop over all cells */
begin_c_loop(c,t)
{
temp = C_T(c,t); /* get cell temperature */
pres = C_P(c,t);
velx = C_U(c,t);
vely = C_V(c,t);
velz = C_W(c,t);
/* Compute zeta function and store in user-defined memory*/
/*(location index 0) */
C_UDMI(c,t,0) = 1-((velx*velx+vely*vely+velz*velz)/(2*k*temp*(p1/pres-1)));
}
end_c_loop(c,t)
}
}
Leider bekomme ich folgende Error: (s. Anhang)
"Fatal Signal (ACCESS_VIOLATION)
Kann jemand mich helfen?
Eine Antwort auf diesen Beitrag verfassen (mit Zitat/Zitat des Beitrags) IP