mirror of
https://github.com/Cantera/cantera.git
synced 2025-02-25 18:55:29 -06:00
Fixed some Examples
This commit is contained in:
parent
c9a4004ab5
commit
c96fd2cd15
@ -48,7 +48,8 @@ function f = flame(gas, left, flow, right)
|
|||||||
f.setProfile(2, {'u', 'V'}, [0.0 1.0
|
f.setProfile(2, {'u', 'V'}, [0.0 1.0
|
||||||
mdot0/rho0 -mdot1/rho0
|
mdot0/rho0 -mdot1/rho0
|
||||||
0.0 0.0]);
|
0.0 0.0]);
|
||||||
f.setProfile(2, 'T', [0.0 z1 1.0; t0 2000.0 t1]);
|
f.setProfile(2, 'T', [0.0, 1.0
|
||||||
|
t0, t1]);
|
||||||
|
|
||||||
for n = 1:gas.nSpecies
|
for n = 1:gas.nSpecies
|
||||||
nm = gas.speciesName(n);
|
nm = gas.speciesName(n);
|
||||||
@ -63,11 +64,11 @@ function f = flame(gas, left, flow, right)
|
|||||||
else
|
else
|
||||||
y1 = yeq(n);
|
y1 = yeq(n);
|
||||||
end
|
end
|
||||||
f.setProfile(2, nm, [0, z1, 1
|
f.setProfile(2, nm, [0, 1.0
|
||||||
left.massFraction(n), yint, y1]);
|
left.massFraction(n), y1]);
|
||||||
end
|
end
|
||||||
|
|
||||||
% set minimal grid refinement criteria
|
% set minimal grid refinement criteria
|
||||||
f.setRefineCriteria(2, 10.0, 0.8, 0.8);
|
f.setRefineCriteria(2, 10.0, 0.8, 0.8);
|
||||||
|
|
||||||
end
|
end
|
||||||
|
|
||||||
|
@ -23,7 +23,7 @@ function periodic_cstr
|
|||||||
help periodic_cstr
|
help periodic_cstr
|
||||||
|
|
||||||
% create the gas mixture
|
% create the gas mixture
|
||||||
gas = Solution('h2o2.yaml');
|
gas = Solution('h2o2.yaml','ohmech');
|
||||||
|
|
||||||
% pressure = 60 Torr, T = 770 K
|
% pressure = 60 Torr, T = 770 K
|
||||||
p = 60.0 * 133.3;
|
p = 60.0 * 133.3;
|
||||||
|
@ -73,7 +73,7 @@ for n = 1:nSteps
|
|||||||
tim(n) = t;
|
tim(n) = t;
|
||||||
temp(n) = r.T;
|
temp(n) = r.T;
|
||||||
pres(n) = r.P - p0;
|
pres(n) = r.P - p0;
|
||||||
cov(n,:) = surf.coverages';
|
cov(n,:) = surf.X';
|
||||||
x(n,:) = gas.moleFraction(names);
|
x(n,:) = gas.moleFraction(names);
|
||||||
end
|
end
|
||||||
disp(['CPU time = ' num2str(cputime - t0)]);
|
disp(['CPU time = ' num2str(cputime - t0)]);
|
||||||
|
Loading…
Reference in New Issue
Block a user