Created
July 7, 2022 05:00
-
-
Save connorferster/d63600fe7afb8772ca45d53ba4875065 to your computer and use it in GitHub Desktop.
This file contains 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": "raw", | |
"id": "8133400d-d9a2-4f32-bbca-8f093d850d38", | |
"metadata": {}, | |
"source": [ | |
"---\n", | |
"title: My notebook\n", | |
"description: Test notebook on Mercury\n", | |
"show-code: False\n", | |
"params:\n", | |
" phi:\n", | |
" input: numeric\n", | |
" label: material factor\n", | |
" f_y:\n", | |
" input: numeric\n", | |
" label: Input steel yield strength\n", | |
" b:\n", | |
" input: numeric\n", | |
" label: Select width\n", | |
" d:\n", | |
" input: numeric\n", | |
" label: Select depth\n", | |
"---" | |
] | |
}, | |
{ | |
"cell_type": "code", | |
"execution_count": 6, | |
"id": "221cbbfd-22ad-4761-a907-936798d4412b", | |
"metadata": {}, | |
"outputs": [], | |
"source": [ | |
"import handcalcs.render" | |
] | |
}, | |
{ | |
"cell_type": "markdown", | |
"id": "8923663a-af1c-41bc-9dd2-092b31ee571d", | |
"metadata": {}, | |
"source": [ | |
"## Test Application" | |
] | |
}, | |
{ | |
"cell_type": "code", | |
"execution_count": 7, | |
"id": "62339586-5247-4427-bb5a-3ac3da8e7cb2", | |
"metadata": {}, | |
"outputs": [], | |
"source": [ | |
"# Inputs\n", | |
"phi = 0.9\n", | |
"f_y = 400\n", | |
"b = 200\n", | |
"d = 400" | |
] | |
}, | |
{ | |
"cell_type": "markdown", | |
"id": "5724aaba-d4a8-4462-bac1-d2bc99849dbe", | |
"metadata": {}, | |
"source": [ | |
"## Section modulus" | |
] | |
}, | |
{ | |
"cell_type": "code", | |
"execution_count": 8, | |
"id": "b2affe29-8a8f-4643-9d69-5a3505aca245", | |
"metadata": {}, | |
"outputs": [ | |
{ | |
"data": { | |
"text/latex": [ | |
"\\[\n", | |
"\\begin{aligned}\n", | |
"s &= \\frac{ b \\cdot \\left( d \\right) ^{ 2 } }{ 6 } = \\frac{ 200 \\cdot \\left( 400 \\right) ^{ 2 } }{ 6 } &= 5333333.333 \n", | |
"\\end{aligned}\n", | |
"\\]" | |
], | |
"text/plain": [ | |
"<IPython.core.display.Latex object>" | |
] | |
}, | |
"metadata": {}, | |
"output_type": "display_data" | |
} | |
], | |
"source": [ | |
"%%render\n", | |
"s = (b * d**2) / 6" | |
] | |
}, | |
{ | |
"cell_type": "markdown", | |
"id": "70fc919d-267b-457f-9780-b5608788d378", | |
"metadata": {}, | |
"source": [ | |
"## Moment Resistance" | |
] | |
}, | |
{ | |
"cell_type": "code", | |
"execution_count": 10, | |
"id": "a47e4c89-f56e-4bea-a1b3-8e936339b799", | |
"metadata": {}, | |
"outputs": [ | |
{ | |
"data": { | |
"text/latex": [ | |
"\\[\n", | |
"\\begin{aligned}\n", | |
"M_{r} &= \\phi \\cdot f_{y} \\cdot s = 0.9 \\cdot 400 \\cdot 5333333.3 &= 1920000000.0 \n", | |
"\\end{aligned}\n", | |
"\\]" | |
], | |
"text/plain": [ | |
"<IPython.core.display.Latex object>" | |
] | |
}, | |
"metadata": {}, | |
"output_type": "display_data" | |
} | |
], | |
"source": [ | |
"%%render 1\n", | |
"M_r = phi * f_y * s" | |
] | |
} | |
], | |
"metadata": { | |
"kernelspec": { | |
"display_name": "Python 3 (ipykernel)", | |
"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.10.4" | |
} | |
}, | |
"nbformat": 4, | |
"nbformat_minor": 5 | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment