cantera/interfaces/matlab/toolbox/@Reactor/setEnergy.m
Ray Speth 2528df0f75 Reorganized source tree structure
These changes make it unnecessary to copy header files around during
the build process, which tends to confuse IDEs and debuggers. The
headers which comprise Cantera's external C++ interface are now in
the 'include' directory.

All of the samples and demos are now in the 'samples' subdirectory.
2012-02-12 02:27:14 +00:00

24 lines
705 B
Matlab

function setEnergy(f, flag)
% SETENERGY - enable or disable solving the energy equation. If the
% energy equation is disabled, then the reactor temperature is
% constant. The parameter should be the string 'on' to enable the
% energy equation, or 'off' to disable it.
%
% By default, Reactor objects are created with the energy equation
% enabled, so usually this method is only needed to disable the
% energy equation for isothermal simulations.
%
% >>> setEnergy(r, 'on');
% >>> setEnergy(r, 'off');
%
iflag = -1
if strcmp(flag,{'on'})
iflag = 1;
elseif strcmp(flag,{'off'})
iflag = 0;
end
if iflag >= 0
reactormethods(9, f.index, iflag)
else
error('input to setEnergy not understood');
end