Skip to content
Merged
Show file tree
Hide file tree
Changes from 30 commits
Commits
Show all changes
43 commits
Select commit Hold shift + click to select a range
9062b44
add inviscid burger solver
zhichen3 Mar 22, 2023
7474a6e
some clean up
zhichen3 Mar 22, 2023
007492f
clean up, fix typo and flake8
zhichen3 Mar 23, 2023
736d42c
update description in __init__
zhichen3 Mar 23, 2023
f3874e7
Merge branch 'main' into inviscid_burger
zhichen3 Mar 23, 2023
36dcacc
fix isort
zhichen3 Mar 23, 2023
a040358
fix pylint
zhichen3 Mar 23, 2023
1ae155e
update comments
zhichen3 Mar 23, 2023
321b403
add regression testing for burgers equation
zhichen3 Mar 23, 2023
e546d44
remove test file
zhichen3 Mar 23, 2023
8cb0f87
add compare file
zhichen3 Mar 23, 2023
8a4451f
add setupt
zhichen3 Mar 23, 2023
4c9523e
Merge branch 'main' into inviscid_burger
zhichen3 Mar 23, 2023
b145958
Merge branch 'main' into inviscid_burger
zingale Mar 24, 2023
53e5a5b
update readme and docs for burgers
zhichen3 Mar 24, 2023
572adea
add test problem
zhichen3 Mar 27, 2023
216a209
cleaning
zhichen3 Mar 27, 2023
af4ba1c
clean up
zhichen3 Mar 27, 2023
8ddc2e2
more cleaning
zhichen3 Mar 27, 2023
c78a1d7
Merge branch 'main' into inviscid_burger
zhichen3 Mar 27, 2023
c533f1e
fix float
zhichen3 Mar 28, 2023
311f9f3
fix transverse correction term
zhichen3 Mar 28, 2023
aef79eb
delete comments
zhichen3 Mar 28, 2023
18107ff
more fix
zhichen3 Mar 28, 2023
2059e22
change transverse flux calculation
zhichen3 Mar 29, 2023
5e44c33
update test problem
zhichen3 Mar 29, 2023
62c589d
update riemann problem
zhichen3 Mar 30, 2023
d25b1ab
revise riemann
zhichen3 Mar 30, 2023
ac5ddbe
fix riemann
zhichen3 Mar 30, 2023
f3e5afc
another modification to riemann
zhichen3 Mar 30, 2023
1370013
change dt calculation
zhichen3 Mar 31, 2023
adf1d19
update burgers problem, based on incompressible solver
zhichen3 Mar 31, 2023
1beed2f
flake8
zhichen3 Mar 31, 2023
fc60c0c
Merge branch 'main' into inviscid_burger
zhichen3 Mar 31, 2023
f1fbe45
clean-up
zhichen3 Apr 1, 2023
3d11b78
update regtest
zhichen3 Apr 1, 2023
9f7a3d1
Merge branch 'main' into inviscid_burger
zingale Apr 4, 2023
ab344ac
fix docs and add comments
zhichen3 Apr 5, 2023
1196e20
Merge branch 'main' into inviscid_burger
zhichen3 Apr 5, 2023
6ee3e54
add some comments
zhichen3 Apr 7, 2023
78f96d8
Merge branch 'main' into inviscid_burger
zhichen3 Apr 7, 2023
40eeaab
fix flake8
zhichen3 Apr 7, 2023
9106486
fix flake8
zhichen3 Apr 7, 2023
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -132,6 +132,8 @@ pyro provides the following solvers (all in 2-d):
- `advection_weno`: a method-of-lines WENO solver for linear
advection.

- 'burgers': a second-order unsplit solver for invsicid Burgers' equation.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

