mirror of
https://github.com/Cantera/cantera.git
synced 2025-02-25 18:55:29 -06:00
*** empty log message ***
This commit is contained in:
parent
7fb8532914
commit
73c0907c59
@ -1,6 +1,6 @@
|
|||||||
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
|
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
|
||||||
%
|
%
|
||||||
% A burner-stabilized flat flame
|
% An axisymmetric stagnation-point non-premixed flame
|
||||||
%
|
%
|
||||||
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
|
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
|
||||||
|
|
||||||
@ -8,18 +8,19 @@ t0 = cputime; % record the starting time
|
|||||||
|
|
||||||
|
|
||||||
% parameter values
|
% parameter values
|
||||||
p = 0.05*oneatm; % pressure
|
p = oneatm; % pressure
|
||||||
tburner = 373.0; % burner temperature
|
tin = 300.0; % inlet temperature
|
||||||
mdot = 0.04; % kg/m^2/s
|
mdot_o = 0.24; % air, kg/m^2/s
|
||||||
|
mdot_f = 0.08; % fuel, kg/m^2/s
|
||||||
|
|
||||||
rxnmech = 'gri30.xml'; % reaction mechanism file
|
rxnmech = 'gri30.xml'; % reaction mechanism file
|
||||||
transport = 'Mix'; % transport model
|
transport = 'Mix'; % transport model
|
||||||
comp = 'O2:0.21, N2:0.78, AR:0.01'; % premixed gas composition
|
comp1 = 'O2:0.21, N2:0.78, AR:0.01'; % air composition
|
||||||
comp2 = 'C2H2:1'; % premixed gas composition
|
comp2 = 'C2H6:1'; % fuel composition
|
||||||
|
|
||||||
initial_grid = [0.0 0.02 0.04 0.06 0.08 0.1 0.12 0.14 0.16 0.18 0.2]; % m
|
initial_grid = 0.02*[0.0 0.2 0.4 0.6 0.8 1.0]; % m
|
||||||
|
|
||||||
tol_ss = [1.0e-7 1.0e-12]; % [rtol atol] for steady-state
|
tol_ss = [1.0e-5 1.0e-12]; % [rtol atol] for steady-state
|
||||||
% problem
|
% problem
|
||||||
tol_ts = [1.0e-3 1.0e-4]; % [rtol atol] for time stepping
|
tol_ts = [1.0e-3 1.0e-4]; % [rtol atol] for time stepping
|
||||||
|
|
||||||
@ -37,8 +38,8 @@ refine_grid = 1; % 1 to enable refinement, 0 to
|
|||||||
%
|
%
|
||||||
gas = IdealGasMix(rxnmech, transport);
|
gas = IdealGasMix(rxnmech, transport);
|
||||||
|
|
||||||
% set its state to that of the unburned gas at the burner
|
% set its state to that of the fuel (arbitrary)
|
||||||
set(gas,'T', tburner, 'P', p, 'X', comp);
|
set(gas,'T', tin, 'P', p, 'X', comp2);
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
@ -51,40 +52,36 @@ set(f, 'tol', tol_ss, 'tol-time', tol_ts);
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
%%%%%%%%%%%%%%% create the burner %%%%%%%%%%%%%%%%%%%%%%%%%%%%%
|
%%%%%%%%%%%%%%% create the air inlet %%%%%%%%%%%%%%%%%%%%%%%%%%%%%
|
||||||
%
|
%
|
||||||
% The burner is an Inlet object. The temperature, mass flux,
|
% The temperature, mass flux, and composition (relative molar) may be
|
||||||
% and composition (relative molar) may be specified.
|
% specified.
|
||||||
%
|
%
|
||||||
burner = Inlet('burner');
|
inlet_o = Inlet('air_inlet');
|
||||||
set(burner, 'T', tburner, 'MassFlux', mdot, 'X', comp);
|
set(inlet_o, 'T', tin, 'MassFlux', mdot_o, 'X', comp1);
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
%%%%%%%%%%%%%% create the outlet %%%%%%%%%%%%%%%%%%%%%%%%%%%%
|
%%%%%%%%%%%%%% create the fuel inlet %%%%%%%%%%%%%%%%%%%%%%%%%%%%
|
||||||
%
|
%
|
||||||
% The type of flame is determined by the object that terminates
|
|
||||||
% the domain. An Outlet object imposes zero gradient boundary
|
|
||||||
% conditions for the temperature and mass fractions, and zero
|
|
||||||
% radial velocity and radial pressure gradient.
|
|
||||||
%
|
%
|
||||||
s = Inlet('right');
|
inlet_f = Inlet('fuel_inlet');
|
||||||
set(s, 'T', tburner, 'MassFlux', 0.04, 'X', comp2);
|
set(inlet_f, 'T', tin, 'MassFlux', mdot_f, 'X', comp2);
|
||||||
|
|
||||||
|
|
||||||
%%%%%%%%%%%%% create the flame object %%%%%%%%%%%%
|
%%%%%%%%%%%%% create the flame object %%%%%%%%%%%%
|
||||||
%
|
%
|
||||||
% Once the component parts have been created, they can be assembled
|
% Once the component parts have been created, they can be assembled
|
||||||
% to create the flame object.
|
% to create the flame object.
|
||||||
%
|
%
|
||||||
fl = flame(gas, burner, f, s);
|
fl = flame(gas, inlet_o, f, inlet_f);
|
||||||
|
|
||||||
% if the starting solution is to be read from a previously-saved
|
% if the starting solution is to be read from a previously-saved
|
||||||
% solution, uncomment this line and edit the file name and solution id.
|
% solution, uncomment this line and edit the file name and solution id.
|
||||||
%restore(fl,'h2flame2.xml', 'energy')
|
%restore(fl,'h2flame2.xml', 'energy')
|
||||||
|
|
||||||
|
% solve with fixed temperature profile first
|
||||||
resid(fl, 'flow')
|
solve(fl, loglevel, refine_grid);
|
||||||
solve(fl, 1, 1);
|
|
||||||
|
|
||||||
|
|
||||||
%%%%%%%%%%%% enable the energy equation %%%%%%%%%%%%%%%%%%%%%
|
%%%%%%%%%%%% enable the energy equation %%%%%%%%%%%%%%%%%%%%%
|
||||||
@ -95,10 +92,9 @@ solve(fl, 1, 1);
|
|||||||
%
|
%
|
||||||
|
|
||||||
enableEnergy(f);
|
enableEnergy(f);
|
||||||
resid(fl, 'flow')
|
|
||||||
setRefineCriteria(fl, 2, 200.0, 0.1, 0.1);
|
setRefineCriteria(fl, 2, 200.0, 0.1, 0.1);
|
||||||
solve(fl, 1, 1);
|
solve(fl, loglevel, refine_grid);
|
||||||
saveSoln(fl,'h2fl.xml','energy',['solution with energy' ...
|
saveSoln(fl,'c2h6.xml','energy',['solution with energy' ...
|
||||||
' equation']);
|
' equation']);
|
||||||
|
|
||||||
|
|
||||||
@ -112,20 +108,24 @@ disp(e);
|
|||||||
%%%%%%%%%% make plots %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
|
%%%%%%%%%% make plots %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
|
||||||
|
|
||||||
figure(1);
|
figure(1);
|
||||||
subplot(2,2,1);
|
subplot(2,3,1);
|
||||||
plotSolution(fl, 'flow', 'T');
|
plotSolution(fl, 'flow', 'T');
|
||||||
title('Temperature [K]');
|
title('Temperature [K]');
|
||||||
subplot(2,2,2);
|
subplot(2,3,2);
|
||||||
plotSolution(fl, 'flow', 'H2O');
|
plotSolution(fl, 'flow', 'C2H6');
|
||||||
title('Axial Velocity [m/s]');
|
title('C2H6 Mass Fraction');
|
||||||
subplot(2,2,3);
|
subplot(2,3,3);
|
||||||
plotSolution(fl, 'flow', 'O2');
|
plotSolution(fl, 'flow', 'O2');
|
||||||
title('O2 Mass Fraction');
|
title('O2 Mass Fraction');
|
||||||
subplot(2,2,4);
|
subplot(2,3,4);
|
||||||
plotSolution(fl, 'flow', 'H2');
|
plotSolution(fl, 'flow', 'CH');
|
||||||
title('H2 Mass Fraction');
|
title('CH Mass Fraction');
|
||||||
%subplot(2,2,4);
|
subplot(2,3,5);
|
||||||
%plotSolution(fl, 'flow', 'V');
|
plotSolution(fl, 'flow', 'V');
|
||||||
%title('V');
|
title('Radial Velocity / Radius [s^-1]');
|
||||||
|
subplot(2,3,6);
|
||||||
|
plotSolution(fl, 'flow', 'u');
|
||||||
|
title('Axial Velocity [m/s]');
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user