Toggle navigation
JUPYTER
FAQ
View as Code
View on GitHub
Execute on Binder
Download Notebook
CBE20255
notebooks
Notebook
CBE20255
¶
Getting Started
¶
0.1 Jupyter Notebooks, Python, and Google Colaboratory
¶
Summary
Setting up Google Colaboratory and Google Drive
Python Basics
Arithmetic Operations
Lists
Dictionaries
Plotting
Solving Equations using Sympy
Defining your own Functions
Learn More
Tutorial Introductions to Python for Science and Engineering
Interactive Learning and On-Line Tutorials
Official documentation, examples, and galleries
Links
Jupyter Notebooks
Python
Google Colaboratory
Anaconda
Continuum Analytics
Enthought Canopy
Enthought, Inc.
here from the github repository
here
this Khan Academy video
Sympy
Introduction to Python for Science
acceptable use policy
Springer
Amazon
github
A Primer on Scientific Programming with Python (Fourth Edition)
github
pycse - Python Computations in Science and Engineering
github repository for pycse
Code Academy on Python
Khan Academy Videos on Python Programming
Python Tutorial
Think Python: How to Think Like a Computer Scientist
Engineering with Python
Notebook Examples
Notebook Gallery
Official Notebook Documentation
Matplotlib
0.2 Solving Linear Equations with Simpy
¶
Summary
Problem Statement
Solving linear equations using Sympy
Exercise
Links
Sympy
learnCheme.com
Sympy
Chapter 1.0 Units, Quantities, and Engineering Calculations
¶
1.1 Units and Engineering Calculations
¶
Summary
Units of Engineering
The Fundamental Units of Measurement
Coherent Derived Units
Non-Coherent Derived Units
Absolute versus Offset Scales
Extensive versus Intensive Quantities
Ideal Gas Law Calculations
Absolute Temperature
Absolute versus Gauge Pressure
Units of Pressure (to be completed)
PV has units of Energy (to be completed)
Table of Values for $R$ (to be completed)
Working with Units in Python using the pint library
Assigning Multiplicative Units
Unit Conversion
Mole and Mass Fractions
Prefixes
Temperature and Other Offset (Non-multiplicative) Units
Exercises
Units of Refrigeration
Units of the Ideal Gas Law
Deflategate
Agricultural Chemical Calculations
Units of Illumination
Estimation
Figures
http://physics.nist.gov/cuu/Units/i/SubwayDiagram.gif
Tire_pressure_gauge.jpg
Links
Jupyter notebook
NIST illustrates the relationship among the SI units
pint
1.2 Units and Conversions for Home Heating
¶
Summary
Examples
Heating with Electricity
Heating with Natural Gas
Sizing a Propane Storage Tank
Chapter 2.0 Stoichiometry
¶
2.1 Balancing Reactions
¶
Summary
Stoichiometry
Stoichiometric Coefficients
Examples
Combustion of Methane
Hypergolic Reaction of Monomethylhydrazine and Nitrogen Tetraoxide
Reaction with Charge in Aqueous Solution
Exercises
Combustion of Octane
Hard to Balance Reaction
Another Hard to Balance Reaction
Reactions with Charge
Figures
https://upload.wikimedia.org/wikipedia/commons/thumb/8/83/Methylhydrazine-3D-balls.png/190px-Methylhydrazine-3D-balls.png
Links
Jupyter notebook
SymPy
Wikimedia Commons
monomethylhydrazine (MMH)
2.2 Generation Consumption Analysis
¶
Summary
Example: Ammonia Production
Problem Statement
Solution
Links
Jupyter notebook
symbolic algebra package
Sympy
U.S. Guano Islands Act of 1856
War of the Pacific
Chapter 3.0 Process Flows and Balances
¶
3.1 Global CO
2
Budget
¶
Summary
Problem Statement
Solution
Step 1. Draw a diagram.
Step 2. Define the system of interest.
Step 3. Choose components and define stream variables.
Step 4. Convert all units to consistent units of mass or moles.
Step 5. Define a basis.
Step 6. Define system variables.
Step 7. List specifications
Step 8. Write material balance equations for each species.
Step 9. Solve material balance equations.
Step 10. Check your work.
Links
Jupyter notebook
Netherlands Environmental Assessment Agency
As measured by NOAA
3.2 CO
2
Production by Automobiles
¶
Summary
Examples
How much CO
2
is generated per mile driven with an ICE?
How much CO
2
is generated per mile driven by an electric car?
Links
according to the U.S. Energy Information Administration
3.4 Separating Milk
¶
Summary
Problem Statement
Solution
Define Streams
Material Balances
Specifications
Finding Feasible Solutions to the Material Balances
Finding a Solution to Maximize Revenue
Figures
Gruppo Pieralsi Milk Separator
Links
The Daily Dairy Report
3.5 Adipic Acid Flowsheet
¶
Summary
Problem Statement
Solution
Process Variables
Specifications
Material Balances
Solution
Links
Jupyter notebook
symbolic algebra package Sympy
producing adipic acid from renewable resources
For example, starting with glucose
Chapter 4.0 Material Balances
¶
4.1 Lean NO
x
Trap
¶
Summary
Problem Statement
Solution
Part a. Degree of Freedom Analysis
Part b. Material Balances
Part c. The rate of consumption of $BaO$
Figures
figures/LeanNOxTrap.png
figures/LeanNOxTrap2.png
Links
Jupyter notebook
4.2 Ethylene Oxide Flowsheet
¶
Summary
Introduction
Ethylene Oxide
Problem Statement (Murphy 2005, Example 3.19)
Solution
Variables
Stream Variables
Extent of Reaction
Equations
Material Balances
Specifications
Degree of Freedom Analysis
Solution
Production and Purity
Discussion Questions
Parametric Analysis: Fractional Conversion of Ethylene
Parametric Analysis: Fractional Recovery of Ethylene Oxide to Product
Discussion Questions
Parametric Analysis: Fractional Recovery of Ethylene to Recycle
Discussion Questions
Parametric Analysis: Change the Oxygen Feed Rate
Discussion Questions
Conclusions
Figures
ethylene_oxide_flowsheet.png
Links
Jupyter notebook
symbolic algebra package Sympy
ethylene oxide
Sympy
4.3 General Mass Balance on a Single Tank
¶
Summary
Problem Statement
Draw a Diagram
Mass Balance
Numerical Solution using
odeint
Solving for the Time Required to Fill the Tank
Exercise
Links
Jupyter notebook
learnCheme.com
odeint
scipy
this solution
Zombie Apocalypse
root finding
brentq
4.4 Unsteady-State Material Balances
¶
Summary
Unsteady-State Material Balances
Example 1: Population Growth
Population Balance Equation
Calculus Solution
Numerical Solution
Step 1. Right a function to evaulate the RHS of the differential equation.
Step 2. Establish the initial condition and time values for a desired solution.
Step 3. Pass this information to a solver to compute values of the solution.
Step 4. Plot the result.
Example 2: Dilution of a Trace Contaminant
Example 3: Hare and Lynx
Parameter Values
Derivatives
Solve
Plot
Figures
files/images/Lynx-Hare_cycle.gif
Links
Jupyter notebook
birth rate of 37.0 births per year per 1,000 people
death rate as 8.0 per year per 1,000
Chapter 5.0 Reactors
¶
5.1 Dehydrogenation of Propane
¶
Process Model
Product Composition
Recycle Ratio
Single Pass Conversion
Links
Example 4.7-2 Dehydrogenation of Propane
Process Model
Product Composition
Recycle Ratio
Single Pass Conversion
How Does Process Performance Depend on Single Pass Conversion?
5.2 Steam Reforming of Methane
¶
Summary
Problem Statement
Solution
Notebook Initialization
Problem Data
Component Data
Enthalpy and Gibb's Free Energy of Reaction
Equilibrium Constant using van't Hoff Equation
Material Balances
Composition of the Reactor Outlet Gases
Reaction Quotient
Solving for the Equilibrium Extent of Reaction
Equilibrium Composition
Methane Conversion
Exercises
Chapter 6.0 Vapors and Gases
¶
6.1 PVT Computations for Non-ideal Gases
¶
Problem Statement
Estimating Pressure
Ideal Gas Law
[Compressiblity Charts](http://eon.sdsu.edu/testhome/Test/solve/basics/tables/tablesRG/zNO.html)
Virial Model
van der Waals Equation of State
Soave-Redlich-Kwong Equation of State
Reference Data from NIST Webbook
Comparison of Estimates
Non-Ideal Behavior
Discussion Points
Figures
Generalized Compressibility Chart
Links
Compressiblity Charts
principle of corresponding states
compressibility chart
NIST Chemistry WebBook
6.2 Hydrogen Storage in a Fuel Cell Vehicle
¶
Data
Problem 1. Required Tank Volume
Solution using Ideal Gas Law
Solution using Compressibility Charts
Newton's Correction
Nelson-Obert Generalized Compressibility Chart
Solution using Soave-Redlich-Kwong Equation
Problem 2. Estimating Mass of Hydrogen using a Pressure Sensor
Solution using SRK equation of state.
Problem 3. Python function to estimate hydrogen mass.
Problem 4. Limit on tank leak rate.
Figures
alt text
alt text
alt text
Links
Toyota Mirai
Quantum Fuel Systems
fsolve
scipy.optimize
Chapter 7.0 Vapor/Liquid Equilibrium
¶
7.1 Gases with One Condensable Component
¶
Examples
Boiling Water
Partial Condensation
Relative Humidity
Dew Point
7.2 Vapor-Liquid Equilibrium for Pure Components
¶
Summary
Gibb's Phase Rule
Phase Diagram for a Pure Component
Triple Point
Critical Point
Saturation Vapor Pressure
Clausius-Clapeyron Equation
Antoine's Equation
Vapor Pressure
Saturation Temperature
Working with Wide Temperature Ranges
Normal Boiling Points
Figures
https://upload.wikimedia.org/wikipedia/commons/thumb/3/34/Phase-diag2.svg/500px-Phase-diag2.svg.png
Links
Jupyter notebook
By Matthieumarechal, CC BY-SA 3.0
NIST Webbook entry for propylene glycol
7.3 Operating Limits for a Methanol Lighter
¶
Summary
Problem
Antoine's Equation for the Saturation Pressure of Methanol
Equilibrium Vapor Composition at Room Temperature
Lower Operating Temperature Limit
Exercise
Links
brentq
root-finding funtions
scipy.optimize
lambda
7.4 Raoult Law for Ideal Mixtures
¶
Summary
Introduction
Vapor Pressure of Pure Components
Vapor Pressure of an Acetone/Ethanol Mixture at a Fixed Temperature
Comparing Raoult's Law to Experimental Data
Deviations from Raoult's Law
Figures
https://upload.wikimedia.org/wikipedia/commons/d/dc/RaoultDeviationPressureDiagram.png
Links
learnCheme.com
account for about 10 to 15 percent of the world's energy use
acetone and ethanol for which experimental data
Dortmund Data Bank
experimental data
brentq
scipy.optimize
NIST acetone
NIST ethanol
Experimental Data
7.5 Henry Law Constants
¶
Henry's Law Calculator
Links
IAPSW G7&-04 Guideline on the Henry's Constant and Vapor-Liquid Distribution Constant for Gases in $H_2O$ and $D_2O$ at High Temperatures
7.6 Binary Phase Diagrams for Ideal Mixtures
¶
Summary
Introduction
Antoine's Equation
Binary Mixtures
Exercises
Exercises
Pxy and Txy Diagrams for Binary Mixtures
Exercises
Comparison to Experimental Data: Benzene/p-Xylene
Flash
Exercises
Links
LearnChemE
video
LearnChemE
thermo
experimental data available here
Dortmund Data Bank
7.7 Bubble and Dew Points for Binary Mixtures
¶
Summary
Overview of the Calculations
Bubble Point Calculations for Binary Mixtures
Solution by Manual Iteration
Solution with a Root-Finding Function
Bubble Point Curve for a Txy Diagram
Dew Point Calculations for a Binary Mixture
Dew Point Curve on the Txy diagram
Figures
BubbleDewPointCalculations.png
Links
LearnChemE
7.8 Bubble and Dew Points for Multicomponent Mixtures
¶
Summary
Bubble and Dew Point Equations for Ideal Mixtures
-
Bubble Point Equations
-
Dew Point Equations
Multicomponent Mixtures
Links
LearnChemE
7.9 Isothermal Flash and the Rachford-Rice Equation
¶
Summary
Derivation of the Rachford-Rice Equation
Problem Classification
Isothermal Flash of a Binary Mixture
Multicomponent Mixtures
Exercises
Design of a Carbonated Beverage
Figures
FlashDrumFigure.png
Links
Jupyter notebook
learnCheme.com
has been measured to be 150 psig
7.10 Binary Distillation with McCabe-Thiele
¶
Summary
Problem Statement
Distillation
Txy Diagram
Chemical Property Data
Construct Txy Diagram
Analysis
x-y Data
Figures
364px-Colonne_distillazione.jpg
Chapter 8.0 Energy Balances
¶
8.1 Energy Balances on a Classroom
¶
Heat Requirement
Steam Requirement
Pipe Sizing
8.2 Water and Steam Calculator
¶
Properties of Steam
Saturation Conditions at a Specified Pressure
Saturation Conditions at a Specified Temperature
8.3 Basic Energy Computations
¶
Computing Enthalpy and Internal Energy Changes for Common Situations
Examples
Pumping a Fluid
Exercises
Vaporization of Phenol
8.4 Energy Balances for a Steam Turbine
¶
Summary
Problem Statement
Solution
Part a. What is the pump work?
Part b. What is the temperature of the steam produced by the boiler?
Part c. How much turbine work is produced?
Part d. What is the thermal efficiency, i.e., net work out/net heat in, for this system?
Figures
Energy-Balances-for-a-Steam-Turbine-Flowsheet.png
Energy-Balances-for-a-Steam-Turbine-Flowsheet-2.png
8.5 Humidity and Psychrometrics
¶
Summary
Definitions of Humidity
Relative Humidity
Absolute Humidity
Specific Humidity
Mixing Ratio (or Moisture Content, or Humidity Ratio)
Dew Point
Data Sources
Molar Masses of Air and Water
Vapor Pressure of Water
Steam Tables
Installation
Heat of Vaporization
Heat Capacities
Thermodynamic Modeling
Specific Volume
Enthalpy
Wet Bulb Temperature
Psychrometric Chart
Function Definition
Interactive Use with ipywidgets
Interactive Use with Google Colaboratory
References
Example
Is WaterSeer, an Indiegogo project, plausible?
Exercises
Warmups
Laboratory Air Supply
Snowmaking
Figures
20160618_090132.jpg
Links
Wagner and Pruß
iapws
WaterSeer
8.6 Adiabatic Flame Temperature
¶
Summary
Problem Statement
Solution
8.7 Torpedo Propulsion
¶
Summary
Background
Power and Energy Requirements
Hydrodynamic Power Requirement
Energy to Accelerate to Operating Speed
Energy to Reach Terminal Range
Fuel Energy Requirement
Monopropellant Propulsion for the Mk 48 Torpedo
Specific Enthalpy of Reaction
Specific Enthalpy of Reaction at 800m
Fuel Requirements
Second Estimate of Fuel Requirements
Mk 50 Torpedo
Heat of Reaction
Specific Heat of Reaction
Carnot Efficiency
Curzon-Ahlborn Efficiency
Fuel Requirement
The Black Shark Electric Torpedo
Gibb's Free Energy
Energy Requirement
Battery Requirement
Links
Torpedo technology
drag force on a torpedo
density of Otto fuel
1,2-propanediol dinitrate
NIST Webbook
available diagrams of the Mk 48 torpedo
adiabatic expansion of the combustion gases
Mk 50 torpedo
stoichiometric reaction
http://www.update.uu.se/~jolkkonen/pdf/CRC_TD.pdf
NIST Webbook
Black Shark torpedo
Appendix A. Products: Product Design and Analysis
¶
A.1 Diesel Engine Emissions Control
¶
Summary
Background
Problem 1
Problem 2
Problem 3
Problem 4
Problem 5
Links
Jupyter notebook
AUS32 (Aqueous Urea Solution 32.5%)
Diesel exhaust fluid (DEF)
Consumer Reports, January 4, 2010.
on-line
A.2 Pyrotechnic Design for Airbags
¶
Summary
Background
Exercises
Generation/Consumption Analysis
Design of the Reactant Mixture
Design of an Alternative Product using guanidine nitrate
Alternative Chemistries
Links
With proper design
A.3 Flameless Cooking
¶
Summary
Overview
Goals
Links
MagicCook
BaroCook
MealSpec
Flameless Ration Heater
history of its development
patented product
reviewer
Flameless Ration Heater
A.4 Artificial Gills for Underwater Breathing?
¶
Exercises
What are the oxygen requirements to sustain underwater activity?
How much oxygen is dissolved in seawater?
What are the liquid handling requirements?
Evalute Commercial Membrane Contacting Device
First Principles Design
What about carbon dioxide?
Is this a Feasible Technology?
Figures
James Bond rebreather from Thunderball
Links
Quora: Why can’t we take oxygen out of the water so divers have an unlimited supply of oxygen? Fish can do it; why haven’t we figured it out yet?
Amphibio: A Gill Garmet for our Aquatic Future
Jeabyun Yeon's Triton
Like a fish Underwater Breathing System
Artificial Human Gills Inpsired by Diving Bettles
Sequenced, Hemoglobin Based Artificial Gills
3M sells supported membrances specifically designed for removing dissolved gases from water
3M Liqui-Cel product literature
Polymeric membrances are generally well suited to gas separation
Appendix B. Projects: Process Systems Analysis
¶
B.1 West Virginia Chemical Spill
¶
Summary
Background
Problems
B.2 Ajka Alumina Plant Spill
¶
Summary
Background
Exercises
Generation/Consumption Analysis
Estimating Caustic Soda
Free Energy of Reaction
Estimating Equilibrium Constants
Estimate Equilibrium Yield
Flowsheet Analysis
How much acid should be shipped to the accident site?
Long Term Remediation
Figures
hungary_sludge_grap_930321a.jpg
Ajka_alumina_plant.pn
Links
Ajka, Hungary
New York Times
bauxite ore
Bayer process
Parks, George, American Mineralogist, Vol. 57, pp. 1163-1189 (1972)
CO
2
sequestration
Laboratory measurements