backticks (`)


- `compressible`: a second-order unsplit solver for the Euler
equations of compressible hydrodynamics. This uses characteristic
tracing and corner coupling for the prediction of the interface
Expand Down
30 changes: 30 additions & 0 deletions docs/source/burgers_basics.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
Burgers' Equations
==================

Burgers' Equations are nonlinear hyperbolic equations. It has the same form as the advection equation, except that the quantity that we're advecting is the velocity itself.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It has or they have?

that we're advecting -> being advected


``Inviscid Burgers``
--------------------------------

A 2D Burgers' Equation has the following form:

.. math::

u_t + u u_x + v u_y = 0\\
v_t + u v_x + v v_y = 0

Here we have two 2D advection equations, where the x-velocity, :math:`u`, and y-velocity, :math:`v`, are the two quantities that we wish to advect with.

:py:mod:`pyro.burgers` is modified based on the :py:mod:`pyro.advection` with a different Riemann solver and timestep restriction.

Since velocity is no longer a constant, the timestep is now restricted to the each minimum velocity in each cell:

.. math::

\Delta t < \min \left \{ \min \left \{ \frac{\Delta x}{|u_i|} \right \}, \min \left \{ \frac{\Delta y}{|v_i|} \right \} \right \}

The main difference of Burgers equation compared to the linear advection equation is the creation of shock and rarefactions due velocity been non-constant. This introduces a slightly different Riemann's problem which depends on shock speed by using the *Rankine-Hugoniot* jump condition.

The parameters for this solver are:

.. include:: burgers_defaults.inc
26 changes: 26 additions & 0 deletions docs/source/burgers_defaults.inc
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
* section: [advection]

+----------------------------------+----------------+----------------------------------------------------+
| option | value | description |
+==================================+================+====================================================+
| limiter | ``2`` | limiter (0 = none, 1 = 2nd order, 2 = 4th order) |
+----------------------------------+----------------+----------------------------------------------------+

* section: [driver]

+----------------------------------+----------------+----------------------------------------------------+
| option | value | description |
+==================================+================+====================================================+
| cfl | ``0.8`` | advective CFL number |
+----------------------------------+----------------+----------------------------------------------------+

* section: [particles]

+----------------------------------+----------------+----------------------------------------------------+
| option | value | description |
+==================================+================+====================================================+
| do_particles | ``0`` | |
+----------------------------------+----------------+----------------------------------------------------+
| particle_generator | ``grid`` | |
+----------------------------------+----------------+----------------------------------------------------+

1 change: 1 addition & 0 deletions docs/source/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@ pyro: a python hydro code
:caption: Solvers

advection_basics
burgers_basics
compressible_basics
compressible_compare
multigrid_basics
Expand Down
26 changes: 26 additions & 0 deletions docs/source/pyro.burgers.problems.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
pyro.burgers.problems package
===============================

.. automodule:: pyro.burgers.problems
:members:
:undoc-members:
:show-inheritance:

Submodules
----------

pyro.burgers.problems.smooth module
-------------------------------------

.. automodule:: pyro.burgers.problems.smooth
:members:
:undoc-members:
:show-inheritance:

pyro.burgers.problems.tophat module
-------------------------------------

.. automodule:: pyro.burgers.problems.tophat
:members:
:undoc-members:
:show-inheritance:
34 changes: 34 additions & 0 deletions docs/source/pyro.burgers.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
pyro.burgers package
======================

.. automodule:: pyro.burgers
:members:
:undoc-members:
:show-inheritance:

Subpackages
-----------

.. toctree::
:maxdepth: 4

pyro.burgers.problems

Submodules
----------

pyro.burgers.advective\_fluxes module
---------------------------------------

.. automodule:: pyro.burgers.advective_fluxes
:members:
:undoc-members:
:show-inheritance:

pyro.burgers.simulation module
--------------------------------

.. automodule:: pyro.burgers.simulation
:members:
:undoc-members:
:show-inheritance:
1 change: 1 addition & 0 deletions docs/source/pyro.rst
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ Subpackages
pyro.advection_nonuniform
pyro.advection_rk
pyro.advection_weno
pyro.burgers
pyro.compressible
pyro.compressible_fv4
pyro.compressible_react
Expand Down
7 changes: 7 additions & 0 deletions pyro/burgers/__init__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
"""
The pyro inviscid burgers solver. This implements a second-order,
unsplit method for inviscid burgers equations based on the Colella 1990 paper.
"""

__all__ = ['simulation']
from .simulation import Simulation
11 changes: 11 additions & 0 deletions pyro/burgers/_defaults
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
[driver]
cfl = 0.8 ; advective CFL number


[advection]
limiter = 2 ; limiter (0 = none, 1 = 2nd order, 2 = 4th order)


[particles]
do_particles = 0
particle_generator = grid
Loading