SNAPpro

SNAPpro : Stirling Numerical Analysis Program

© 2003, 2010, 2018 Alan Altman All Rights Reserved

ABSTRACT

A complete re-write of SNAP, Stirling Numerical Analysis Program has been undertaken to expand it's capabilities, improve accuracy, speed up optimizations, provide an improved interface and expanded and improved graphical outputs.

Major additions include the following: Free-piston dynamics have been integrated into the program so this additional class of engine can be simulated. Clearance and lip seal losses have been included so that this important loss can be factored into new designs at an early stage. Forced work to the crankcase is included for kinematic engines. The ability to use both metric and English units has been added for those not yet comfortable with the metric system.

The graphing outputs have been expanded. For free-piston engines any parameter can be varied with power, efficiency, phase, piston stroke and the geometric constraint displayed across that parameter's range. For kinematic engines three curves for one parameter as a function of a second parameter can be run with power and efficiency displayed as a set of curves. Particle trajectories, PV diagrams and losses and heat inputs are also displayed graphically.

The genetic algorithm has been streamlined, it can optimize up to 20 parameters at one time then display the best 50 results, any of which can be put into SNAP for graphing and further evaluation. This version runs ten times faster than its predecessor and will handle free-piston as well as kinematic engines.

SNAP is written in Excel and can be run on Windows, Lindows or Mac systems. User modification of the code is still easy, but is hidden for normal use to allow a clearer, cleaner user interface. A variety of data analysis, graphing and other tools in Excel are also available.

INTRODUCTION

SNAP was written in 1999/2000 to provide an economical user modifiable Stirling engine design program. Constant incremental improvements over the last four years have become the basis for a total rewrite of SNAP. Every equation was re-evaluated and compared to more recently published works. The interface is totally new to provide feedback for every change on the same screen. Graphic display of results has been expanded and improved to make engine performance easier to absorb at a glance as well as identify design areas that might benefit from modification.

SNAP PEDIGREE

To those unfamiliar with the last versions (1,2,3), SNAP is based on the work of the late Dr. Martini (4,5). The free-piston portions and clearance seal equations are based on Dr. Berchowitz's linear analysis (6,7). Forced work to the crankcase is based on Dr.Senft's work (8,9). Heat transfer is based on various correlations including the analysis of regenerators by Dr.Thomas (10,11). Lip equations contributed by Rob McConaghy (private correspondence). Particle trajectories based on Dr. Organ and Urieli (12,13).Genetic algorithm based on description from an expired webpage (14). SNAP has been validated against the RE-1000 (15), Andy Ross's engines (16) as well as used to design a series of engines in current development including prediction and validation of results through an ongoing component by component modification program (unpublished proprietary data).

INTERFACE LOGIC

SNAP uses a series of Dropdown lists to set up basic design decisions and operating conditions. Numerical data is entered in color coded boxes whose descriptions and units are only visible if needed for the current configuration to reduce confusion (Fig. 1, 2). Note that to the right of each input block is a similar block showing the major and minor output values that would be affected by these inputs Output power and efficiency are also visible from each page.

Graphical outputs have been expanded to include improved graphs that allow engine sensitivity to be graphed as a function of any single parameter for free-piston engines (Fig 3). Power, efficiency, frequency, oscillation criterion, phase lag and stroke ratio are then displayed over the parameters range. The graphs are modified for kinematic engines to generate a series of curves for any 2 parameters (Fig.4). Power and efficiency are displayed for 3 values of one parameter over a range of values specified for the second parameter. Both graphs allow a choice of the most likely to use graphing parameters in a dropdown box or the specification of any input in the program. Additionally loss/heat input and PV diagrams are displayed (Fig 5,6) Particle trajectories have also been added in order to assess exchanger and regenerator performance from the standpoint of excess dead volumes (Fig 7). All screen shots are from the beta version and the final program may be modified slightly.

SNAP OPTIMIZATION

The optimization in SNAP is based on a custom written genetic algorithm contained within the program (Fig 8). The genetic algorithm can vary up to 20 parameters within specified ranges. The only user inputs is the cell row number of the parameter and its range limits, check boxes are used to specify integer only values if desired. The description is automatically inserted and acts as a check to catch erroneous inputs. Execution has been improved by a factor of 10 from the previous version as a result of better coding and program control. The number of cycles run is user specified. There is a built-in selection of hard constraints and target functions as well as the option to specify custom ones for either or both. Any of the best 50 outputs can be placed in SNAP and graphs generated if desired. Execution time on my 225 Mhz G3 for a free-piston engine with 10 variables is about 6 minutes for 1000 iterations, enough to attain optimized solutions, kinematic cases are somewhat more rapid.. Newer and faster computers will run several thousand iterations in under a minute making it practical to attempt optimization at an early stage in the design process.

