Imagine we have placed a metal rod between two face-to-face walls so that the rod is just perpendicular to the surface of both walls and the edges of the rod touches each wall. So the length of the rod is initially just the distance between the walls. If I heat up the rod, it will try to expand and exert a force to walls. How can I calculate this force and the pressure exerted by the rod as a function of temperature assuming that the rod will not bend? I guess there must be a linear region where pressure linearly increases with the heat (until the rod deforms severely or melts down or its thickness starts to increase noticeably). What is the size of this linear region? Is it really the exact same case if the rod would be instead a pipe filled with a heated gas or liquid instead of the metal material inside the rod?
[Physics] How to estimate/calculate pressure on the edges of a metal rod as it is heated up and tries to expand
thermodynamics
Related Solutions
Instead of a circular hole, let's think of a square hole. You can get a square hole two ways, you can cut it out of a complete sheet, or you can get one by cutting a sheet into 9 little squares and throwing away the center one. Since the 8 outer squares all get bigger when heat it, the inner square (the hole) also has to get bigger:
Same thing happens with a round hole.
This is confusing to people because the primary experience they have with stuff getting larger when heated is by cooking. If you leave a hole in the middle of a cookie and cook it, yes, the cookie gets bigger and the hole gets smaller. But the reason for this is that the cookie isn't so solid. It's more like a liquid, it's deforming. And as Ilmari Karonen points out, the cookie sheet isn't expanding much so there are frictional forces at work.
We assume the rod to be thin (compared to its length) and uniform in shape and composition because that way the problem can be treated as a one-dimensional ($x$) problem.
The starting point is the (1D) non-homogeneous Fourier heat equation: $$u_t=ku_{xx}+Q(x,t),$$ where $u$ is the spatial and $t$ the time distribution of temperature: $$u(x,t)$$ and $Q(t,x)$ a heat loss function representing convection loss of the rod to the environment.
You are only interested in the steady state solution, so: $$u_t=0$$ With some relevant substitutions we then obtain: $$\frac{\mathbf{d^2}T}{\mathbf{d}x^2}-\frac{Ph}{Ak}(T-T_{\infty})=0,\tag{1}$$ where $T$ is the temperature of the rod, $T_{\infty}$ the surrounding air temperature (assumed constant), $P$ the perimeter of the rod, $A$ its cross-section, $h$ the convection heat transfer coefficient and $k$ the heat conductivity of the rod's uniform material.
Fistly, an easy substitution simplifies things a bit: $$\tau=T-T_{\infty}\tag{2}$$ $$\mathbf{d}\tau=\mathbf{d}T\implies \mathbf{d^2}\tau=\mathbf{d^2}T$$ Insert into $(1)$ to get: $$\frac{\mathbf{d^2}\tau}{\mathbf{d}x^2}-\frac{Ph}{Ak}\tau=0\tag{3}$$ This is a straightforward linear, second order, homogeneous differential equation. But we need two boundary conditions (BC) to obtain a solution.
Firstly, the value of $\tau$ at $x=0$, the heated end: $$\tau(0)=\tau_0$$ For the second BC, we have some choices but a common one is to assume the end of the rod ($x=L$) doesn't conduct heat to the environment, which mathematically means: $$\Big(\frac{\mathbf{d}\tau}{\mathbf{d}x}\Big)_{x=L}=0$$ Solving $(3)$ with the stated BCs and back-substituting with $(2)$ we obtain the temperature profile in function of $x$, in the following form:
$$\frac{T(x)-T_{\infty}}{T_0-T_{\infty}}=\frac{\cosh\big[\big(1-\frac{x}{L}\big)mL\big]}{\cosh(mL)},\tag{4}$$ where: $$m=\sqrt{\frac{Ph}{Ak}}$$ and $T_0=T(0)$.
Setting $x=L$ in $(4)$ then allows to compute the temperature at the cool end of the rod, $T(L)$.
Edit: numerical example based on OP's numbers in comment section.
Based on $(4)$, for $x=L$, then: $$\cosh\big[\big(1-\frac{x}{L}\big)mL\big]=\cosh(0)=1$$ Then: $$T(L)=T_{\infty}+\frac{T_0-T_{\infty}}{\cosh(mL)}$$ OP provided the following data:
$A=0.0078\:\mathrm{m^2}, P=0.314\:\mathrm{m}, h=25\:\mathrm{W/m^2K}, k=50\:\mathrm{W/mK}, L=2\:\mathrm{m}, T_0=100\:\mathrm{C}, T_{\infty}=60\:\mathrm{C}$
This gives a value of:
$$m=4.49\:\mathrm{m^{-1}}$$
And:
$$T(L)=60+\frac{100-60}{\cosh(4.49\times 2)}=60.01\:\mathrm{C}$$
So for a length of $2\:\mathrm{m}$ the other end of the rod is basically at $T_{\infty}$. Play around with other values of $L$.
Best Answer
This module out of the University of Connecticut School of Engineering asks precisely "What are the thermal stresses resulting from an elevated temperature on a round beam fixed at both ends?" They use ANSI 1030, a low carbon steel, as an example material for the beam. Below is the setup (the steel beam fits snugly between two walls and then is heated up from room temperature):
The module gives the following equation for the thermal stress in the x-direction, $\sigma_x$:
$$\sigma_x = \alpha E \left(T - T_{ref}\right)$$
Using the values of $\alpha$, $E$, and $\left(T - T_{ref}\right)$ stated in the problem description, for this example $\sigma_x = 359.7\ MPa$. This is below the yield strength of ANSI 1030 steel, $441\ MPa$, so at this temperature it has not left the linear region of temperature vs. pressure.
Applying this to your own example: you will need to look up the $\alpha$ and $E$ for the specific metal, as these are material dependant constants. Those coupled with the final temperature of the rod vs. what it was before heating $\left(T - T_{ref}\right)$ will allow you to calculate the $\sigma_x$. As long as the $\sigma_x$ is below the yield strength of the material, it will remain in the linear region where the stress/pressure will depend linearly on the temperature of the bar.