You are to write a VBA problem that converts from mass fractions to mole fractions. Your...
Fantastic news! We've Found the answer you've been seeking!
Question:
Transcribed Image Text:
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? 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?
Expert Answer:
Answer rating: 100% (QA)
Flowchartpseudocode Flowchart for converting from mass fractions to mole fractions and calculating molar average heat capacity Input Number of compone... View the full answer
Related Book For
Posted Date:
Students also viewed these programming questions
-
"internet radios" for streaming audio, and personal video recorders and players. Describe design and evaluation processes that could be used by a start-up company to improve the usability of such...
-
Let A, B be sets. Define: (a) the Cartesian product (A B) (b) the set of relations R between A and B (c) the identity relation A on the set A [3 marks] Suppose S, T are relations between A and B, and...
-
As an agricultural engineer, you must design a trapezoidal open channel to carry irrigation water (Figure). Determine the optimal dimensions to minimize the wetted perimeter for a cross-sectional...
-
Overhead information for Cran-Mar Company for October follows: Total overhead incurred.............................................$30,000 Budgeted fixed...
-
1. What overall conclusions do you draw from this case? Explain your answer. 2. What is the biggest disconnect between retailers and their customers today? How could this be fixed? 3. What could...
-
Hemlock Semiconductor Operations, LLC, and SolarWorld Industries Sachsen GmbH, are both companies involved in the manufacture of components for solar power products. Prior to the lawsuit, the two...
-
Marlin Company, a wholesale distributor, has been operating for only a few months. The company sells three productssinks, mirrors, and vanities. Budgeted sales by product and in total for the coming...
-
37 Solve for N as a function of t, we get N = a(1-1) Some calculation details: +(1-a)) 38 Now let z = 1, a = 0.33, b = 2.15 and t = 0.5, the N you calculated in 37 is
-
If x = 4V5 ,y 4 and z=4 V6, find sin X, sin Y, cos X and cos Y. If y = 10 and mL Y=15, find z to the nearest tenth. If z = 12 and m Zx= 84, find y to the nearest tenth.
-
Risk management strategies are needed to mitigate consequences in a QMS. Risks are managed in three phases: assessment, control, and review by using risk management tools and risk communications. The...
-
Why is it important to have good file management? If you visited your dentist's office 10 years ago what type of record would that be considered?
-
Waltham Motors produced 14,000 units instead of the expected 18,000. They were 4,000 units under the projected, and the selling price was $49.00, as opposed to the budget price of $48. After losing...
-
Samuel bought a new car in January of 2022 for $65,000. He began using the car for his sole proprietorship on February 14, 2022. The car is used 88% for business use, and Samuel wants to claim 100%...
-
What is Natalya's savings rate if her gross pay is $51,200 and her annual take-home pay is $37,515 of which $2,245 is available for savings?
-
Sams plans Next month we are having our annual charity day. We are thinking of raising money be washing cars, wearing silly clothes and having a cake sale . What do you think of these ideas? please...
-
What mass of H2 will be produced when 122 g of Zn are reacted? Zn(s) + 2HCl(aq) ( ZnCl2(aq) + H2(g)
-
A first-order heterogeneous irreversible reaction is taking place within a spherical catalyst pellet that is plated with platinum throughout the pellet. The reactant concentration halfway between the...
-
Describe how the CRE algorithm will have to change when we have multiple and dont use conversion to solve problems.
-
A very proprietary industrial waste reaction, which well code as A B + S, is to be carried out in a 10-dm 3 CSTR followed by a 10-dm 3 PFR. The reaction is elementary, but A, which enters at a...
-
The direct result of the process of transcription is the synthesis of a. DNA. b. RNA. c. a polypeptide. d. all of the above.
-
Many hotel jobs are inherently dead end; for example, maids, laundry workers, and valets, either have no great aspirations to move up, or are just using these jobs temporarily, for instance, to help...
-
Using what you learned in this chapter of Dessler Human Resource Management, build on the companys new system by recommending two more specific career development activities the hotel should...
Study smarter with the SolutionInn App