Skip to content

Commit

Permalink
Fixed Matlab legacy examples and added missing blank lines.
Browse files Browse the repository at this point in the history
Added Su Sun to AUTHORS.
  • Loading branch information
ssun30 authored and ischoegl committed Dec 15, 2022
1 parent 6042429 commit 2ce92ea
Show file tree
Hide file tree
Showing 12 changed files with 31 additions and 13 deletions.
1 change: 1 addition & 0 deletions AUTHORS
Original file line number Diff line number Diff line change
Expand Up @@ -64,3 +64,4 @@ Armin Wehrfritz (@awehrfritz)
Richard West (@rwest), Northeastern University
Chao Xu (@12Chao), Northeastern University
Thorsten Zirwes (@g3bk47), Karlsruhe Institute of Technology
Su Sun (@ssun30), Northeastern University
2 changes: 1 addition & 1 deletion interfaces/matlab/toolbox/@ThermoPhase/private/phase_get.m
Original file line number Diff line number Diff line change
Expand Up @@ -5,4 +5,4 @@
i = ctmethods(30, n, job, a);
else
i = ctmethods(30, n, job, a, b);
end
end
2 changes: 1 addition & 1 deletion interfaces/matlab/toolbox/@ThermoPhase/private/phase_set.m
Original file line number Diff line number Diff line change
Expand Up @@ -5,4 +5,4 @@ function phase_set(n, job, a, b)
ctmethods(30, n, -job, a);
else
ctmethods(30, n,-job, a, b);
end
end
Original file line number Diff line number Diff line change
Expand Up @@ -13,4 +13,4 @@
i = ctmethods(20, n, -job, a, b, c, d, e);
elseif nargin == 8
i = ctmethods(20, n, -job, a, b, c, d, e, f);
end
end
2 changes: 1 addition & 1 deletion samples/matlab/ignite_hp.m
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ function ignite_hp(gas)
help ignite_hp

if nargin == 0
gas = Solution('h2o2.yaml', 'gas', 'None');
gas = Solution('h2o2.yaml', 'ohmech', 'None');
end

mw = molecularWeights(gas);
Expand Down
2 changes: 1 addition & 1 deletion samples/matlab/ignite_uv.m
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ function ignite_uv(gas)
help ignite_uv

if nargin == 0
gas = Solution('h2o2.yaml', 'gas', 'None');
gas = Solution('h2o2.yaml', 'ohmech', 'None');
end

mw = molecularWeights(gas);
Expand Down
2 changes: 1 addition & 1 deletion samples/matlab/prandtl1.m
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ function prandtl1(g)
if nargin == 1
gas = g;
else
gas = Solution('h2o2.yaml', 'gas', 'Mix');
gas = Solution('h2o2.yaml', 'ohmech', 'Mix');
end

pr = zeros(31,31);
Expand Down
2 changes: 1 addition & 1 deletion samples/matlab/prandtl2.m
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ function prandtl2(g)
if nargin == 1
gas = g;
else
gas = Solution('h2o2.yaml', 'gas', 'Multi');
gas = Solution('h2o2.yaml', 'ohmech', 'Multi');
end

pr = zeros(31,31);
Expand Down
2 changes: 1 addition & 1 deletion samples/matlab/reactor1.m
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ function reactor1(g)
if nargin == 1
gas = g;
else
gas = Solution('h2o2.yaml', 'gas', 'None');
gas = Solution('h2o2.yaml', 'ohmech', 'None');
end

P = oneatm;
Expand Down
2 changes: 1 addition & 1 deletion samples/matlab/reactor2.m
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ function reactor2(g)
if nargin == 1
gas = g;
else
gas = Solution('h2o2.yaml', 'gas', 'None');
gas = Solution('h2o2.yaml', 'ohmech', 'None');
end

% set the initial conditions
Expand Down
6 changes: 3 additions & 3 deletions samples/matlab/surfreactor.m
Original file line number Diff line number Diff line change
Expand Up @@ -57,9 +57,9 @@
p0 = pressure(r);
names = {'CH4','CO','CO2','H2O'};
x = zeros([nSteps 4]);
tim = zeros(nSteps);
temp = zeros(nSteps);
pres = zeros(nSteps);
tim = zeros(nSteps, 1);
temp = zeros(nSteps, 1);
pres = zeros(nSteps, 1);
cov = zeros([nSteps nSurfSp]);
t = 0;
dt = 0.1;
Expand Down
19 changes: 18 additions & 1 deletion samples/matlab/test_examples.m
Original file line number Diff line number Diff line change
@@ -1,12 +1,29 @@
% runs selected examples without pausing

clear all
close all
cleanup

equil();
isentropic();
reactor1();
reactor2();
surfreactor;
periodic_cstr;
Plug_Flow_Reactor;
lithium_ion_battery
rankine(300.0, 2.0*oneatm, 0.8, 0.7);
prandtl1();
prandtl2();
flame1;
flame2;
catcomb;
exit;
clear all
close all
diffflame;
ignite_hp;
ignite_uv;

clear all
close all
cleanup

0 comments on commit 2ce92ea

Please sign in to comment.