-
Notifications
You must be signed in to change notification settings - Fork 8
/
Copy pathbouss1d.html
286 lines (273 loc) · 14.9 KB
/
bouss1d.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" /><meta name="generator" content="Docutils 0.19: https://docutils.sourceforge.io/" />
<title>Boussinesq solvers in One Space Dimension — Clawpack 5.11.x documentation</title>
<link rel="stylesheet" href="_static/base.css" type="text/css" />
<link rel="stylesheet" href="_static/layout.css" type="text/css" />
<link rel="stylesheet" type="text/css" href="_static/pygments.css" />
<link rel="stylesheet" type="text/css" href="_static/flasky.css" />
<link rel="stylesheet" type="text/css" href="_static/graphviz.css" />
<script data-url_root="./" id="documentation_options" src="_static/documentation_options.js"></script>
<script src="_static/jquery.js"></script>
<script src="_static/underscore.js"></script>
<script src="_static/_sphinx_javascript_frameworks_compat.js"></script>
<script src="_static/doctools.js"></script>
<script src="_static/sphinx_highlight.js"></script>
<link rel="shortcut icon" href="_static/clawicon.ico"/>
<link rel="author" title="About these documents" href="about.html" />
<link rel="index" title="Index" href="genindex.html" />
<link rel="search" title="Search" href="search.html" />
<link rel="next" title="Boussinesq solvers in Two Space Dimensions" href="bouss2d.html" />
<link rel="prev" title="GeoClaw in One Space Dimension" href="geoclaw1d.html" />
</head><body>
<div id="main-wrapper" class="sphinx">
<div id="header-wrapper">
<section id="header">
<!-- <h1><a href="http://clawpack.org/">Clawpack</a></h1> -->
<h1><a href="http://clawpack.org/">Clawpack-5</a></h1>
<nav>
<ul>
<li>
<a href="contents.html">Docs</a>
</li>
<li>
<a href="installing.html">Install</a>
</li>
<li>
<a class="" href="http://clawpack.org/gallery/index.html">Gallery</a>
</li>
<li>
<a href="about.html">Citation</a>
</li>
<li>
<a class="active" href="http://github.com/clawpack">GitHub</a>
</li>
<li>
<a class="" href="community.html">Community</a>
</li>
<li>
<a class="" href="developers.html">Contribute</a>
</li>
</ul>
</nav>
</section>
<div class="decoration"></div>
</div>
<div class="related" role="navigation" aria-label="related navigation">
<h3>Navigation</h3>
<ul>
<li class="right" style="margin-right: 10px">
<a href="genindex.html" title="General Index"
accesskey="I">index</a></li>
<li class="right" >
<a href="py-modindex.html" title="Python Module Index"
>modules</a> |</li>
<li class="right" >
<a href="bouss2d.html" title="Boussinesq solvers in Two Space Dimensions"
accesskey="N">next</a> |</li>
<li class="right" >
<a href="geoclaw1d.html" title="GeoClaw in One Space Dimension"
accesskey="P">previous</a> |</li>
<li class="nav-item nav-item-0"><a href="contents.html">Clawpack 5.11.x documentation</a> »</li>
<li class="nav-item nav-item-1"><a href="geoclaw.html" accesskey="U">GeoClaw Description and Detailed Contents</a> »</li>
<li class="nav-item nav-item-this"><a href="">Boussinesq solvers in One Space Dimension</a></li>
</ul>
</div>
<div class="document">
<div class="documentwrapper">
<div class="bodywrapper">
<div class="body" role="main">
<section id="boussinesq-solvers-in-one-space-dimension">
<span id="bouss1d"></span><h1>Boussinesq solvers in One Space Dimension<a class="headerlink" href="#boussinesq-solvers-in-one-space-dimension" title="Permalink to this heading">¶</a></h1>
<p>As of Version 5.10.0, the geoclaw repository contains some code for solving
problems in one space dimension, as described more generally in
<a class="reference internal" href="geoclaw1d.html#geoclaw1d"><span class="std std-ref">GeoClaw in One Space Dimension</span></a>. This 1d code also supports two different sets of
dispersive Boussinesq equations that have been used in the literature
to better model wave propagation in situations where the wavelength is not
sufficiently long relative to the fluid depth for the shallow water
equation (SWE) approximation to be accurate.</p>
<p>These Boussinesq equations are still depth-averaged equation with the same
conserved quantities (fluid depth <cite>h</cite> and momentum <cite>hu</cite> in 1d), but the
equations contain higher order derivative terms and so they are no longer
hyperbolic. The equations implemented include third-order derivatives
with respect to <cite>txx</cite>. However, the implementations proceed by alternating
steps with the shallow water equations and the solution of elliptic
equations that involve second-order derivatives in <cite>xx</cite> but no time derivatives.
In one space dimension, solving this equation requires solving a tridiagonal
linear system of equations in each time step.</p>
<p>See <a class="reference internal" href="bouss2d.html#bouss2d"><span class="std std-ref">Boussinesq solvers in Two Space Dimensions</span></a> and <a class="reference internal" href="biblio.html#bergerleveque2023" id="id1"><span>[BergerLeVeque2023]</span></a> for more discussion
of the Boussinesq-type equations SGN and MS that are implemented in GeoClaw.
We recommend using the Serre-Green-Naghdi (SGN) equations rather than
Madsen-Sorensen (MS), which has similar dispersive properties but
is less stable.</p>
<section id="using-the-1d-boussinesq-code">
<span id="bouss1d-usage"></span><h2>Using the 1d Boussinesq code<a class="headerlink" href="#using-the-1d-boussinesq-code" title="Permalink to this heading">¶</a></h2>
<p>As in the 1d shallow water implementation, general mapped grids can be used,
but AMR is not supported in 1d. The plane wave (<cite>coordinate_system == 1</cite>)
and planar radial (<cite>coordinate_system == -1</cite>) versions of the Boussinesq
equations are both implemented. The axisymmetric version on the sphere
(<cite>coordinate_system == 2</cite>) is not yet implemented.</p>
<p>Specifying topo and dtopo files is identical to what is described for
<a class="reference internal" href="geoclaw1d.html#geoclaw1d"><span class="std std-ref">GeoClaw in One Space Dimension</span></a>.</p>
<p>The <cite>Makefile</cite> and <cite>setrun.py</cite> files must be modified from those used
for SWE as described below.
See the examples with names like <cite>$CLAW/geoclaw/examples/1d/bouss_*</cite>
for sample files to use as a template.</p>
<section id="makefile">
<span id="bouss1d-makefile"></span><h3>Makefile<a class="headerlink" href="#makefile" title="Permalink to this heading">¶</a></h3>
<p>A different <cite>Makefile</cite> is required for applications to use code from both
the <cite>$CLAW/geoclaw/src/1d/shallow</cite> and <cite>$CLAW/geoclaw/src/1d/bouss</cite>
libraries.</p>
<p>Solving the Boussinesq equations requires solving an elliptic equation each
time step, which in one space dimension yields a tridiagonal linear system of
equations. LAPACK is used for this, and the <cite>Makefile</cite> requires <cite>FFLAGS</cite> to
include <cite>-llapack -lblas</cite> or explicit pointers to these libraries on your
computer. Alternatively, the file
<cite>$CLAW/geoclaw/src/1d/bouss/lapack_tridiag.f</cite>
contains the necessary soubroutines from lapack and the blas and so you can
add this to the list of <cite>SOURCES</cite> in the <cite>Makefile</cite>. See
<cite>$CLAW/geoclaw/src/1d/examples/bouss_wavetank_matsuyama/Makefile</cite>
for an example.</p>
<p>OpenMP is not used in the 1d codes, so there is no need to compile with
these flags. For more about <cite>FFLAGS</cite> and suggested settings for debugging,
see <a class="reference internal" href="fortran_compilers.html#fortran-fflags"><span class="std std-ref">FFLAGS environment variable</span></a>.</p>
</section>
<section id="setrun-py">
<span id="bouss1d-setrun"></span><h3>setrun.py<a class="headerlink" href="#setrun-py" title="Permalink to this heading">¶</a></h3>
<p>To use the Boussinesq solvers, somewhere in the <cite>setrun</cite> function you
must include</p>
<div class="highlight-default notranslate"><div class="highlight"><pre><span></span><span class="kn">from</span> <span class="nn">clawpack.geoclaw.data</span> <span class="kn">import</span> <span class="n">BoussData1D</span>
<span class="n">rundata</span><span class="o">.</span><span class="n">add_data</span><span class="p">(</span><span class="n">BoussData1D</span><span class="p">(),</span><span class="s1">'bouss_data'</span><span class="p">)</span>
</pre></div>
</div>
<p>and then the following parameters can be adjusted (the values shown here
are the default values that will be used if you do not specify a value
directly):</p>
<div class="highlight-default notranslate"><div class="highlight"><pre><span></span><span class="n">rundata</span><span class="o">.</span><span class="n">bouss_data</span><span class="o">.</span><span class="n">equations</span> <span class="o">=</span> <span class="mi">2</span> <span class="c1"># 0=SWE, 1=MS, 2=SGN</span>
<span class="n">rundata</span><span class="o">.</span><span class="n">bouss_data</span><span class="o">.</span><span class="n">deepBouss</span> <span class="o">=</span> <span class="mf">5.</span> <span class="c1"># depth (meters) to switch to SWE</span>
</pre></div>
</div>
<p>The <cite>rundata.bouss_data</cite> object has attributes:</p>
<ul>
<li><p><cite>bouss_equations</cite>: The system of equations being solved. Setting this to 2
gives the recommended SGN equations.</p>
<p>The value <cite>alpha = 1.153</cite> recommended for SGN is
hardwired into <cite>$CLAW/geoclaw/src/2d/bouss/bouss_module.f90</cite>. To change
this value, you must modify this module. (See <a class="reference internal" href="makefiles_library.html#makefiles-library"><span class="std std-ref">Library routines in Makefiles</span></a>
for tips on modifying a library routine.) Similarly, if you set
<cite>bouss_equations = 1</cite> for the Madsen-Sorensen equations, the recommended
parameter value <cite>Bparam = 1/15</cite> is set in <cite>bouss_module.f90</cite>.</p>
<p>Setting <cite>bouss_equations = 0</cite> causes the code to revert to the shallow
water equations, useful for comparing dispersive and nondispersive results.</p>
</li>
<li><p><cite>bouss_min_depth</cite>: The criterion used for switching from Boussinesq to SWE
in shallow water and onshore. If the original water depth <cite>h</cite> at time <cite>t0</cite>
is less than <cite>bouss_min_depth</cite> in a cell or any of its nearest neighbors,
then this cell is omitted from set of unknowns in the elliptic equation
solve and no dispersive correction terms are calculated for this cell.</p></li>
</ul>
<p>The latter parameter is needed because in very shallow water, and for
modeling onshore inundation, the Boussinesq equations are not suitable.
So some criterion is needed to drop these correction terms and revert to
solving SWE near shore. Many different approaches have been used in the
literature. So far we have only implemented the simplest common approach,
which is to revert to SWE in any grid cell where the initial water depth (at
the initial time) is less than <cite>bouss_min_depth</cite>.
See <a class="reference internal" href="bouss2d.html#bouss2d-switch"><span class="std std-ref">Wave breaking and switching to SWE</span></a> for more discussion.</p>
</section>
</section>
</section>
<div class="clearer"></div>
</div>
</div>
</div>
<div class="sphinxsidebar" role="navigation" aria-label="main navigation">
<div class="sphinxsidebarwrapper">
<p><a href="http://clawpack.org/">
<img class="logo" src= "_static/clawlogo.jpg" alt="Logo"/>
</a>
<h2>Version 5.11.x</h2>
</p>
<div>
<h3><a href="contents.html">Table of Contents</a></h3>
<ul>
<li><a class="reference internal" href="#">Boussinesq solvers in One Space Dimension</a><ul>
<li><a class="reference internal" href="#using-the-1d-boussinesq-code">Using the 1d Boussinesq code</a><ul>
<li><a class="reference internal" href="#makefile">Makefile</a></li>
<li><a class="reference internal" href="#setrun-py">setrun.py</a></li>
</ul>
</li>
</ul>
</li>
</ul>
</div><h3>Related Topics</h3>
<ul>
<li><a href="contents.html">Documentation overview</a><ul>
<li><a href="geoclaw.html">GeoClaw Description and Detailed Contents</a><ul>
<li>Previous: <a href="geoclaw1d.html" title="previous chapter">GeoClaw in One Space Dimension</a></li>
<li>Next: <a href="bouss2d.html" title="next chapter">Boussinesq solvers in Two Space Dimensions</a></li>
</ul></li>
</ul></li>
</ul>
<div class="widget navlinks">
<h3>This Page</h3>
<ul class="this-page-menu">
<li><a href="_sources/bouss1d.rst.txt"
rel="nofollow"
target="_blank">Source .rst</a></li>
<li><a href="https://github.com/clawpack/doc/blob/dev/doc/bouss1d.rst"
rel="nofollow"
target="_blank">Source on GitHub</a></li>
<li><a href="https://github.com/clawpack/doc/commits/dev/doc/bouss1d.rst"
rel="nofollow"
target="_blank">History</a></li>
<li><a href="https://github.com/clawpack/doc/edit/dev/doc/bouss1d.rst"
rel="nofollow"
target="_blank">Suggest Edits</a></li>
<li><a href="https://github.com/clawpack/doc/issues/new/choose"
rel="nofollow"
target="_blank">Raise an Issue</a></li>
</ul>
</div>
<div id="searchbox" style="display: none" role="search">
<h3 id="searchlabel">Quick search</h3>
<div class="searchformwrapper">
<form class="search" action="search.html" method="get">
<input type="text" name="q" aria-labelledby="searchlabel" autocomplete="off" autocorrect="off" autocapitalize="off" spellcheck="false"/>
<input type="submit" value="Go" />
</form>
</div>
</div>
<script>document.getElementById('searchbox').style.display = "block"</script>
<h4>Latest Version</h4>
<ul>
<li><a href="./dev/bouss1d.html">dev</a></li>
<li><a href="bouss1d.html">v5.11.x</a></li>
</ul>
<h4>Older Versions</h4>
<ul>
<li><a href="./v5.10.x/bouss1d.html">v5.10.x</a></li>
<li><a href="./v5.7.x/index.html">v5.7.x</a></li>
<li><a href="./v5.8.x/index.html">v5.8.x</a></li>
<li><a href="./v5.9.x/bouss1d.html">v5.9.x</a></li>
</ul>
</div>
</div>
<div class="clearer"></div>
</div>
<div class="footer">
© Copyright CC-BY 2024, The Clawpack Development Team.
Created using <a href="http://sphinx.pocoo.org/">Sphinx</a>.
</div>
<script>
(function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){
(i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o),
m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m)
})(window,document,'script','//www.google-analytics.com/analytics.js','ga');
ga('create', 'UA-44811544-1', 'auto');
ga('send', 'pageview');
</script>
</body>
</html>