Question: 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

 

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

1 Expert Approved Answer
Step: 1 Unlock

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... View full answer

blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Programming Questions!