Created
May 22, 2020 22:50
-
-
Save catherinedevlin/c447a9ee4efc62d568096aba87c67826 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"cells": [ | |
{ | |
"cell_type": "markdown", | |
"metadata": {}, | |
"source": [ | |
"# Punch-frying a chicken\n", | |
"\n", | |
"For no good reason, a friend asked: how many times would you have to punch a chicken to deep-fry it?\n", | |
" \n", | |
"Let's assume a 6 lb chicken, 2 kg of cooking oil, starting at room temp, and that we only need to raise the chicken and oil to 325 F for cooking (neglecting heat to hold it there)\n", | |
"\n", | |
"Google up some quick stats for chicken heat capacity, oil heat capacity, and energy in a punch. They're in inconsisten units so we'll use Python's `pint` library to do unit conversions automatically." | |
] | |
}, | |
{ | |
"cell_type": "code", | |
"execution_count": 1, | |
"metadata": {}, | |
"outputs": [], | |
"source": [ | |
"import pint" | |
] | |
}, | |
{ | |
"cell_type": "code", | |
"execution_count": 5, | |
"metadata": {}, | |
"outputs": [], | |
"source": [ | |
"u = pint.UnitRegistry()" | |
] | |
}, | |
{ | |
"cell_type": "code", | |
"execution_count": 27, | |
"metadata": {}, | |
"outputs": [], | |
"source": [ | |
"chick_heat_cap = .74 * u.BTU / (u.lb * u.degR) * 6 * u.lb" | |
] | |
}, | |
{ | |
"cell_type": "code", | |
"execution_count": 34, | |
"metadata": {}, | |
"outputs": [ | |
{ | |
"data": { | |
"text/html": [ | |
"\\[4.4399999999999995\\ british\\_thermal\\_unit/degree\\_Rankine\\]" | |
], | |
"text/latex": [ | |
"$4.4399999999999995\\ \\frac{\\mathrm{british\\_thermal\\_unit}}{\\mathrm{degree\\_Rankine}}$" | |
], | |
"text/plain": [ | |
"4.4399999999999995 <Unit('british_thermal_unit / degree_Rankine')>" | |
] | |
}, | |
"execution_count": 34, | |
"metadata": {}, | |
"output_type": "execute_result" | |
} | |
], | |
"source": [ | |
"chick_heat_cap" | |
] | |
}, | |
{ | |
"cell_type": "code", | |
"execution_count": 28, | |
"metadata": {}, | |
"outputs": [], | |
"source": [ | |
"oil_heat_cap = 1.67 * u.kJ / (u.kg * u.K) * 2 * u.kg" | |
] | |
}, | |
{ | |
"cell_type": "code", | |
"execution_count": 35, | |
"metadata": {}, | |
"outputs": [ | |
{ | |
"data": { | |
"text/html": [ | |
"\\[3.34\\ kilojoule/kelvin\\]" | |
], | |
"text/latex": [ | |
"$3.34\\ \\frac{\\mathrm{kilojoule}}{\\mathrm{kelvin}}$" | |
], | |
"text/plain": [ | |
"3.34 <Unit('kilojoule / kelvin')>" | |
] | |
}, | |
"execution_count": 35, | |
"metadata": {}, | |
"output_type": "execute_result" | |
} | |
], | |
"source": [ | |
"oil_heat_cap" | |
] | |
}, | |
{ | |
"cell_type": "code", | |
"execution_count": 36, | |
"metadata": {}, | |
"outputs": [ | |
{ | |
"data": { | |
"text/html": [ | |
"\\[11.772007552\\ kilojoule/kelvin\\]" | |
], | |
"text/latex": [ | |
"$11.772007552\\ \\frac{\\mathrm{kilojoule}}{\\mathrm{kelvin}}$" | |
], | |
"text/plain": [ | |
"11.772007552 <Unit('kilojoule / kelvin')>" | |
] | |
}, | |
"execution_count": 36, | |
"metadata": {}, | |
"output_type": "execute_result" | |
} | |
], | |
"source": [ | |
"oil_heat_cap + chick_heat_cap" | |
] | |
}, | |
{ | |
"cell_type": "code", | |
"execution_count": 40, | |
"metadata": {}, | |
"outputs": [], | |
"source": [ | |
"delta_T = -(300 * u.degK - Q_(325, u.degF))" | |
] | |
}, | |
{ | |
"cell_type": "code", | |
"execution_count": 43, | |
"metadata": {}, | |
"outputs": [ | |
{ | |
"data": { | |
"text/html": [ | |
"\\[1600.1428265265781\\ kilojoule\\]" | |
], | |
"text/latex": [ | |
"$1600.1428265265781\\ \\mathrm{kilojoule}$" | |
], | |
"text/plain": [ | |
"1600.1428265265781 <Unit('kilojoule')>" | |
] | |
}, | |
"execution_count": 43, | |
"metadata": {}, | |
"output_type": "execute_result" | |
} | |
], | |
"source": [ | |
"delta_E = delta_T * (oil_heat_cap + chick_heat_cap)\n", | |
"delta_E" | |
] | |
}, | |
{ | |
"cell_type": "code", | |
"execution_count": 45, | |
"metadata": {}, | |
"outputs": [ | |
{ | |
"data": { | |
"text/html": [ | |
"\\[16001.42826526578\\ dimensionless\\]" | |
], | |
"text/latex": [ | |
"$16001.42826526578\\ dimensionless$" | |
], | |
"text/plain": [ | |
"16001.42826526578 <Unit('dimensionless')>" | |
] | |
}, | |
"execution_count": 45, | |
"metadata": {}, | |
"output_type": "execute_result" | |
} | |
], | |
"source": [ | |
"delta_E / (0.1 * u.kJ)" | |
] | |
}, | |
{ | |
"cell_type": "code", | |
"execution_count": null, | |
"metadata": {}, | |
"outputs": [], | |
"source": [] | |
} | |
], | |
"metadata": { | |
"kernelspec": { | |
"display_name": "Python 3", | |
"language": "python", | |
"name": "python3" | |
}, | |
"language_info": { | |
"codemirror_mode": { | |
"name": "ipython", | |
"version": 3 | |
}, | |
"file_extension": ".py", | |
"mimetype": "text/x-python", | |
"name": "python", | |
"nbconvert_exporter": "python", | |
"pygments_lexer": "ipython3", | |
"version": "3.7.6" | |
} | |
}, | |
"nbformat": 4, | |
"nbformat_minor": 4 | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment