forked from Brun0P/Chemical-Equilibrium
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathReactor.m
41 lines (32 loc) · 1.18 KB
/
Reactor.m
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
classdef Reactor
%Reactor
% Detailed explanation goes here
properties
Reactions % Array of Reaction objects
NReactions % Number of reactions
N0 % Array with nitial number of moles of each compound
P % Pressure of the system
T0 % Initial temperature of the system
Tf % Final temperature of the system
Keq % Array with the reaction equilibrium constants
end
methods
function obj = Reactor(Reactions, N0, P, T0, Tf)
%Reactor Construct an instance of this class
obj.Reactions = Reactions;
obj.NReactions = length(Reactions);
obj.N0 = N0;
obj.P = P;
obj.T0 = T0;
obj.Tf = Tf;
obj.Keq = CalculateKeq(obj, Reactions);
end
end
methods (Access = private)
function Keq = CalculateKeq(obj, Reactions)
% Por enquanto calcular só do primeiro
rxntest = Reactions(1).Compounds
keyboard
end
end
end