From dfe5945cd64715e471333ca3813258762a2b087b Mon Sep 17 00:00:00 2001 From: Ray Speth Date: Fri, 2 Aug 2013 23:17:54 +0000 Subject: [PATCH] [Matlab] Add access to class FlowReactor --- .../matlab/toolbox/@Reactor/setMassFlowRate.m | 4 ++++ interfaces/matlab/toolbox/FlowReactor.m | 14 ++++++++++++++ src/matlab/reactormethods.cpp | 3 +++ 3 files changed, 21 insertions(+) create mode 100644 interfaces/matlab/toolbox/@Reactor/setMassFlowRate.m create mode 100644 interfaces/matlab/toolbox/FlowReactor.m diff --git a/interfaces/matlab/toolbox/@Reactor/setMassFlowRate.m b/interfaces/matlab/toolbox/@Reactor/setMassFlowRate.m new file mode 100644 index 000000000..b6411f685 --- /dev/null +++ b/interfaces/matlab/toolbox/@Reactor/setMassFlowRate.m @@ -0,0 +1,4 @@ +function setMassFlowRate(r, mdot) +% SETMASSFLOWRATE - +% +reactormethods(10, reactor_hndl(r), mdot); diff --git a/interfaces/matlab/toolbox/FlowReactor.m b/interfaces/matlab/toolbox/FlowReactor.m new file mode 100644 index 000000000..9c27e55a3 --- /dev/null +++ b/interfaces/matlab/toolbox/FlowReactor.m @@ -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); diff --git a/src/matlab/reactormethods.cpp b/src/matlab/reactormethods.cpp index 55496f215..05e312a4e 100644 --- a/src/matlab/reactormethods.cpp +++ b/src/matlab/reactormethods.cpp @@ -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"); }