Write program to compute unknown compound in reaction


In engineering thermodynamics it is sometimes necessary to balance chemical reaction equations, specifically for the combustion of hydrocarbon (hydrogen and carbon) fuels. The complete combustion of a hydrocarbon fuel can be represented as:

CxHy + a(O2 + 3.76 N2) → b CO2 + c H2O + d N2

Where x and y define the specific fuel and the coefficients a, b, c, and d can be determined by balancing the amounts (moles) of each individual element (i.e. Carbon, Hydrogen, Oxygen, and Nitrogen). Create a program that asks the user for the values of x and y then computes the remaining unknowns. You should formulate the problem as an Ax=b matrix problem for solution. Each unknown's output should be well labeled. Remember to account for the subscripts in your balances. Test your program for CH4 (methane), which you should be able to compute easily enough on your own.

Request for Solution File

Ask an Expert for Answer!!
Programming Languages: Write program to compute unknown compound in reaction
Reference No:- TGS0713055

Expected delivery within 24 Hours