Project 3 Complete Combustion Summer 2011

Project 3 Complete Combustion Summer 2011 - Part 1...

Info iconThis preview shows pages 1–2. Sign up to view the full content.

View Full Document Right Arrow Icon
Part 1. Stoichiometry Write an EES Code that solves for the moles of reactants and products for complete combustion. The EES code should be given a fuel (example “C2H5OH”), the number of moles of Carbon, Hydrogen, and Oxygen in the fuel (C=2, H=6, O=1 in this example), and the % theoretical air. { “User Input” Fuel$=”C2H5OH” C=2 H=6 O=1 } Your EES code should then solve for nO2r, nN2r, nCO2p, nH2Op, nO2p, nN2p, nFuelp. Your EES code should work for both pta>100% and pta<100%. This is best done by creating a FUNCTION in EES. The same equation that solves correctly for nO2p when pta>100% will give a negative number of moles of nO2p when pta<100%. The function will be used so that you can use an IF Statement (If pta>=100% do …., If pta<100% do something else). Recall from programming that a function is sent some values, calculates something, and then returns a SINGLE value back to a computer program. You create a variable with the same name as the function and set it equal to something. A function does not
Background image of page 1

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full Document Right Arrow Icon
Image of page 2
This is the end of the preview. Sign up to access the rest of the document.

{[ snackBarMessage ]}

Page1 / 2

Project 3 Complete Combustion Summer 2011 - Part 1...

This preview shows document pages 1 - 2. Sign up to view the full document.

View Full Document Right Arrow Icon
Ask a homework question - tutors are online