0% found this document useful (0 votes)
63 views9 pages

Notes On Setting Up A 2D Axisymmetric Calculation: 1 © 2015 ANSYS, Inc

Uploaded by

fadora2n
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
63 views9 pages

Notes On Setting Up A 2D Axisymmetric Calculation: 1 © 2015 ANSYS, Inc

Uploaded by

fadora2n
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 9

Notes on Setting up a 2D Axisymmetric

Calculation

1 © 2015 ANSYS, Inc.


Description

Care must be taken in handling UDF macros etc. in a two-


dimensional axisymmetric calculation.

This solution will outline some of the key points to pay attention
to.

2 © 2015 ANSYS, Inc.


Example
Fluid: air
• Density: 1.225 [kg/m3]
• Specific heat: 1006.43 [J/kg/K]
• Thermal conductivity: 0.0242 [W/m/K]

Entrance boundary
(velocity inlet) Exit boundary
• 2 [m/s] (pressure outlet)
• 400 [K]

Central axis

3 © 2015 ANSYS, Inc.


Flux report at Convergence

mass flow rate = U x ρ x πR2 Heat flux = (U x ρ x πR2) x Cp x (T-298.15)


= 2 [m/s] x 1.225 [kg/m3] x π(3 [m])2 = 69.272119 [kg/s] x 1006.43 [J/kg/K] x
= 69.272119 [kg/s] 101.85 [K]
= 7100731.3 [W]
Note: Flux report outputs flux in a circular cross section

4 © 2015 ANSYS, Inc.


Area/Volume using Volume Integral
SurfaceVolume Integral

Area = πR2 = 28.27433 [m2] Volume = area x length = 282.7433 [m3]

Note: Circular cross section area and columnar volume are


displayed

5 © 2015 ANSYS, Inc.


UDF Macros

F_AREA(a,f,t): area vector


These macros yield a value per 1
F_FLUX(f,t): Mass flux [rad]. Multiplying by 2π will get the
value in the circular cross section (or
cylinder)
C_VOLUME(c,t): Cell volume

The cell volumes also are per 1 [rad]

6 © 2015 ANSYS, Inc.


Exit area (circular) is the
UDF Macros integrated value of a x 2π

#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);
}

7 © 2015 ANSYS, Inc.


Mass Flow Inlet
Designate the mass flow rate for the circular cross-section

Mass flow/Circular cross section area/density becomes:


69.27212 / (π x 32)/ 1.225
2 [m/s]

8 © 2015 ANSYS, Inc.


Source Terms
Specify the source terms per unit volume

Unsteady
calculation

Inflow from entrance + (cylinder volume x source per unit volume)


= 69.272119 [kg/s] + (π x 32 x 10) [m3] x 1 [kg/m3/s]
=352.01546 [kg/s]  Matches the exit flow

Note: Using C_VOLUME(c,t) in the source term (UDF) requires caution


since it is volume per radian

9 © 2015 ANSYS, Inc.

You might also like