#!/usr/bin/env python # coding: utf-8 # # Assignment 1 # ## Problem 1 # Read and understand all of the lecture notes for classes 1 and 2. Just state if you did this. # In[ ]: # ## Problem 2 # Consider combustion between ethylene and air. # * What is the stoichiometric mixture fraction? # * If we move 50% of the nitrogen from the air stream to the fuel stream, what is the resulting stoichiometric mixture fraction? # * What is the stoichiometric mixture fraction if we move all of the nitrogen from the air stream to the fuel stream? # In[ ]: # ## Problem 3 # * Use the streams.py class to find products of complete combustion (PCC) for the ethylene-air case (noted in Problem 2) and the case where all nitrogen is moved from the air stream to the fuel stream (noted in problem 2). These are two cases. Make two plots for each case. One plot is species mass fractions for PCC, the other is mole fractions for PCC. On a given plot, include the following species: $C_2H_4$, $O_2$, $N_2$, $CO_2$, $H_2O$. # In[ ]: # ## Problem 4 # # A series of one-dimensional turbulence flame simulation was performed. For each simulation we have a position, temperature, enthalpy, and set of species mass fractions. This simulation was performed with species having their own diffusivities. Hence, different mixture fraction definitions will have different values for a given composition. # # The data for all simulations were concatenated into a single file, [scatter.dat](http://ignite.byu.edu/che641/homework/scatter.dat), whose columns represent the variables above. (If you plot column 1, you will notice a zig-zag pattern which just means that the domain repeats itself for each of the simulations that are stacked on top of each other in the file.) # The data were reduced by only keeping 1 out of 100 of the original rows. # # There are 19 chemical species. A Cantera mechanism file is available as [c2h4red.yaml](http://ignite.byu.edu/che641/homework/c2h4red.yaml). # # The stream compositions are # * Fuel # * $y_{C2H4} = 0.25486817$, # * $y_{N2} = 0.74513183.$ # * Oxidizer # * $y_{O2} = 0.29073905$, # * $y_{N2} = 0.70926095$ # # The stream temperatures are both 550 K. # # ### Part a # # * For each point in the file, compute the following mixture fractions: $\xi_C$, $\xi_H$, $\xi_O$, $\xi_N$, and $\xi_B$, that is, mixture fractions defined using the various elements, and $\xi_B$ for the Bilger mixture fraction. # # * Plot each of the elemental mixture fractions versus the Bilger mixture fraction. This is a scatter plot so use very small points for plotting. Don't connect points with lines. You can do this on a single plot (with different colors for each mixture fraction), or on four different plots, or both. # # * Which elemental mixture fraction do you think is "best"? # # In[ ]: # ### Part b # # For each point in the file you have a temperature and a composition. These should correspond directly to the enthalpy in the file. At each point, you computed a Bilger mixture fraction (Part a). Use this mixture fraction to compute the corresponding enthalpy, using simple mixing between the two stream enthalpies. How do the two enthalpies compare? # ## Problem 5 # # Derive the mixture fraction transport equation starting from the species transport equation. # In[ ]: