[Matlab] Add access to class FlowReactor

This commit is contained in:
Ray Speth 2013-08-02 23:17:54 +00:00
parent ea3ac2fc91
commit dfe5945cd6
3 changed files with 21 additions and 0 deletions

View file

@ -0,0 +1,4 @@
function setMassFlowRate(r, mdot)
% SETMASSFLOWRATE -
%
reactormethods(10, reactor_hndl(r), mdot);

View file

@ -0,0 +1,14 @@
function r = FlowReactor(contents)
% FLOWREACTOR - Create a FlowReactor object.
%
% A reactor representing adiabatic plug flow in a constant-area duct.
%
% r1 = FlowReactor % an empty reactor
% r2 = FlowReactor(gas) % a reactor containing a gas
%
% See also: Reactor
%
if nargin == 0
contents = 0;
end
r = Reactor(contents, 3);

View file

@ -57,6 +57,9 @@ void reactormethods(int nlhs, mxArray* plhs[],
case 9:
iok = reactor_setEnergy(i, int(v));
break;
case 10:
iok = flowReactor_setMassFlowRate(i, v);
break;
default:
mexErrMsgTxt("unknown job parameter");
}