Entropieerzeugung in einem Entropiestrom
Introduction
It is common day experience that gases become warmer on compression. We want to use the simple experiment (figure shown below) of a gas contained in a piston to investigate the properties of heat and entropy closer.
The cylinder is filled with an ideal gas. As the plunger compresses the gas, two heat effects can be observed nearly simultaneously. First, the temperature of the gas increases as long as the plunger moves into the piston, and secondly with a small delay in time, the environment becomes warmer. The latter effect can be explained by the entropy squeezed out of the gas on compression, since an entropy uptake of any body causes its temperature rise. The entropy flux out of the piston corresponds to an isothermal compression while the temperature increase correspond to an adiabatic one. Without any modifications of the experiment, a mixture of both types is observed and the properties of the system can be described only with difficulty.
While the entropy flows through the conductor into the icewater calorimeter, additional entropy is created and both entropies melt some ice. Since ice has a lower density than water, the volume of the icewater mixture decreases on the entropy uptake and the water level in the capillary decreases therefore too. This decrease is larger than expected from the entropy flux out of piston and if the plunger is brought back into its original position, the water level in the capillary does not reach initial its level due to this extra entropy. It is therefore impossible to move the plunger cyclically without generating entropy, even if the plunger moves frictionless.
The Simulation
The JavaApplet simulates the experiment shown below (Details of the simulation may be read be clicking on the corresponding part of the apparatus.). The user can choose from a variety of heat conductors, the amount (amount substance n_{P} and pressure p_{P}) and type (heat capacity c_{V}) of gas in the piston, the velocity of the plunger back and forth and the duration of the simulation.
On starting, the programm will calculate to what extend the temperature of the gas rises and how much entropy flows out of the gas simultaneously. During the entropy flow through the heat conductor the temperature profile of conductor the differential entropy generation are calculated. As the entropy flux of reaches the calorimeter the water level in the capillary is computed. The progress off the simulation can be observed (on request graphically) in the change of many system variables.
An Estimate on the Size of the Effects
An estimate of the level change in the calorimeter can be done in 6 steps:
 The cylinder of the piston is filled with an ideal gas. Since we demand the system to be thermally equilibrated at the beginning of the experiment, both the gas and the heat conductor have the same temperature than the icewater calorimeter (T_{C} = 273.15 K). The gas volume depends then on the filling pressure p_{P} and its amount n_{P}
 Next, the gas in the piston is compressed adiabatically by a factor of f. The work W_{A} and the final temperature T_{A} can be calculated with the standard equations for the adiabatic compression (adiabatic exponent = ).
 The piston can be regarded as small heat engine transforming mechanical work W_{A} into thermal work W_{T}. This thermal work is transferred to the calorimeter by heat conduction. Since we can look at the thermal work as the potential energy of the entropy (W_{T} = S * T), it is possible to calculate the entropy change in the calorimeter S_{C} directly from W_{A}.
 The total entropy S_{C} arriving at the calorimeter causes some ice to melt and lowers so the water level in the capillary .

 (S_{S}: specific entropy of fusion, : density of X, r: capillary radius)

 At the end of the entropy transfer the gas in the piston has again the temperature of the icewater calorimeter . This state can be regarded as the result of an isothermal compression. The maximum entropy release from the piston can therefore be calculated with the equation for isothermal compression.
 Since S_{P} is always smaller than S_{C} on compression experiments, entropy S_{G} must have been created during the entropy flow.
Result: The decrease of the water level in the calorimeter capillary is much larger than expected from the changes in the gas. The heat conductor connecting the piston and the calorimeter creates additional entropy, as the entropy flows from the piston into the calorimeter. This calculation overestimates the entropy generation, since the adiabatic compression temperature T_{A} is never reached due to heat conduction.
quantity  symbol  estimate  simulation  unit 
initial volume  V_{P}  22.711  22.711  l 
max. gas temperature  T_{A}  433.599  433.229  K 
mech. work  W_{A}  2.001  1.998  kJ 
entropy release from piston  S_{P}  5.763  5.759  J/K 
entropy in the calorimeter  S_{C}  7.326  7.314  J/K 
entropy generated  S_{G}  1.653  1.555  J/K 
Results from the example and the simulation.
Worked Example
The table at the top of the page shows the results from a simulation run (n_{P} = 1.0, p_{P} = 1 bar, f = 0.5, v = 100 l/sec, t_{c} = 50000 sec., styrofoam) in comparison with the results calculated with the equations from the previous section.
The simulation fails to reproduce the maximum temperature of the gas T_{A}. Despite the high compression velocity (v = 100 l/sec) some entropy can escape from the piston before the maximum is reached after t = f * V_{p} * v^{1} = 0.11 seconds. Since the temperature is slightly smaller in the simulation, less work W_{A} = 1.998 kJ has to be done to compress the gas. The amount of entropy in the calorimeter S_{C} = 1.998 kJ / 273.15 K = 7.135 J/K is therefore also smaller in the simulation than estimated.
The maximum entropy release from the piston S_{P} does not depend on T_{A} and the difference between the estimated value (n_{P} * R * ln f) and the one from the simulation has therefore an unphysical reason. The quality of the simulation depends strongly on the chosen simulationparameters^{1} and the computer hardware and/or the Java environment. The discrepancy between the estimate and the simulation is caused by a lack of precision. Increasing the numbers of steps per second to 5*10^{5} results in S_{P} = 5.762 J/K and S_{C} = 7.323 J/K ^{2}. An increase in accuracy is therefore paid with the duration of a single simulation. Therefore, the simulation parameters have to be chosen carefully to suit both didactic and numerical demands.
Bugs and Problems
If you manage to annihilate entropy, please do not order your tickets for Stockholm, but check the following simulation details first.
 Did you reach the thermodynamic equilibrium? An indicator ("Thermal equilibrium") in the upper left corner indicates equilibrium situations with the word "yes". And in reverse, the word "no indicates, that equilibrium has not been reached. Equilibrium can always be reached by increasing the time for the second step (input field time2 in the lower right corner).
Equilibrium is reached, when every compartment of the simulation has a temperature in the range of 273.15 0.0005 K. The threshold value of 0.0005 K cannot be changed by the user.  Extraordinary large values for plunger velocities vk1 and vk2 demand very short time steps for the simulation. Velocities about 100 m^{3}/sec require at least to tenfold the number of steps per second ("steps", on the right side of the calorimeter). If the results of a simulation seem to be strange or unphysical, this value needs to be increased prior to a second run.
 Bogus results for the entropy generation S_{C} can be caused by unsuitable values for the number of slabs in the heat conductor ("conductor segments"). In doubt of the quality of the simulation in or decrease the this number to check the convergency of the simulations.
 The default values (conductor segments = 10, steps = 1000) were chosen to for demonstration purposes only. Numerical precision can always be achieved by increasing both values, but both values should be increased simultaneously to avoid computational difficulties. For example, setting conductor segments = 50 requires steps = 10000 to obtain reasonable simulation results for all heat conductors.
In order to maintain the quality of the software we need your feedback. If you find a bug in the software or have a question concerning the software, please contact one of us:
programming  Oliver.Konrad@jobstiftung.de 
general inquiries  Timm.Lankau@jobstiftung.de 
 Parameters used for the example: 10^{5} steps per second and the heat conductor was sliced into 50 steps (default values).
 The slightly larger value for S_{C} is caused by a small increase of T_{A} in the refined simulation.