Thermodynamics

버전 1.2.1.0 (27.7 MB) 작성자: Emma Smith Zbarsky
This curriculum module contains interactive examples that teach fundamental concepts and basic terminology related to thermodynamics with an
다운로드 수: 765
업데이트 날짜: 2023/8/25

Thermodynamics

View Thermodynamics on File Exchange or Open in MATLAB Online

GitHub top language Thermodynamics Module CI/CD

MATLAB Code Issues MATLAB Versions Tested

Curriculum Module
Created with R2022b. Compatible with R2022b and later releases.

Description

This curriculum module contains interactive MATLAB® live scripts that teach fundamental concepts and basic terminology related to introductory thermodynamics. Topics addressed include units, the first and second laws of thermodynamics, state variables, work, and the components of a refrigeration cycle.

You can use these live scripts as demonstrations in lectures, class activities, or interactive assignments outside class. This module consists of several interactive live scripts intended to introduce or deepen student understanding of thermodynamic concepts, including working with data tables and reading thermodynamic plots. Two additional scripts are included for instructors or students who want to go beyond the included material by installing CoolProp or building their own refrigerator model.

Get started with the Thermodynamics interactive examples

Option 1: Download to Desktop Download and unzip the repository. Then, double-click the Thermodynamics.prj file inside MATLAB®.

Option 2: Open in MATLAB Online Log in to your MathWorks account to access your license. If you are associated with a university, use your university email to access a license.

Solutions are available upon instructor request. If you would like to request solutions or have a question, contact the MathWorks online teaching team.

  • From there, you can follow the landing page instructions to get started with the examples.
  • The instructions inside the live scripts will guide you through the exercises and activities.
  • Get started with each live script by running it one section at a time.
  • To stop running the script or a section midway (for example, if a loop is running longer than intended), click the Stop button in the RUN section of the Live Editor tab in the MATLAB Toolstrip.

Prerequisite Domain Knowledge

These scripts assume background knowledge of common thermodynamic terminology as covered in secondary education such as temperature, pressure, kinetic energy, and potential energy as well as fluency with basic integral calculus. There is minimal MATLAB knowledge required for FirstLaw, SecondLaw and StatePlots, but you could use MATLAB Onramp as a resource to acquire familiarity with live scripts and MATLAB syntax. More familiarity with MATLAB is required for CreatePVplots, CalculateWork and Model_Fridge, as those are designed in Code Visible format. Familiarity with Simulink at the level of Simulink Onramp may be helpful for Model_Fridge as well.

For those interested in additional coding, SetUpCoolProp includes instructions for installing and accessing the CoolProp thermodynamic reference library. BuildRefrigerator walks through a project to build a refrigerator model in Simulink out of standard component blocks. BuildRefrigerator requires Simulink Onramp, at a minimum. If possible, Simscape Onramp would be helpful as well. Students are expected to find and insert specified blocks, connect blocks, edit block parameters, rename blocks, copy and paste subsystems, run simulations, and explore the output.

Details

FirstLaw.mlx Open in MATLAB Online

This script introduces the first law of thermodynamics with a focus on units, energy, systems, and conservation laws.

In this script, students will...

  • Express various forms of energy in terms of fundamental units
  • Apply the conservation of mass in simple, conceptual situations
  • Identify systems with open and closed control volumes
  • Apply the first law of thermodynamics

CreatePVplots.mlx Open in MATLAB Online

This script investigates pressure-volume (PV) diagrams and their relationship to state equations in a closed system.

In this script, students will...

  • Identify key words including isothermal, isobaric, and isochoric, and translate word problems into thermodynamic terminology
  • Identify and state necessary assumptions to express a thermodynamic relationship

CalculateWork.mlx Open in MATLAB Online

This script introduces computing the work done by a system using analysis of its PV plot.

In this script, students will...

  • Identify positive, negative, and zero work from a P-V plot without computing the value
  • Compute work in constant pressure, constant volume, and integrable P-V plots
  • Compare various state equations to each other and to tabular data
  • Compute the work done by a piston modeled in Simulink

SecondLaw.mlx Open in MATLAB Online

This script introduces the second law of thermodynamics in both the Kelvin-Planck and Clausius formulations.

In this script, students will...

  • Identify thermal sources, sinks, and reservoirs
  • Compute thermal efficiency
  • Reflect on the second law of thermodynamics
  • Use the universe as a system of reference for determining thermodynamic flows

StatePlots.mlx Open in MATLAB Online

This script introduces state diagrams and temperature-entropy plots.

In this script, students will...

  • Investigate the standard shapes of state diagrams
  • Investigate Temperature/Entropy plots for several pure substances including water, R134a, and ammonia
  • Identify liquid, gas, two-phase, and supercritical states of matter on a temperature-entropy plot

Model_Fridge.mlx Open in MATLAB Online

Apply their knowledge of thermodynamics to a Simulink model of a real refrigerator.

In this script, students will...

  • Apply understanding about thermodynamic cycles to model a refrigerator
  • Perform unit conversions required to extract values from a database and use them in a model
  • Read and interpret thermodynamic plots
  • Create informative plots based on thermodynamic sensor data

With More Coding

SetUpCoolProp.mlx This script is only appropriate for desktop versions of MATLAB.

In this script, students will...

  • Download and test their own copy of CoolProp

BuildRefrigerator.mlx Open in MATLAB Online

Using Simulink and the capabilities of the Simscape Two-Phase Fluid libraries, build and test a complete refrigerator from a blank model.

In this script, students will...

  • Build and test an evaporator model
  • Build and test a compressor model using a parameter sweep
  • Build and test a condenser model
  • Apply their understanding of liquid, vapor, and two-phase states of matter
  • Build and test a complete refrigeration cycle

Products

MATLAB®, Simscape™, Simulink®, Simulink® Real-Time™, Stateflow®, Symbolic Math Toolbox™, Image Processing Toolbox™

License

The license for this module is available in the license.md file in this GitHub repository.

Support

Please contact the MathWorks online teaching team.

Copyright 2023 The MathWorks, Inc.

인용 양식

Emma Smith Zbarsky (2024). Thermodynamics (https://github.com/MathWorks-Teaching-Resources/Thermodynamics/releases/tag/v1.2.1), GitHub. 검색됨 .

MATLAB 릴리스 호환 정보
개발 환경: R2022b
R2022b에서 R2023b까지의 릴리스와 호환
플랫폼 호환성
Windows macOS Linux
커뮤니티
 Distance Learning 커뮤니티에 더 많은 파일이 있습니다

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!
버전 게시됨 릴리스 정보
1.2.1.0

See release notes for this release on GitHub: https://github.com/MathWorks-Teaching-Resources/Thermodynamics/releases/tag/v1.2.1

1.2.0.0

See release notes for this release on GitHub: https://github.com/MathWorks-Teaching-Resources/Thermodynamics/releases/tag/v1.2.0

1.1.1.0

See release notes for this release on GitHub: https://github.com/MathWorks-Teaching-Resources/Thermodynamics/releases/tag/v1.1.1

1.0.1.0

See release notes for this release on GitHub: https://github.com/MathWorks-Teaching-Resources/Thermodynamics/releases/tag/v1.0.1

1.0.0

이 GitHub 애드온의 문제를 보거나 보고하려면 GitHub 리포지토리로 가십시오.
이 GitHub 애드온의 문제를 보거나 보고하려면 GitHub 리포지토리로 가십시오.