Page 388 - TransAT_Tutorial_Manual
P. 388
TransAT Tutorial Manual 9.2. Forced Convection in an Isothermal Pipe
Part 2: computation The actual computation of the bulk temperature and the Nusselt
number is done in this part. For that, a loop over the wall cells and cross-sections of each block
is used as follows:
ncellsblock = getWallBoundaryNFaces(iblock, direction_top);
for (int icell = 0; icell < ncellsblock; icell++){
...
}
direction top is set to ”ymax” the keyword of the getWallBoundaryNFaces function to get the
number of wall cells at the top boundary of the domain.
In the wall cells loop, the getWallBoundaryValue function is used to get the x-coordinate of
the wall cell/cross-section, the wall temperature and the heat flux through the pipe:
ncellsblock = getWallBoundaryNFaces(iblock, direction_top);
for (int icell = 0; icell < ncellsblock; icell++){
// Get x-coordinate
x = getWallBoundaryValue(iblock, icell, "x", direction_top);
...
// Get wall temperature
Twall = getWallBoundaryValue(iblock, icell, "temperature", direction_top);
...
// Get heat flux
heatflux = getWallBoundaryValue(iblock, icell, "q", direction_top);
}
while the conductivity is accessed through the properties module
// Get conductivity using TransAT’s properties module
properties_initialize(iblock,ii);
lambda = properties_get("lambda");
The following discretised form of Eq. 9.4 is used to get the bulk temperature:
P
u ii T ii ∆y ii
Ω i
(9.5)
T bulk = P
u ii ∆y ii
Ω i
with Ω i the set of cells in the i th cross-section and ii the corresponding cell index.
c
Ascomp AG Switzerland 378 Version 5.7

