Skip to content

Commit

Permalink
finish a pass
Browse files Browse the repository at this point in the history
  • Loading branch information
zingale committed Sep 15, 2024
1 parent 70ba389 commit 781f71f
Show file tree
Hide file tree
Showing 5 changed files with 36 additions and 72 deletions.
6 changes: 3 additions & 3 deletions docs/source/advection_basics.rst
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
*****************
Advection solvers
*****************
*********
Advection
*********

The linear advection equation:

Expand Down
6 changes: 3 additions & 3 deletions docs/source/compressible_basics.rst
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
**********************************
Compressible hydrodynamics solvers
**********************************
**************************
Compressible hydrodynamics
**************************

The Euler equations of compressible hydrodynamics take the form:

Expand Down
22 changes: 6 additions & 16 deletions docs/source/lowmach_basics.rst
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
Low Mach number hydrodynamics solver
====================================
*****************************
Low Mach number hydrodynamics
*****************************

pyro's low Mach hydrodynamics solver is designed for atmospheric
flows. It captures the effects of stratification on a fluid element by
Expand All @@ -14,24 +15,13 @@ governing equations are:
with :math:`\nabla p_0 = \rho_0 g` and :math:`\beta_0 = p_0^{1/\gamma}`.

``lm_atm`` solver
=================

As with the incompressible solver, we implement a cell-centered approximate projection method.

The main parameters that affect this solver are:

.. include:: lm_atm_defaults.inc

Examples
--------

bubble
^^^^^^

The bubble problem places a buoyant bubble in a stratified atmosphere
and watches the development of the roll-up due to shear as it
rises. This is run as:

.. prompt:: bash

pyro_sim.py lm_atm bubble inputs.bubble

.. include:: lm_atm_problems.inc
70 changes: 24 additions & 46 deletions docs/source/swe_basics.rst
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
Shallow water solver
====================
***************************
Shallow water hydrodynamics
***************************

The (augmented) shallow water equations take the form:

Expand All @@ -13,26 +14,32 @@ with :math:`h` is the fluid height, :math:`U` the fluid velocity, :math:`g` the
gravitational acceleration and :math:`\psi = \psi(x, t)` represents some
passive scalar.

``swe`` solver
==============

The implementation here has flattening at shocks and a choice of Riemann solvers.
The pyro ``swe`` implementation has flattening at shocks and a choice of Riemann solvers.

The main parameters that affect this solver are:

.. include:: swe_defaults.inc

Example problems
----------------
.. include:: swe_problems.inc

dam
^^^
Examples
========

The dam break problem is a standard hydrodynamics problem, analogous to the Sod
shock tube problem in compressible hydrodynamics. It considers a one-multidimensional
problem of two regions of fluid at different heights, initially separated by a dam.
The problem then models the evolution of the system when this dam is removed.
As for the Sod problem, there exists an exact solution for the dam break problem,
so we can check our solution against the exact solutions. See Toro's shallow water
equations book for details on this problem and the exact Riemann solver.
dam
---

The dam break problem is a standard hydrodynamics problem, analogous
to the Sod shock tube problem in compressible hydrodynamics. It
considers a one-multidimensional problem of two regions of fluid at
different heights, initially separated by a dam. The problem then
models the evolution of the system when this dam is removed. As for
the Sod problem, there exists an exact solution for the dam break
problem, so we can check our solution against the exact solutions. See
Toro's shallow water equations book for details on this problem and
the exact Riemann solver.

Because it is one-dimensional, we run it in narrow domains in the x- or
y-directions. It can be run as:
Expand All @@ -57,40 +64,11 @@ slightly better than the HLLC solver, with less smearing at the shock
and head/tail of the rarefaction.


quad
^^^^

The quad problem sets up different states in four regions of the
domain and watches the complex interfaces that develop as shocks
interact. This problem has appeared in several places (and a `detailed
investigation
<http://planets.utsc.utoronto.ca/~pawel/Riemann.hydro.html>`_ is
online by Pawel Artymowicz). It is run as:

.. prompt:: bash

pyro_sim.py swe quad inputs.quad


kh
^^

The Kelvin-Helmholtz problem models three layers of fluid: two at the top and
bottom of the domain travelling in one direction, one in the central part of the
domain travelling in the opposite direction. At the interface of the layers,
shearing produces the characteristic Kelvin-Helmholtz instabilities, just as
is seen in the standard compressible problem. It is run as:

.. prompt:: bash

pyro_sim.py swe kh inputs.kh


Exercises
---------
=========

Explorations
^^^^^^^^^^^^
------------

* There are multiple Riemann solvers in the swe
algorithm. Run the same problem with the different Riemann solvers
Expand All @@ -101,7 +79,7 @@ Explorations


Extensions
^^^^^^^^^^
----------

* Limit on the characteristic variables instead of the primitive
variables. What changes do you see? (the notes show how to implement
Expand Down
4 changes: 0 additions & 4 deletions pyro/mesh/patch.py
Original file line number Diff line number Diff line change
Expand Up @@ -943,10 +943,6 @@ def cell_center_data_clone(old):
old : CellCenterData2d object
The CellCenterData2d object we wish to copy
Note
----
It may be that this whole thing can be replaced with a copy.deepcopy()
"""

if not isinstance(old, CellCenterData2d):
Expand Down

0 comments on commit 781f71f

Please sign in to comment.