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

Elements Of Electromagnetics
7th Edition
ISBN:9780190698614
Author:Sadiku, Matthew N. O.
Publisher:Sadiku, Matthew N. O.
ChapterMA: Math Assessment
Section: Chapter Questions
Problem 1.1MA
icon
Related questions
Question

INTRODUCTION:

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 increasing entropy. This may be restated by saying that there is an upper limit to the efficiency of the conversion of heat to work, as in a heat engine.

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

Expert Solution
trending now

Trending now

This is a popular solution!

steps

Step by step

Solved in 3 steps with 1 images

Blurred answer
Similar questions
  • SEE MORE QUESTIONS
Recommended textbooks for you
Elements Of Electromagnetics
Elements Of Electromagnetics
Mechanical Engineering
ISBN:
9780190698614
Author:
Sadiku, Matthew N. O.
Publisher:
Oxford University Press
Mechanics of Materials (10th Edition)
Mechanics of Materials (10th Edition)
Mechanical Engineering
ISBN:
9780134319650
Author:
Russell C. Hibbeler
Publisher:
PEARSON
Thermodynamics: An Engineering Approach
Thermodynamics: An Engineering Approach
Mechanical Engineering
ISBN:
9781259822674
Author:
Yunus A. Cengel Dr., Michael A. Boles
Publisher:
McGraw-Hill Education
Control Systems Engineering
Control Systems Engineering
Mechanical Engineering
ISBN:
9781118170519
Author:
Norman S. Nise
Publisher:
WILEY
Mechanics of Materials (MindTap Course List)
Mechanics of Materials (MindTap Course List)
Mechanical Engineering
ISBN:
9781337093347
Author:
Barry J. Goodno, James M. Gere
Publisher:
Cengage Learning
Engineering Mechanics: Statics
Engineering Mechanics: Statics
Mechanical Engineering
ISBN:
9781118807330
Author:
James L. Meriam, L. G. Kraige, J. N. Bolton
Publisher:
WILEY