Notes On Setting Up A 2D Axisymmetric Calculation: 1 © 2015 ANSYS, Inc
Notes On Setting Up A 2D Axisymmetric Calculation: 1 © 2015 ANSYS, Inc
Calculation
This solution will outline some of the key points to pay attention
to.
Entrance boundary
(velocity inlet) Exit boundary
• 2 [m/s] (pressure outlet)
• 400 [K]
Central axis
#include “udf.h”
DEFINE_ON_DEMAND(enthalpy)
{
Domain *d=Get_Domain(1);
Thread *t=Lookup_Thread(d,3); /* Exit boundary ID */
Thread *t2=Lookup_Thread(d,2); /* Fluid region ID */
real area,h,mdot,h_all,h_all2,vol,a[ND_ND];
area=0.0;
h=0.0;
mdot=0.0;
Message(“\n \n”);
face_t f;
begin_f_loop(f,t)
Exit flow rate is
{
F_AREA(a,f,t); integrated value of
area += NV_MAG(a)*2.0*acos(-1.0);
mdot += F_FLUX(f,t)*2.0*acos(-1.0); F_FLUX(f,t) x 2π
h += F_H(f,t)*F_FLUX(f,t)*2.0*acos(-1.0);
}
end_f_loop
Message(“outlet = : %f %f %f \n \n”, area, mdot, h); Volume of the whole
cell_t c; area is the integrated
h_all=0.0;
h_all2=0.0;
vol=0.0;
value of
begin_c_loop(c,t2)
{
C_VOLUME(c,t) x 2π
h_all += C_H(c,t2) *C_VOLUME(c,t2)*C_R(c,t2)*2.0*acos(-1.0);
h_all2 += C_CP(c,t2)*(C_T(c,t2)-298.15) *C_VOLUME(c,t2)*C_R(c,t2)*2.0*acos(-1.0);
vol += *C_VOLUME(c,t2)*2.0*acos(-1.0);
}
end_c_loop(c,t2)
Message (“volume = : %f %f %f \n \n “, h_all,h_all2,vol);
}
Unsteady
calculation