One of the main purposes of this course is to develop a computer simulation of a Stirling engine. Before any simulation can take place we need to define a specific configuration. Thus we need to specify the type and geometry of the engine, the three heat exchangers, the working gas and the operating conditions. Once these have been specified then we can go to three levels of simulation: an isothermal Schmidt analysis, an Ideal Adiabatic analysis, and a Simple analysis to evaluate the effect of non ideal heat exchangers.
In this section we consider the function 'define', which includes the system definition and the Schmidt analysis. The program system is written in the ANSI C language and currently resides under the UNIX operating system on a SUN Sparc10 workstation 'condor' at Ohio University. You must be a registered student to have a logon to Condor and the Ohio U. compiler.
Consider first the functional block diagram of the function set 'define', which has three main purposes:
The seventeen functions comprizing the set are included in the six files: 'define.c', 'engine.c', 'heatex.c', 'regen.c', 'gas.c', and 'operat.c'. All the global variables required for the simulation are declared in the header file 'define.h', and the main purpose of invoking 'define' is to assign values to these global variables. Notice that there are only two engine configurations specified: 'sinedr()' for a basic sinusoidal drive and 'yokedr()' for a Ross yoke-drive machine. Similarly the heat exchangers and regenerator have a limited set of options. This is a tutorial system and user is expected to augment it as required for any specific requirements. To this end the program system has been written in a universal and uniform style with strict rules regarding structure, variable names, and commenting, thus making it a self documenting system.
The system can be tested by compiling it with the main function module in the file 'stimdef.c'. It is an arduous task to compile and recompile a large system of functions, hence we use the 'make' command available in UNIX systems. It has the advantage of automatically recompiling only those functions which have been modified since the previous compilation. Use of this command requires the existance of a special file named 'makefile' which contains the relevant compilation and linking options. The 'makefile' shown in the 'define' directory will compile and link the system according to the scheme shown in the above diagram. For more information on 'makefile' refer to the book "Managing Projects with make", by Andrew Oram and Steve Talbot.
A typical execution output of the program is saved as 'print.data'. Not very exciting, however recall that this set of routines were not designed to be executed independently, but as a precursor to the Ideal Adiabatic simulation or the Simple simulation routines, which will be discussed in detail later.
One of the tasks will be to augment the various modules to simulate and design the specific engine desired. Currently the engine modules are for Alpha machines, including a Sinusoidal drive and a Ross Yoke-drive machine. The heat exchanger types include tubular, annular gap, and slot heat exchangers, and the regenerator matrix types include screen mesh and rolled foil matrices. Working gas types include air, helium, and hydrogen.
__________________________________________________________________________