From the flow diagram below we see that the
main program sea (stirling engine analysis) 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 nine functions,
all contained in separate m-files as shown. The four main functions
are hotsim and kolsim to respectively evaluate the heater and cooler gas
temperatures, regsim to evaluate the regenerator effectiveness and resulting
enthalpy loss, and worksim
to evaluate the pumping loss. Function reynum evaluates the instantaneous Reynolds Number, and the
remaining three functions, pipefr,
foilfr, and matrixfr
are used to determine the various flow friction and heat transfer
coefficients. As before these can be directly copied from this
website and used in a system which has MATLAB installed.

The dynamics of the solution algorithm lies in
function simple, as shown in the following flow diagram. Thus the
function set 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.
__________________________________________________________________________