[Matlab] Add support for additional reactor types

Matlab interface now supports ConstPressureReactor, IdealGasReactor, and
IdealGasConstPressureReactor.
This commit is contained in:
Ray Speth 2013-07-31 18:14:47 +00:00
parent 03786fd07b
commit cc75faf402
3 changed files with 51 additions and 0 deletions

View file

@ -0,0 +1,16 @@
function r = ConstPressureReactor(contents)
% CONSTPRESSUREREACTOR - Create a ConstPressureReactor object.
%
% A ConstPressureReactor is an instance of class Reactor where the pressure
% is held constant. The volume is not a state variable, but instead takes
% on whatever value is consistent with holding the pressure constant.
%
% r1 = ConstPressureReactor % an empty reactor
% r2 = ConstPressureReactor(gas) % a reactor containing a gas
%
% See also: Reactor
%
if nargin == 0
contents = 0;
end
r = Reactor(contents, 4);

View file

@ -0,0 +1,19 @@
function r = IdealGasConstPressureReactor(contents)
% IDEALGASCONSTPRESSUREREACTOR - Create an IdealGasConstPressureReactor object.
%
% An IdealGasConstPressureReactor is an instance of class Reactor where the
% pressure is held constant. The volume is not a state variable, but
% instead takes on whatever value is consistent with holding the pressure
% constant. Additionally, its governing equations are specialized for the
% ideal gas equation of state (and do not work correctly with other
% thermodynamic models).
%
% r1 = IdealGasConstPressureReactor % an empty reactor
% r2 = IdealGasConstPressureReactor(gas) % a reactor containing a gas
%
% See also: Reactor
%
if nargin == 0
contents = 0;
end
r = Reactor(contents, 6);

View file

@ -0,0 +1,16 @@
function r = IdealGasReactor(contents)
% IDEALGASREACTOR - Create an IdealGasReactor object.
%
% An IdealGasReactor is an instance of class Reactor where the governing
% equations are specialized for the ideal gas equation of state (and do not
% work correctly with other thermodynamic models).
%
% r1 = IdealGasReactor % an empty reactor
% r2 = IdealGasReactor(gas) % a reactor containing a gas
%
% See also: Reactor
%
if nargin == 0
contents = 0;
end
r = Reactor(contents, 5);