Answered step by step
Verified Expert Solution
Question
1 Approved Answer
You are to write a VBA problem that converts from mass fractions to mole fractions. Your program should also calculate the molar average heat
You are to write a VBA problem that converts from mass fractions to mole fractions. Your program should also calculate the molar average heat capacity. Note that the average heat capacity is simply the sum of the mole fraction of each component multiplied by the heat capacity of that component. Tasks 1. Write a flowchart or pseudocode for how you would convert from mass fractions to mole fractions and how you would calculate the molar average heat capacity. 2. Write a VBA program that allows the user to input up to five different components and their mass fractions and outputs the corresponding mole fraction of each component. Note that you will need the molecular weights of all components for this calculation: the user can either input these or your program can choose the appropriate molecular weight based on the species name that is input. 3. Test your program for the following composition (mass fractions): 16% 02, 4% CO, 17% CO2, and 63% N2 (answer: 15% O2, 4.4% CO, 12% CO2, 69% N2). 4. Add to your program several statements that allow the molar average heat capacity of a gaseous mixture to be calculated. 5. Test your program with the mass fractions from part one, inputting the following heat capacities: 02-29.1, CO-28.95, CO2-36.11, N2-29 (units of J/mol/K). Things to consider as you are writing your program: What variables do you need to define? What types of variables are they? How does the user know what to input? How could you check to make sure that the input values make sense? What do you want your output to look like?
Step by Step Solution
★★★★★
3.40 Rating (150 Votes )
There are 3 Steps involved in it
Step: 1
The objective of this programming task is to write a VBA programme that computes a gaseous mixtures molar average heat capacity and translates mass fractions into mole fractions The user can enter dat...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