cantera/interfaces/matlab/toolbox/@Reactor/Reactor.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

35 lines
748 B
Matlab

function x = Reactor(contents, typ)
% REACTOR - Create a Reactor object.
%
% A Reactor object simulates a perfectly-stirred reactor. It has
% a time-dependent state, and may be coupled to other reactors
% through flow lines or through walls that may expand or
% contract and/or conduct heat.
%
% r1 = Reactor % an empty reactor
% r2 = Reactor(gas) % a reactor containing a gas
%
% See also: Reservoir
%
if nargin == 0
contents = 0;
typ = 2;
elseif nargin == 1
typ = 2;
elseif nargin > 2
error('too many arguments');
end
x.index = reactormethods(0,typ);
if x.index < 0
error(geterr);
end
x.contents = contents;
x = class(x,'Reactor');
if isa(contents,'Solution')
insert(x, contents);
end