Thermal expansion of solid body and calculation of work produced From the information about thermal expansion on Wikipedia, I found that if I heat a steel rod that's 1-meter in length and 1-cm in diameter steel rod to 100 degrees Celsius, then it will expand by approximately 1 mm (based on linear expansion coefficient).


Figure 1: Heating a steel rod from $20°\:\rm C$ to $120°\:\rm C$ causes about $1\:\rm mm$ of linear expansion.

Question: How can the work produced by the expansion of the steel rod be calculated?
There are a lot of equations in internet about ideal gas, etc., but not much for solid bodies.

Update 1
The idea is to calculate maximum possible work produced by rod. I assume simplest case, no heat loss, vacuum everywhere, linear thermal expansion only to one direction along rod axis (or we can neglect expansion on other axis, because it is much smaller).
The first law of thermodynamics,
$$W = Q - U$$
where $W \equiv$ work, $Q \equiv$ amount of heat, and $U \equiv$ change of internal energy.
From this perspective the only question is to calculate internal energy. But could I find how to calculate internal energy for the metal (steel) rod given a specific temperature?
UPDATE 2
I did my homework and here is some more calculation. For steel rod 1 m length, 1 cm diameter with initial temperature around 0 °C, if I want to heat it from 0 to 100 °C I will need 28302 joules. Length increase will be 1.2 mm. This rod (based on ultimate strength) can hold max 3927 kg, which will give us work 47 joules. It is 0.167 % of energy which I spend for heating. If I take Kevlar, then efficiency will be more 0.7 %.
Now the question is, if I find some very strong, very light material, with very high thermal expansion, so that efficiency (like shown above) will be more than 100 %. It should not be possible, because of energy conservation law. In this case internal energy will be that main reason of efficiency less than 100 %. How to calculate this internal energy?
You can ask, am I inventing combustion engine with solid body as work body instead of gas. Answer is yes, why not :) Most probably it is not possible, otherwise it would be done already. I just want to understand why it is not possible. Maybe it was proven, that gas is most effective, then it would be good to have a link to the article where it was proven.
 A: When a rod is heated, all the work is produced by the source of the heat and it goes into increasing the internal, thermal and elastic, energy of the rod and into heating of the surrounding air and other objects.
If the rod is not mechanically constrained, the only work it performs, or rather passes along, due to its expansion is against the atmospheric pressure, but this work represents a very small fraction of the total work performed by the source, so it could be neglected. 
This is because the average pressure required to expand a steel rod by 0.1% should be (assuming Young's modulus for steel of $29000000psi$) on the order of $\frac {29000000psi\times 0.001} 2=14500psi$, which is about 1000 times greater than the atmospheric pressure, $14.7psi$. So, only about $0.01\%$ of the work performed (energy spent) by the heat source to expand the rod will be passed to the air.
If the rod was mechanically constrained, a greater fraction of the work or spent energy could be passed along and, given a specific load, we could calculate it. 
For instance, if the rod was supporting a $100kg$ mass, its expansion by $1mm$ would lead to the increase of the potential energy of the mass by $mgh=1J$. Of course, a higher temperature and more energy would be needed to achieve the same $1mm$ expansion under load.  
A: The answer to the new version of the problem you have posed is fairly straightforward to obtain.  The stress-strain behavior for a linearly elastic Hookean material is described in terms of the principal stresses and strains by the equations:
$$\epsilon_1-\alpha \Delta T=\frac{\sigma_1-\nu (\sigma_2+\sigma_3)}{E}$$
$$\epsilon_2-\alpha \Delta T=\frac{\sigma_2-\nu (\sigma_1+\sigma_3)}{E}$$
$$\epsilon_3-\alpha \Delta T=\frac{\sigma_3-\nu (\sigma_1+\sigma_2)}{E}$$
where $\alpha$ is the coefficient of thermal expansion, $\nu$ is the Poisson ratio, E is Young's modulus, the $\sigma$s are the principal stresses and the $\epsilon$s are the principal strains (measured relative to the undeformed state of the rod, when it is totally surrounded by vacuum).  In our analysis, the subscript 1 will represent the direction along the rod axis, and the subscripts 2 and 3 will represent the directions normal to the rod axis.
Initially we place a weight of F=mg on the vertical rod.  In this case, the initial axial stress in the rod is $$\sigma_1^i=-\frac{F}{A}$$while the initial stresses in the other principal directions is zero:
$$\sigma_2^i=\sigma_3^i=0$$This results in initial strains of:$$\epsilon_1^i=-\frac{F}{EA}$$and$$\epsilon_2^i=\epsilon_3^i=+\frac{\nu F }{EA}$$
Next, we raise the temperature by $\Delta T$, while holding the load F (and thus the stresses) constant.  This results in the following values for the final strains:
$$\epsilon_1=-\frac{F}{EA}+\alpha \Delta T$$and$$\epsilon_2=\epsilon_3=+\frac{\nu F}{EA}+\alpha \Delta T$$
So the changes in the strains resulting from heating the rod are all equal to $\alpha \Delta T$.  And the work done by the rod (in raising the weight) is just $$W=Fl_1 \Delta \epsilon_1=Fl_1\alpha \Delta T$$where $l_1$ is the length of the rod in the undeformed configuration.  
This is all very much analogous to the work in isobaric expansion of an ideal gas (although, in this case, the amount of deformation is tiny).
A: You can't have linear expansion in one direction only (say, along the rod axis) just by saying that you do.  If the rod is unconstrained, it will expand equally in all directions.  So, the only way to make sure it only expands along its axis is if you constrain the expansion in the two thickness directions.  
If the rod is unconstrained, the volume change will be $V_0(3\alpha \Delta T)$, where $\alpha$ is the coefficient of linear expansion.  In this case, if p is the pressure surrounding the rod, then the expansion work done will be $pV_0(3\alpha \Delta T)$.  If the rod is surrounded by vacuum, then p = 0, and no expansion work will be done.
