-
Notifications
You must be signed in to change notification settings - Fork 129
add inviscid burger solver #144
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
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 7474a6e
some clean up
zhichen3 007492f
clean up, fix typo and flake8
zhichen3 736d42c
update description in __init__
zhichen3 f3874e7
Merge branch 'main' into inviscid_burger
zhichen3 36dcacc
fix isort
zhichen3 a040358
fix pylint
zhichen3 1ae155e
update comments
zhichen3 321b403
add regression testing for burgers equation
zhichen3 e546d44
remove test file
zhichen3 8cb0f87
add compare file
zhichen3 8a4451f
add setupt
zhichen3 4c9523e
Merge branch 'main' into inviscid_burger
zhichen3 b145958
Merge branch 'main' into inviscid_burger
zingale 53e5a5b
update readme and docs for burgers
zhichen3 572adea
add test problem
zhichen3 216a209
cleaning
zhichen3 af4ba1c
clean up
zhichen3 8ddc2e2
more cleaning
zhichen3 c78a1d7
Merge branch 'main' into inviscid_burger
zhichen3 c533f1e
fix float
zhichen3 311f9f3
fix transverse correction term
zhichen3 aef79eb
delete comments
zhichen3 18107ff
more fix
zhichen3 2059e22
change transverse flux calculation
zhichen3 5e44c33
update test problem
zhichen3 62c589d
update riemann problem
zhichen3 d25b1ab
revise riemann
zhichen3 ac5ddbe
fix riemann
zhichen3 f3e5afc
another modification to riemann
zhichen3 1370013
change dt calculation
zhichen3 adf1d19
update burgers problem, based on incompressible solver
zhichen3 1beed2f
flake8
zhichen3 fc60c0c
Merge branch 'main' into inviscid_burger
zhichen3 f1fbe45
clean-up
zhichen3 3d11b78
update regtest
zhichen3 9f7a3d1
Merge branch 'main' into inviscid_burger
zingale ab344ac
fix docs and add comments
zhichen3 1196e20
Merge branch 'main' into inviscid_burger
zhichen3 6ee3e54
add some comments
zhichen3 78f96d8
Merge branch 'main' into inviscid_burger
zhichen3 40eeaab
fix flake8
zhichen3 9106486
fix flake8
zhichen3 File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or 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 hidden or 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,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. | ||
|
||
|
||
``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 |
This file contains hidden or 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,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`` | | | ||
+----------------------------------+----------------+----------------------------------------------------+ | ||
|
This file contains hidden or 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 hidden or 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,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: |
This file contains hidden or 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,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: |
This file contains hidden or 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 hidden or 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,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 |
This file contains hidden or 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,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 |
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
backticks (`)