From the flow diagram below we see that the main program 'stim'
first defines the system to be simulated in terms of the set of
global variables set up by the 'define'
set of functions, as described previously. It then invokes either
the function 'adiabatic'
which does an Ideal Adiabatic simulation, or the function 'simple'
to do a Simple simulation to evaluate the heat transfer and pressure
drop loss effects. Function set 'simple' includes ten functions,
which are all declared in the header file 'simple.h'. The four
main routines are 'hotsim'
and 'kolsim'
to respectively evaluate the heater and cooler gas temperatures,
function 'regsim'
to evaluate the regenerator effectiveness and resulting enthalpy
loss, and function 'wrksim'
to evaluate the pumping loss. Function 'minmax'
is used to determine the heat transferred in a single blow though
the regenerator. Function 'reynum'
evaluates the instantaneous Reynolds Number, and the remaining
three functions, 'pipfr', 'foilfr',
and 'matfr' are used to determine
the various flow friction and heat transfer coefficients.

The dynamics of the solution algorithm lies in function 'simple',
as shown in the following flow diagram. Thus the function 'define'
specifies the operating conditions, including the temperature
bounds Th and Tk. Since the temperature bounds of the working
gas affect both the power output and efficiency, the simple routine
invokes 'adiab',
'hotsim',
and 'kolsim'
in a loop until convergence of the gas temperatures is attained.

Notice that there are a limited number of heat exchanger configurations specified. As before, it is intended that the user will modify and augment this system as required for specific systems, and as more updated heat transfer correlation data becomes available. __________________________________________________________________________
__________________________________________________________________________