GithubHelp home page GithubHelp logo

ambrish001 / throttle_operation_thermodynamics Goto Github PK

View Code? Open in Web Editor NEW
0.0 1.0 0.0 12 KB

Modelled the throttling process as a steady-state, steady-flow adiabatic operation with no moving parts and calculated the maximum work done on adiabatic expansion. Developed the code in C++

License: Apache License 2.0

C++ 100.00%
cpp throttle thermodynamic-properties

throttle_operation_thermodynamics's Introduction

Throttle_Operation_Thermodynamics

Coding Exercise: Throttle Operation Thermodynamics Problem Statement Throttle is an important component of refrigeration cycle wherein it allows a means of reducing the temperature of working fluid. For the present problem, consider a n-butane stream at pressure ๐‘ƒ! and temperature ๐‘‡! that is throttled to a final pressure ๐‘ƒ". The temperature (๐‘‡") or the quality (vapor mole fraction: ๐‘ฅ" โ‰ก ๐‘ฅ") of the exit stream are unknown. #Model the throttle process as a steady-state, steady-flow adiabatic operation with no moving parts. Further, you can ignore kinetic energy and potential energy changes for the flow streams. With these assumptions, the general energy balance simplifies to: ฮ”๐ป!" = 0. Task Develop a code in language/library of your choice (C, Matlab, Python, etc.) to answer question given below. The solution approach has been discussed in the class. Test cases can be taken from the lecture class.

  1. Determine the phase of the exit stream: subcooled liquid, liquid-vapor coexistence, superheated vapor.
  2. Determine the temperature (๐‘‡") of the exit stream. Further, in case the exit stream phase is liquid-vapor coexistence, also determine its quality, ๐‘ฅ".
  3. Some refrigeration cycle operations involve replacement of a throttle valve by an expander device with work output (e.g., turbine). Determine the maximum work that can be obtained on adiabatic expansion of the same inlet stream (๐‘ƒ!, ๐‘‡!) to the same outlet pressure (๐‘ƒ"). Note: Maximum work (= ฮ”๐ป!") will be obtained for adiabatic, reversible expansion: ฮ”๐‘†!" = 0. Parameter values ๐‘ƒ! (๐‘–๐‘› MPa): {1.4, 1.6}; ๐‘‡! (in K): {200, 400}; ๐‘ƒ" = 0.1 MPa Thermophysical properties of n-butane: tabulated data for isobars at 0.1, 1.4, 1.6 MPa given in excel sheet. Use linear interpolation in ๐‘ƒ, ๐‘‡ to get a value at any given state poin. Input parameters (๐‘ƒ!, ๐‘‡!) should be defined such that their value can be provided at time of execution without need to recompile the code. You can either use an input file (preferable) or take input from command line. Answer to Q1-3 can be printed to an output file or displayed on command line.

The code is the solution to this problem.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.