# How to calculate net power output of heated, expanding air?

I'm interested in designing and building a Stirling engine which uses air that has been heated, which expands and then acts upon a piston producing power.

There is a fixed amount of air inside the sealed 2" cylinder, and a relatively stable heat supply. The piston compresses cool air and is powered by the expanding, heated air.

Two questions here:

1. How to find the power needed to compress air inside the 2" diameter cylinder to different depths?

2. Depending on the amount of compression produced by the piston, how does that affect the rate of expansion of the heated air?

If the power needed to compress the air to a certain pressure exceeds the net power output of the expanding air, then the engine won't function. So, I need to calculate the stroke of the piston inside the cylinder to a depth that the engine can use efficiently.

Thanks.

-
A picture of the situation you're trying to describe will help a lot. –  Joshua Jun 9 '14 at 3:58