We have a piston assembly (filled with gas) connected to a spring. The top of the piston is open to the atmosphere. The gas is reversibly heated to 100C.
This is an example problem in my thermodynamics handbook (Koretsky, Ex 2.9)
The process is reversible and work is then given by
$$ W = -\int^{V_2}_{V_1}PdV $$
The displacement of the spring can be written in terms of the change in volume
$$ x = \frac{V-V_1}{A} = \frac{\Delta V}{A} $$
A force balance on the piston yields
$$ P_{air}A = P_{ext}A + kx $$ $$ P_{air} = P_{ext} + \frac{kx}{A^2}$$
Plugging these equation into the first equation:
$$ W = -\int^{V_2}_{V_1}PdV = -\int^{V_2}_{V_1}P_{ext}dV -\int^{\Delta V = V_2-V_1} _{0}\frac{k \Delta V}{A^2}d({\Delta V} ) $$
$$ W = -P_{ext}(\Delta V) - \frac{k \Delta V^2}{2A^2} $$
Applying the ideal gas law
$$ \frac{P_1V_1}{T_1} = \frac{P_2V_2}{T_2} = \frac{V_2}{T_2}(P_{ext} + \frac{kx}{A^2})$$
and solving this equation will give $V_2$ and the work can be found.
EDIT: The change in internal energy is given by
$$ \Delta u = \int^{T_2}_{T_1}C_pdT = R\int^{T_2}_{T_1}[(A-1) + BT + DT^{-2}]dT $$
$$ \Delta u = R[(A-1)T+\frac{B}{2}T^2 - \frac {D}{T}] | [T_2 T_1] $$ with the parameters for he heat capacity for air from the tables in the book, the internal energy change can be found.
Total heat transfer is then $Q = \Delta u - W$
My question.
How would I model the transient behaviour of the system? The spring's displacement over time as well as the pressure change over time?
EDIT: Fixed a integration error in the 6th formula.