ADDITIONAL DETAILS OF INTEREST

Further improvements include improved stability in the iterative loops including the option to recover from accidental crashes (such as inputting a zero in an unfortunate location) without any loss of data or unsaved setups. Internal error checking for non-convergent cases, undersized heat exchangers and free-piston engines that do not oscillate are built-in. These cases output sufficient data to allow determination of the engine design elements needing modification.

Metric and English units are supported in this version giving another option to those not comfortable using the metric system.

SNAP runs under Excel 98 or newer on Mac and PC platforms, it should also run under Lindows with Excel. All of Excel's built-in functionality is available allowing further data analysis, sensitivity studies and graphing capabilities. The ability to modify SNAP to meet differing user requirements is included though hidden to present a cleaner and clearer interface until needed.

CONCLUSIONS

A new expanded and improved version of SNAP has been written. SNAP is based on the best available equation and correlations published to date. It offers an easier to use interface, improved graphical outputs and a much faster optimization algorithm. Validation using published engine results and directly from design and component level improvements in an ongoing engine program has been done.

Fig.1 Input and matching output blocks for a free-piston engine, note N/A for parameters calculated for free-piston engines

Fig. 2 Additional screen shot illustrating input and output block configuration, note power and efficiency are repeated in each screen so that they can be monitored during optimization

Fig. 3 Main graphs, this example for a free-piston engine graphing performance with a varying value of load damping. There are 3 built-in combinations for free-piston and kinematic engines plus the ability to input custom graphing by just specifying the cell numbers of the desired parameters

Fig. 4 Graphing for a kinematic engine

Fig. 5 Graphical depiction of losses (heat input breakdown also available)

Fig. 6 PV diagrams referenced to mean pressure plus volumes and pressure vs. crank

Fig. 7 Particle trajectories map as a function of mass on the x - axis. Note some gas doesn't leave the regenerator during the cycle, perhaps it could be decreased in volume

Fig. 8 Genetic algorithm sheet, only cell numbers and minimum/maximum limits need be input to start optimizing an engine. The hard constraint and target function can be selected from a list or alternately custom functions can be input.

REFERENCES

1) Altman, A. SNAP - A Stirling Numerical Analysis Program with User Modifiable Code 36th InterSociety Energy Conversion Engineering Conference 2001

2) Altman, A. SNAP 2002 Stirling Numerical Analysis Program A Second Gerneration Program 37th InterSociety Energy Conversion Engineering Conference 2002

3) Altman, A. SNAP previous website

4) Martini, W.R. Stirling Engine Design Manual 1st Edition NASA/DOE/3152-78/2 NASA CR-135382 ,1978

5) Martini, W.R. Stirling Engine Design Manual 2nd Edition NASA/DOE/3194-1 NASA CR-168088 ,1983

6) Urieli,I & Berchowitz,D.M. Stirling Cycle Engine Analysis Adam Hilger Ltd 1984

7) Berchowitz,D.M. Linear Dynamics of Free-Piston Stirling Engines Proceedings Institution of Mechanical Engineers Vol 199 No A3 1985

8) Senft, J. Extended Mechanical Efficiency Theorems for Engines and Heat Pumps International Journal of Energy Research 2000

9) Senft, J. Optimum Stirling Engine Geometry International Journal of Energy Research 2002

10) Thomas, B. Evaluation of 6 Different Correlations for the Flow Friction Factor of Stirling Engine Regenerators 34th InterSociety Energy Conversion Engineering Conference 1999

11) Thomas, B. Evaluations of 5 Different Correlations for the Heat Transfer in Stirling Engine Regenerators Proceedings of the European Stirling Forum 2000

12) Organ, A. The Regenerator and the Stirling Engine Mechanical Engineering Publications Ltd. 1992

13) Urieli, I. website at Ohio University since changed

14) Jacob, C. expired website

15) Schreiber, J. et al RE-1000 Free-Piston Stirling Engine Sensitivity Test Results DOE/NASA/1005-11 NASA TM-88846 1986