-
Notifications
You must be signed in to change notification settings - Fork 7
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
713 changed files
with
1,324 additions
and
73 deletions.
There are no files selected for viewing
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
# Sphinx build info version 1 | ||
# This file hashes the configuration used when building these files. When it is not found, a full rebuild will be done. | ||
config: 805152217bca8379bda1265a659f9ddf | ||
config: 1d1678fa7a647d9a49f8fb23d4c7ee3e | ||
tags: 645f666f9bcd5a90fca523b33c5a78b7 |
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file modified
BIN
+0 Bytes
(100%)
dev/.doctrees/riemann/Shallow_water_Riemann_solvers.doctree
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,126 @@ | ||
.. _bouss1d: | ||
|
||
********************************************* | ||
Boussinesq solvers in One Space Dimension | ||
********************************************* | ||
|
||
.. warning :: Not yet incorporated in clawpack master branch or releases. | ||
As of Version 5.10.0 (?), the geoclaw repository contains some code for solving | ||
problems in one space dimension, as described more generally in | ||
:ref:`geoclaw1d`. This 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 approximation to be accurate. | ||
|
||
These Boussinesq equations are still depth-averaged equation with the same | ||
conserved quantities (fluid depth `h` and momentum `hu` 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 `txx`. However, the implementations proceed by alternating | ||
steps with the shallow water equations and the solution of elliptic | ||
equations that involve only second-order derivatives in `xx`. | ||
|
||
.. _bouss1d_sgn: | ||
|
||
The SGN equations | ||
----------------- | ||
|
||
The recommended set of equations to use are a modification of the | ||
Serre-Green-Naghdi (SGN) equations with the addition of a parameter `alpha` | ||
suggested by Bonneton et al. Both the 1d and 2d versions of these equations | ||
and their GeoClaw implementation are discussed in [BergerLeVeque2023]_. | ||
Setting `alpha = 1` gives the original SGN equations, but `alpha = 1.153` is | ||
recommended since it gives a better approximation to the linear dispersion | ||
relation of the Airy solution to the full 3d problem. | ||
|
||
.. _bouss1d_ms: | ||
|
||
The Madsen-Sorensen (MS) equations | ||
---------------------------------- | ||
|
||
These equations also give a good approximation to the linear dispersion | ||
relation of the Airy solution when the parameter `beta = 1/15` is used. | ||
These equations were used in an earlier GeoClaw implementation known as | ||
BoussClaw. These have been reimplemented in GeoClaw more recently, | ||
including a 2d implementation that allows the use of AMR. However, | ||
extensive tests with these equations have revealed some stability issues, | ||
particularly in the case of AMR, which have also been reported by others. | ||
The 1d MS implementation is included in GeoClaw but it is generally not | ||
recommended except for those interested in comparing different formulations | ||
and perhaps further investigating the stability issues. | ||
|
||
.. _bouss1d_usage: | ||
|
||
Using the 1d Boussinesq code | ||
---------------------------- | ||
|
||
As in the 1d shallow water implementation, general mapped grids can be used, | ||
but AMR is not supported in 1d. The plane wave (`coordinate_system == 1`) | ||
and planar radial (`coordinate_system == -1`) versions of the Boussinesq | ||
equations are both implemented. The axisymmetric version on the sphere | ||
(`coordinate_system == 2`) is not yet implemented. | ||
|
||
Specifying topo and dtopo files is identical to what is described for | ||
:ref:`geoclaw1d`. | ||
|
||
**Some things that must change:** | ||
|
||
See the examples with names like `$CLAW/geoclaw/examples/1d/bouss_*` | ||
for some sample code that can be modified for other problems. | ||
|
||
.. _bouss1d_makefile: | ||
|
||
Makefile | ||
^^^^^^^^ | ||
|
||
A different `Makefile` is required for applications to use code from both | ||
the `$CLAW/geoclaw/src/1d/shallow` and `$CLAW/geoclaw/src/1d/bouss` | ||
libraries. | ||
|
||
Solving the Boussinesq equations requires solving an elliptic equation each | ||
time step, by setting up and solving a tridiagonal linear system of | ||
equations. LAPACK is used for this, and the `Makefile` requires `FFLAGS` to | ||
include `-llapack -lblas` or explicit pointers to these librarires on your | ||
computer. Alternatively, the file | ||
`$CLAW/geoclaw/src/1d/bouss/lapack_tridiag.f` | ||
contains the necessary soubroutines from lapack and the blas and so you can | ||
add this to the list of `SOURCES` in the `Makefile`. See e.g. | ||
`$CLAW/geoclaw/src/1d/examples/bouss_wavetank_matsuyama/Makefile` | ||
for an example. | ||
|
||
OpenMP is not used in the 1d codes, so there is no need to compile with | ||
these flags. For more about `FFLAGS` and suggested settings for debugging, | ||
see :ref:`fortran_fflags`. | ||
|
||
.. _bouss1d_setrun: | ||
|
||
setrun.py | ||
^^^^^^^^^ | ||
|
||
|
||
Some additional parameters must be added to `setrun.py`, typically set as | ||
follows:: | ||
|
||
from clawpack.geoclaw.data import BoussData1D | ||
rundata.add_data(BoussData1D(),'bouss_data') | ||
rundata.bouss_data.bouss = True | ||
rundata.bouss_data.equations = 2 # for SGN (recommended, or 1 for MS) | ||
rundata.bouss_data.deepBouss = 5. # depth (meters) to switch to SWE | ||
|
||
The `rundata.bouss_data` object has attributes: | ||
|
||
- `bouss_equations` (int): Which equation set to use | ||
(0 for SWE, 1 for MS, 2 for SGN). | ||
- `bouss_min_depth` (float): water depth at which to switch from Boussinesq | ||
to SWE. | ||
|
||
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 `bouss_min_depth`. | ||
|
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
.. _bouss2d: | ||
|
||
********************************************* | ||
Boussinesq solvers in Two Space Dimensions | ||
********************************************* | ||
|
||
To appear in a future release. | ||
|
||
See [BergerLeVeque2023]_. | ||
|
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
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,181 @@ | ||
.. _geoclaw1d: | ||
|
||
********************************************* | ||
GeoClaw in One Space Dimension | ||
********************************************* | ||
|
||
.. warning :: Not yet incorporated in clawpack master branch or releases. | ||
As of Version 5.10.0 (?), the geoclaw repository contains some code for solving | ||
problems in one space dimension. This can be used for solving plane wave | ||
problems on planar topography (including onshore inundation), as well as | ||
radially symmetric problems on the plane | ||
or axisymmetric problems on the sphere (see :ref:`geoclaw1d_coord`). | ||
|
||
Some general notes: | ||
|
||
- The standard 2d version of GeoClaw can be used to solve 1d problem by | ||
simply specifying a domain that is only a few cells wide in the | ||
y-direction, and insuring that the topography, initial data, and any dtopo | ||
files varies only in x as well. By setting the AMR refinement ratios to be | ||
1 in the y-direction, it is possible to still use adaptive mesh refinement | ||
in x. For some 1d problems this may be the best approach. | ||
|
||
- By contrast, the newly introduced 1d code does not support AMR at this | ||
time. Instead, a fixed grid is used. However, the grid spacing may be | ||
variable and some tools are provided to compute a mapped grid that has the | ||
property that the Courant number (based on the linearized | ||
shallow water wave speed `sqrt(g*h)`)is roughly constant, so that cells in | ||
deep water are larger than cells in shallow water (transitioning to a | ||
uniform grid in very shallow water and onshore). For some problems a fine | ||
1d grid of this nature can be used to compute a very accurate solution and | ||
is sometimes preferable to using AMR. | ||
|
||
- In addition to shallow water equations, the 1d code also supports two | ||
different forms of Boussinesq equations, which include dispersive terms | ||
and better model waves whose wavelength is short compared to the fluid | ||
depth. For more information, see :ref:`bouss1d`. | ||
(Two-dimensional Boussinesq solvers have also recently been implemented, | ||
with AMR, and will appear in a future release; see :ref:`bouss2d`.) | ||
|
||
- Topography data (topo files) and moving topography (dtopo files) can be | ||
specified much as in 2d GeoClaw; see :ref:`topo1d` below. | ||
|
||
The 1d library routines are found in `$CLAW/geoclaw/src/1d_classic/shallow`, | ||
with some additional routines needed for the Boussinesq solvers in | ||
`$CLAW/geoclaw/src/1d_classic/bouss`. | ||
|
||
Some examples illustrating usage can be found in | ||
`$CLAW/geoclaw/examples/1d`, and some plots and animations can be viewed in | ||
the :ref:`gallery_geoclaw`. | ||
|
||
.. geoclaw1d_coord: | ||
Coordinate systems | ||
------------------- | ||
|
||
In `setrun.py`, the parameter `rundata.geo_data.coordinate_system` | ||
can be used to specify the coordinate system to be used. | ||
|
||
- `rundata.geo_data.coordinate_system == 1`: `x` is measured in meters. This | ||
is the most natural coordinate system for many 1d problems, e.g. modeling | ||
waves in a wave tank, or plane waves in the ocean (provided the topography | ||
only varies in the direction of propagation). | ||
|
||
- `rundata.geo_data.coordinate_system == -1`: `x >= 0` is measured in meters | ||
and represents radial distance. | ||
In this case, the solution is assumed to a 1d cross section of | ||
a rotationally symmetric 2d solution. The 2d shallow water (or | ||
Boussinesq) equations can then be reduced to 1d equations that have a | ||
similar form to the plane wave equations, with the addition also of a | ||
geometric source term. This source term is built in to the solution | ||
procedure in this case. | ||
|
||
- `rundata.geo_data.coordinate_system == 2`: `x` is measured in degrees | ||
for a problem that is rotationally symmetric on the sphere about some axis | ||
of rotation, e.g. waves | ||
spreading out from a radially symmetric crater on topography that is also | ||
rotationally symmetric about the same axis. In this case `-90 <= x <=90` | ||
with the endpoints corresponding to the two points where the axis intersects | ||
the sphere, so it represents latitude with respect to this axis. | ||
(If the axis passes through the poles then `x` is the ordinary | ||
latitude with `x = -90` at the south pole and `x = +90` at the north pole.) | ||
|
||
As in the case of radial symmetry, the spherical case requires some | ||
changes in the equations and the addition of a geometric source term. | ||
Near each pole the solution behaves much as in the radial symmetric case, | ||
but note that waves from a disturbance at one pole will initially | ||
decay as they spread out but after passing the equator they will start to | ||
refocus at the other pole. | ||
|
||
|
||
.. geoclaw1d_grids: | ||
Uniform and mapped grids | ||
------------------------ | ||
|
||
In `setrun.py`, the parameter `rundata.grid_data.grid_type` | ||
can be used to specify the computational grid to be used. | ||
|
||
- `rundata.grid_data.grid_type == 0`: A uniform grid is used, with | ||
spacing determined by the domain length and the number of grid cells | ||
specified. | ||
|
||
- `rundata.grid_data.grid_type == 1`: A mapped grid is used. | ||
In this case a function `mapc2p.f90` must be provided to map | ||
the computational grid specified in `setrun.py` to physical cells. | ||
See :ref:`mapc2p`. | ||
|
||
- `rundata.grid_data.grid_type == 2`: A nonuniform grid is used with a | ||
user-specified set of grid cell edges. In this case | ||
`rundata.grid_data.fname_celledges` should be set to a string | ||
giving the name of the file that contains the cell edges (one per line). | ||
Also, the computational grid should be in the domain `0 <= x <= 1`, i.e.:: | ||
|
||
clawdata.lower[0] = 0. # xlower | ||
clawdata.upper[0] = 1. # xupper | ||
clawdata.num_cells[0] = mx # number of grid cells | ||
|
||
In this case the number of celledges in the data file should be `mx+1`. | ||
|
||
.. geoclaw1d_topo: | ||
Topograpy data | ||
------------------- | ||
|
||
Topography data is specified in a file that has two columns, with values | ||
`x, B` specifying the topo value `B` at spatial locations `x`. | ||
The topography is viewed as being piecewise linear connecting these points. | ||
As in 2d GeoClaw, the finite volume cells used for the computation have a | ||
single cell-averaged `B` value that is obtained by cell-averaging this | ||
piecewise linear function. | ||
|
||
Note that if a mapped grid is used and if the topography values are | ||
specified at the cell edges, then the cell-averaged finite volume values are | ||
simply the average of the `B` values from each edge of the cell. In this | ||
case, the same file that is used to specify the topography can also be used | ||
to specify the grid. (The second column is ignored when it is read in as a | ||
grid specification.) | ||
|
||
In `setrun.py`, the parameter `rundata.topo_data.topofiles` | ||
is set to a list of topofiles, each of which is specified by a list | ||
containing the `topo_type` and `topofile_path`, the path to the file, as | ||
in 2d. Currently only one topofile is supported, and | ||
so this should have the form: | ||
|
||
rundata.topo_data.topofiles = [[topo_type, topofile_path]] | ||
|
||
Currently only `topo_type == 1` is supported, which has the form described | ||
above. | ||
|
||
|
||
.. geoclaw1d_dtopo: | ||
Moving topograpy (dtopo) data | ||
----------------------------- | ||
|
||
In `setrun.py`, the parameter `rundata.dtopo_data.dtopofiles` | ||
is set to a list of dtopofiles, each of which is specified by a list | ||
containing the `dtopo_type` and `dtopofile_path`, the path to the file, as | ||
in 2d. Currently only one dtopofile is supported, and | ||
so this should have the form: | ||
|
||
rundata.dtopo_data.dtopofiles = [[dtopo_type, dtopofile_path]] | ||
|
||
Currently only `dtopo_type == 1` is supported, and the dtopofile should have | ||
a form similar to what was described for topofiles above, | ||
except that each line | ||
starts with a *t* value for the time, so each line contains t,x,dz | ||
|
||
The `x,dz` values give the displacement `dz` at `x` at time `t`. It is assumed | ||
that the grid is uniform and that the file contains `mx*mt` lines if mt | ||
different times are specified on a grid with mx points. | ||
|
||
One way to specify a dtopo file is to use the Okada model (see :ref:`okada`) | ||
in a situation where the fault is dipping in the x-direction and the fault | ||
geometry and slip are assumed | ||
to be constant in the y-direction over a long enough distance that a 1d | ||
slice in x is a reasonable model. | ||
Tools are provided create such a dtopo file, see the example in | ||
`$CLAW/geoclaw/examples/1d/okada_dtopo`. | ||
|
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
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
Oops, something went wrong.