In thermodynamics, energy can be neither created nor destroyed (1st law): it is either converted to usable work or lost as waste heat. The second law of thermodynamics states that the total entropy (disorder) of a system will never decrease over time; that is, systems can only be at constant entropy or have
INTRODUCTION:
In
From these principles of thermodynamics, it is clear that there is an upper limit to how efficient power generation can be at most power plants. Many power plants, including those fueled by fossil fuels, nuclear sources, geothermal sources, biomass, and solar thermal, operate by generating a source of heat (burning fossil fuels, reacting nuclear materials, using the sun’s rays, etc.), using this heat source to heat water to steam, and passing this steam through a turbine. When the turbine spins, power is generated.
The maximum thermodynamic efficiency of a power plant is dictated by the temperatures of the hot reservoir (that is, the steam) and the cold reservoir (the cooling fluid in place). Ideally, the thermodynamic efficiency of the plant would be based on these temperatures, as in the Carnot cycle:
η =1−????
where η is the efficiency (unitless), TL is the temperature of the cold stream (either in Kelvin or in Rankine), and TH is the temperature of the hot stream, that is, the steam (either in Kelvin or in Rankine).
You have a data file called power.txt which shows the temperatures in Kelvin of the steam (TH) and of the cooling fluid (TC) for several different power plants. This data file has a control number and is space delimited.
ASSIGNMENT:
Write a C program that calculates the Carnot efficiency of power plants with the provided TH and TC streams as shown in the power.txt file. The output should print as a table to the screen and to an output file called efficiency.txt.
Use the “Code Sections.c” template on Blackboard to write your code.
Your program output will look like the illustration shown below. Use your PC’s cursor to determine the horizontal and vertical spacing for the output format.
OUTPUT FORMAT:
********************************************
POWER PLANT CARNOT EFFICIENCY
STEAM TEMP COOLING TEMP EFFICIENCY
xxx xxx x.xx
. . .
. . .
. . .
********************************************
Power txt=
9
798.15 298.15
723.15 273.15
798.15 323.15
873.15 273.15
823.15 373.15
773.15 298.15
823.15 423.15
848.15 298.15
348.15 298.15
Trending now
This is a popular solution!
Step by step
Solved in 3 steps with 1 images