Hi, Higashi here.
In my last U-bend simulation, I sped up the air at the inlet and slowed it back down. Even when the inlet speed reached zero, some air was still moving around the bend. This time I wanted to see what would happen if I heated and cooled the incoming air as well.
Does the air near the outlet get hottest at the same instant as the air coming in? And when the inlet is back at 300 K, where is the warm air that entered a moment earlier?
Changing the inlet speed and temperature together
I used the same U-shaped duct with a 6 mm × 6 mm square cross section. At the start, the air throughout the duct is at rest at 300 K (about 27 °C). Over the first 0.1 s, the inlet speed rises linearly from 0 to 2 m/s while the inlet temperature rises from 300 K to 350 K (about 77 °C). Over the next 0.1 s, both ramp back down, reaching 0 m/s and 300 K together. I ran five of these cycles.
The outlet is at atmospheric pressure, and the walls are insulated. The 0.5 mm mesh has 19,872 fluid cells. I kept the RNG k–ε turbulence model from the previous simulation. Does the Air in a U-Bend Stop When the Inlet Flow Stops?
The new part of the Python solver tracks where the heat goes. At each time step, warm air carries energy from one cell to the next, and heat also spreads between cells at different temperatures. I kept the air density and other properties constant, so the flow carries the heat and the speed field is the same as in the earlier animation. To study how thermal expansion or buoyancy changes the flow, the temperature would also need to feed back into the flow calculation.
Follow the warm air around the bend
The two panels show the same horizontal slice at the same instant. Speed is on top and temperature is underneath. Air enters at the lower left, turns around on the right, and leaves at the upper left. Watch the bright band in the lower panel. It shows where the warmer air is as it works its way toward the outlet.

Compare 0.05 s and 0.15 s in the first cycle. The inlet reads 1 m/s and 325 K both times. At 0.05 s, the air near the outlet is still at about 300 K. At 0.15 s, its average temperature has climbed to 345.9 K, about 21 K warmer than the air entering the duct. By then the inlet is cooling down, but the warmer air that came in earlier is passing the outlet.
| Time | Inlet speed | Inlet temperature | Bend probe A | Near-outlet mean |
|---|---|---|---|---|
| 0.05 s | 1.0 m/s | 325 K | 300.1 K | 300.0 K |
| 0.10 s | 2.0 m/s | 350 K | 340.4 K | 325.9 K |
| 0.15 s | 1.0 m/s | 325 K | 337.7 K | 345.9 K |
| 0.20 s | 0.0 m/s | 300 K | 327.6 K | 333.2 K |
Probe A is a single point near the outer wall of the bend. For the “near-outlet mean,” I averaged the cell temperatures across a section 0.25 mm upstream of the outlet, weighting each cell by area. That gives me a temperature for the air still inside the duct even at the instant the net flow through both openings is zero.
How far apart are the inlet and outlet temperature peaks?

In the first cycle, the inlet reaches 350 K at 0.100 s. Probe A follows at 348.9 K at 0.118 s, and the near-outlet mean peaks at 346.3 K at 0.143 s. The gap between the inlet and near-outlet peaks is about 0.043 s. The air near the outlet starts warming earlier, though. The mean there has already reached 325 K by about 0.099 s.
When the inlet returns to 300 K at 0.20 s, the near-outlet mean is still 333.2 K (about 60 °C). The next cycle starts with that temperature distribution still in the duct. By the fifth cycle the near-outlet peak is 346.4 K, about 0.042 s after the inlet peak.
So why is the downstream peak lower and rounder even with insulated walls? The average includes air that took faster and slower paths through the duct. Heat also spreads between cells. Some of the smoothing comes from the 0.5 mm grid and the first-order upwind scheme used in the calculation.
The inlet averages 325 K over time. What temperature does the incoming air average?
The inlet temperature spends just as long rising as it does falling, so its time average is 325 K. But when the inlet is hottest, at 350 K, the speed is also at its maximum of 2 m/s. When it gets back to 300 K, the speed is zero. More air enters during the warmer part of the cycle. To account for that, I multiplied the inlet temperature at each step by the volume of air that entered during that step, summed the results, and divided by the total inlet volume of 36.0 mL. The flow-weighted inlet temperature is 333.3 K.
I split the second into 25,000 time steps. On my PC, time integration took 3 min 1 s, or 3 min 12 s including mesh generation, initial compilation, and saving the results. I also checked the heat balance using 300 K as the reference. A net 1.4221 J entered through the inlet and 1.3392 J left through the outlet. The remaining 0.0829 J matched the energy stored in the duct air after one second. Repeating the first cycle with half the time step changed the near-outlet mean temperature by at most 0.028 K.
My favorite frame is the one where the inlet display first drops back to 300 K. The inlet cycle is over, yet the air near the outlet is still around 60 °C. With both maps showing the same instant, you can see where that earlier pulse of warm air ended up.
How does the Python solver pass heat from one cell to the next?
This is the calculation at the shared face between two cells. excess is the temperature above 300 K. flow is the volume flow rate through the face, positive from cell i to cell j. The first two terms use the temperature on the upstream side. The last term accounts for diffusion across the face. The solver adds the result to one cell’s net outward flux and subtracts it from the other’s, so what leaves one cell enters its neighbor.
conductance = diffusivity * area[face] / distance[face]
flux = (max(flow, 0.0) * excess[i] + min(flow, 0.0) * excess[j]
+ conductance * (excess[i] - excess[j]))
net[i] += flux
net[j] -= flux
I assumed an air density of 1.177 kg/m³, a specific heat capacity at constant pressure of 1,007 J/(kg·K), and a thermal conductivity of 0.0263 W/(m·K). The effective thermal diffusivity includes molecular diffusion and a turbulent contribution calculated from the RNG k–ε eddy viscosity with a turbulent Prandtl number of 0.85. I set the normal diffusive heat flux at the outlet to zero. Wherever air flowed back in through the outlet, it entered at the ambient temperature of 300 K. OpenFOAM documentation on passive scalar transport


コメント