Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save JJRyan0/652d2f15f5426e2d8256c4583d89b59c to your computer and use it in GitHub Desktop.
Save JJRyan0/652d2f15f5426e2d8256c4583d89b59c to your computer and use it in GitHub Desktop.
LaTeX Expression for Wave Energy Flux Formula.ipynb
Display the source blob
Display the rendered blob
Raw
{
"cells": [
{
"metadata": {
"collapsed": true,
"trusted": true
},
"cell_type": "code",
"source": "import matplotlib.pyplot as plt\n%matplotlib inline",
"execution_count": 4,
"outputs": []
},
{
"metadata": {
"collapsed": false,
"trusted": true
},
"cell_type": "code",
"source": "from IPython.display import display, Math, Latex",
"execution_count": 5,
"outputs": []
},
{
"metadata": {
"collapsed": false,
"trusted": true
},
"cell_type": "code",
"source": "display(Math(r'P = \\frac{\\rho g^2} {64\\pi}H^2_m0 T_e\\approx (0.5 \\frac {kW}{m^3 s}) H^2_m0 T_e,'))\ndisplay(Math(r'Results = kW / metre '))\n",
"execution_count": 6,
"outputs": [
{
"output_type": "display_data",
"data": {
"text/plain": "<IPython.core.display.Math object>",
"text/latex": "$$P = \\frac{\\rho g^2} {64\\pi}H^2_m0 T_e\\approx (0.5 \\frac {kW}{m^3 s}) H^2_m0 T_e,$$"
},
"metadata": {}
},
{
"output_type": "display_data",
"data": {
"text/plain": "<IPython.core.display.Math object>",
"text/latex": "$$Results = kW / metre $$"
},
"metadata": {}
}
]
},
{
"metadata": {},
"cell_type": "raw",
"source": "P = wave energy flux per unit of wave-crest length \nHm0 = the significant wave height in Metres\nTe = wave energy period in seconds, \nρ the water density and \ng the acceleration by gravity\nResult = wave power in kilowatts (kW) per metre of wavefront length"
}
],
"metadata": {
"kernelspec": {
"name": "python2",
"display_name": "Python 2",
"language": "python"
},
"_draft": {
"nbviewer_url": "https://gist.github.com/a06f801ea0f01fa1ad41bd09989c7e4e"
},
"language_info": {
"mimetype": "text/x-python",
"nbconvert_exporter": "python",
"name": "python",
"pygments_lexer": "ipython2",
"version": "2.7.11",
"file_extension": ".py",
"codemirror_mode": {
"version": 2,
"name": "ipython"
}
},
"gist": {
"id": "a06f801ea0f01fa1ad41bd09989c7e4e",
"data": {
"description": "LaTeX Expression for Wave Energy Flux Formula.ipynb",
"public": true
}
}
},
"nbformat": 4,
"nbformat_minor": 0
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment