Question
Write a well-documented script that calculates the enthalpy of reaction for a user-defined reaction. The user should input reaction stoichiometry in the Command Window, and
Write a well-documented script that calculates the enthalpy of reaction for a user-defined reaction. The user should input reaction stoichiometry in the Command Window, and your script should output the enthalpy of reaction. Enthalpy of reaction is calculated from:
Where: hfj is the enthalpy of formation for species j, vj is the stoichiometric coefficient for species j, and HRx is the enthalpy of reaction.
Table 1 gives the enthalpies of formations for the species of interest.
Table 1. Enthalpies of Formation at 298 K
Species | Enthalpy at 298 K (J/mol) |
O2 | 0 |
CH4 | -7.94x104 |
CO | -1.106x105 |
CO2 | -3.938x105 |
H2O | -2.42x105 |
C2H6 | -8.474x104 |
H2 | 0 |
You should write appropriate documentation (and demonstrate that you have by typing help followed by your script name to display your notes). Test your code for the following reactions
CH4 + O2 -> CO + 2 H2 (Answer: -3.12x104 J/mol)
CO + H2O -> CO2 + H2 (Answer: -4.12x105 J/mol)
C2H6 + O2 -> 2CO2 + 3 H2O (Answer: -1.429x106 J/mol)
PLEASE SHOW ON MATLAB THANK YOU
HRx=j=1nvjhfj HRx=j=1nvjhfjStep by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started