(Power generation) One major source of electricity is hydroelectric generation,
ID: 3575421 • Letter: #
Question
(Power generation) One major source of electricity is hydroelectric generation, in which flowing water is redirected to turn a turbine generator. The power generated by this water flow is given by this formula: P = × Q × H × g P is the power generated by the water flow (watts = J/s = kg-m2/s2-1/s). is the water density (kg/m3) Q is the volume flow rate (m3/s). g is the acceleration caused by gravity (9.81 m/s2). H is the distance (in m) water falls on its way to the generator, known as the head. a. Using this formula, write a C++ function named powerGen() that accepts two doubleprecision arguments (one for the head distance and one for the water flow) and returns the power generated in watts. b. Include the function written for Exercise 7a in a working program, and verify that your program is working correctly by determining the watts generated by a head of 14 meters of water flowing at 20 m3/s. After verifying that your program is working correctly, use it to determine the watts generated by a head of 30 meters of water flowing at 20 m3/s. (Power generation) One major source of electricity is hydroelectric generation, in which flowing water is redirected to turn a turbine generator. The power generated by this water flow is given by this formula: P = × Q × H × g P is the power generated by the water flow (watts = J/s = kg-m2/s2-1/s). is the water density (kg/m3) Q is the volume flow rate (m3/s). g is the acceleration caused by gravity (9.81 m/s2). H is the distance (in m) water falls on its way to the generator, known as the head. a. Using this formula, write a C++ function named powerGen() that accepts two doubleprecision arguments (one for the head distance and one for the water flow) and returns the power generated in watts. b. Include the function written for Exercise 7a in a working program, and verify that your program is working correctly by determining the watts generated by a head of 14 meters of water flowing at 20 m3/s. After verifying that your program is working correctly, use it to determine the watts generated by a head of 30 meters of water flowing at 20 m3/s. (Power generation) One major source of electricity is hydroelectric generation, in which flowing water is redirected to turn a turbine generator. The power generated by this water flow is given by this formula: P = × Q × H × g P is the power generated by the water flow (watts = J/s = kg-m2/s2-1/s). is the water density (kg/m3) Q is the volume flow rate (m3/s). g is the acceleration caused by gravity (9.81 m/s2). H is the distance (in m) water falls on its way to the generator, known as the head. a. Using this formula, write a C++ function named powerGen() that accepts two doubleprecision arguments (one for the head distance and one for the water flow) and returns the power generated in watts. b. Include the function written for Exercise 7a in a working program, and verify that your program is working correctly by determining the watts generated by a head of 14 meters of water flowing at 20 m3/s. After verifying that your program is working correctly, use it to determine the watts generated by a head of 30 meters of water flowing at 20 m3/s.
Explanation / Answer
#include <iostream>
using namespace std;
double powerGen(double H, double Q){
double p = 1000;
double g = 9.81;
return p * Q * H * g;
}
int main(){
//Calculating watts generated by a head of 14 meters of water flowing at 20 m3/s
double H = 14;
double Q = 20;
cout<<"Power generation using head of 14 meters of water flowing at 20 m3/s: "<<powerGen(H,Q)<<endl;
//Calculating watts generated by a head of 30 meters of water flowing at 20 m3/s.
H = 30;
Q = 20;
cout<<"Power generation using head of 14 meters of water flowing at 30 m3/s: "<<powerGen(H,Q)<<endl;
}
Related Questions
Navigate
Integrity-first tutoring: explanations and feedback only — we do not complete graded work. Learn more.