{
"cells": [
{
"cell_type": "code",
"execution_count": 1,
"metadata": {
"collapsed": false
},
"outputs": [
{
"data": {
"text/html": [
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
""
],
"text/plain": [
""
]
},
"execution_count": 1,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"from IPython.core.display import HTML\n",
"css_file = '../style/style.css'\n",
"HTML(open(css_file, \"r\").read())"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"# Workshop on Modelling Tsunamis and Flash Flood Inundation with GeoClaw \n",
"\n",
"## Part 2: (Exercise) Adding a wall to the channel\n",
"\n",
"### José Galaz\n",
"[https://jgalazm.github.io](https://jgalazm.github.io)"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"## Instructions"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"1. Define the function **topo_withDownstreamWall** that receives two arrays $x$ and $y$ and returns another array with the same topography as in the example of Part 1 in this workshop, but with the addition of a wall in the downstream channel defined by a 15m height in the region where $(x,y)\\in[50,55]\\times[-75,25]$.\n",
"\n",
"2. Define a function that writes the topography function in 1. into a file **'channel_withDownstreamWall.topotype2'** with $topo\\_type=2$ and same discretization as in Part 1.\n",
"\n",
"3. Similarly define a function **qinit_withDownstreamWall** that represents the initial condition, as in the Part 1, and write it to a file called **'qinit_withDownstreamWall.topotype2'** with $topo\\_type=2$.\n",
"\n",
"4. From a new cell in this notebook write a setrun.py file that can read the new data. It must satisfy the following conditions:\n",
" * Same domain and output times as in Part 1\n",
" * It should have a total of 3 refinement regions.\n",
" * The refinement ratios must be $r_x = r_y = [4,2]$\n",
" * One region should cover the whole domain and force $level = 1$ there.\n",
" * Other region should be around the wall of the dam for $(x,y) \\in[-10,10]\\times[-100,100]$, whith at least the resolution of level 2.\n",
" * Other region that covers the new wall in a rectangle $\\pm 10$ meters in each direction, from the region that defines it. That is in $(x,y) \\in[-40,65]\\times[-85,35]$\n",
"\n",
"5. Run the simulation and show a video and punctual results in the same points as in Part 1. Cmpare with Part 1. Comment."
]
}
],
"metadata": {
"kernelspec": {
"display_name": "Python 2",
"language": "python",
"name": "python2"
},
"language_info": {
"codemirror_mode": {
"name": "ipython",
"version": 2
},
"file_extension": ".py",
"mimetype": "text/x-python",
"name": "python",
"nbconvert_exporter": "python",
"pygments_lexer": "ipython2",
"version": "2.7.11"
}
},
"nbformat": 4,
"nbformat_minor": 0
}