![]() % k = +1 makes the solver solve for diverging area. % % Developed by Ashwin Kumar/Dr.Joseph Meadows on 3-June-2020 % Research Assistant/Assistant Professor % Advanced Propulsion and Power Laboratory % Virginia Tech % % Keywords: combustion, user-defined model, compressible flow, plotting %% Clear all variables, close all figures, clear the command line: clear all close all clc % Temperature of gas, in K T0 = 1473 % Pressure of gas, in Pa P0 = 4.47 * 101325 % Equivalence Ratio Phi = 0.2899 % Import the gas phase, read out key species indices: gas_calc = Solution ( 'gri30.yaml' ) ich4 = speciesIndex ( gas_calc, 'CH4' ) io2 = speciesIndex ( gas_calc, 'O2' ) in2 = speciesIndex ( gas_calc, 'N2' ) nsp = nSpecies ( gas_calc ) x = zeros ( nsp, 1 ) % Change the below values for different Phi values of methane Combustion x ( ich4, 1 ) = Phi x ( io2, 1 ) = 2.0 x ( in2, 1 ) = 7.52 % Set the initial state and then equilibrate for a given enthalpy and pressure: set ( gas_calc, 'T', T0, 'P', P0, 'MoleFractions', x ) gas_calc = equilibrate ( gas_calc, 'HP' ) %% Calculation of properties along the reactor length % The Dimensions and conditions of the reactor are given below % Inlet Area, in m^2 A_in = 0.018 % Exit Area, in m^2 A_out = 0.003 % Length of the reactor, in m L = 1.284 * 0.0254 % The whole reactor is divided into n small reactors n = 100 % Mass flow rate into the reactor, in kg/s mdot_calc = 1.125 % Flag to indicate whether the area is converging, diverging, or constant: % k = -1 makes the solver solve for converging area. % % The governing equations used in this code can be referenced at: % *S.R Turns, An Introduction to Combustion - Concepts and Applications, % McGraw Hill Education, India, 2012, 206-210.* % % The current example is written for methane combustion, but can be readily % adapted for other chemistries. % % The reactor assumes that the flow follows the Ideal Gas Law. The pressure is not assumed to be % constant here, as opposed to the Python Version of the % Plug Flow Reactor model. % General_Plug_Flow_Reactor (PFR) - to solve PFR equations for reactors % % This code snippet is to model a constant area and varying area % (converging and diverging) nozzle as Plug Flow Reactor with given % dimensions and an incoming gas.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |