Skip to content

Commit 58f360f

Browse files
author
harpolea
committed
Merge branch 'master' of github.com:harpolea/r3d2
2 parents 41afdbf + 1fc01e8 commit 58f360f

File tree

9 files changed

+6887
-11263
lines changed

9 files changed

+6887
-11263
lines changed

docs/conf.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -43,6 +43,7 @@
4343
extensions = [
4444
'nbsphinx',
4545
'sphinx.ext.mathjax', 'sphinx.ext.autodoc',
46+
'IPython.sphinxext.ipython_console_highlighting',
4647
]
4748

4849
# Add any paths that contain templates here, relative to this directory.

docs/index.rst

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,16 +6,21 @@
66
Welcome to R3D2's documentation!
77
================================
88

9+
R3D2 (Relativistic Reactive Riemann problem solver for Deflagrations and Detonations) solves the Riemann problem for the *relativistic* Euler equation. It also includes the option to include reaction terms, for "infinitely" fast reactions, leading to deflagrations and detonations.
10+
11+
This code is intended for exploring possible solutions and relativistic effects, or for comparing against a compressible code with reactive sources. It is optimized for use with Jupyter notebooks. It is **not** intended for use within a HRSC code: the performance is far too poor, and the assumptions made to extreme.
12+
913
Contents:
1014

1115
.. toctree::
1216
:maxdepth: 2
1317

18+
riemann_problem
1419
eos_defns.rst
1520
states
1621
waves
17-
riemann_problem
1822
tangential_change
23+
p_v_plots
1924

2025
Indices and tables
2126
==================

docs/p_v_plots.ipynb

Lines changed: 133 additions & 4612 deletions
Large diffs are not rendered by default.

docs/riemann_problem.ipynb

Lines changed: 2214 additions & 2165 deletions
Large diffs are not rendered by default.

docs/states.ipynb

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -8,9 +8,9 @@
88
"\n",
99
"A Riemann Problem is specified by the state of the material to the left and right of the interface. In this hydrodynamic problem, the state is fully determined by an [equation of state](eos_defns.html) and the variables\n",
1010
"\n",
11-
"\\begin{equation}\n",
11+
"$$\n",
1212
" {\\bf U} = \\begin{pmatrix} \\rho_0 \\\\ v_x \\\\ v_t \\\\ \\epsilon \\end{pmatrix},\n",
13-
"\\end{equation}\n",
13+
"$$\n",
1414
"\n",
1515
"where $\\rho_0$ is the rest-mass density, $v_x$ the velocity normal to the interface, $v_t$ the velocity tangential to the interface, and $\\epsilon$ the specific internal energy."
1616
]
@@ -72,7 +72,7 @@
7272
"$\\begin{pmatrix} \\rho \\\\ v_x \\\\ v_t \\\\ \\epsilon \\end{pmatrix}= \\begin{pmatrix} 1.0000 \\\\ 0.1000 \\\\ 0.0000 \\\\ 2.0000 \\end{pmatrix}$"
7373
],
7474
"text/plain": [
75-
"<r3d2.state.State at 0x10faae6a0>"
75+
"<r3d2.state.State at 0x10c556d68>"
7676
]
7777
},
7878
"execution_count": 3,
@@ -104,7 +104,7 @@
104104
"$\\begin{pmatrix} \\rho \\\\ v_x \\\\ v_t \\\\ \\epsilon \\end{pmatrix}_{L} = \\begin{pmatrix} 10.0000 \\\\ -0.3000 \\\\ 0.1000 \\\\ 5.0000 \\end{pmatrix}$"
105105
],
106106
"text/plain": [
107-
"<r3d2.state.State at 0x10faaea20>"
107+
"<r3d2.state.State at 0x10c57b160>"
108108
]
109109
},
110110
"execution_count": 4,
@@ -139,7 +139,7 @@
139139
"$\\begin{pmatrix} \\rho \\\\ v_x \\\\ v_t \\\\ \\epsilon \\\\ q \\end{pmatrix}_{Reactive} = \\begin{pmatrix} 5.0000 \\\\ 0.1000 \\\\ 0.1000 \\\\ 2.0000 \\\\ 0.1000 \\end{pmatrix}$"
140140
],
141141
"text/plain": [
142-
"<r3d2.state.State at 0x10faaeef0>"
142+
"<r3d2.state.State at 0x10c57b630>"
143143
]
144144
},
145145
"execution_count": 5,

docs/tangential_change.ipynb

Lines changed: 4518 additions & 4465 deletions
Large diffs are not rendered by default.

docs/waves.ipynb

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -165,7 +165,7 @@
165165
"$\\begin{pmatrix} \\rho \\\\ v_x \\\\ v_t \\\\ \\epsilon \\end{pmatrix}_{known} = \\begin{pmatrix} 1.0000 \\\\ 0.1000 \\\\ 0.0500 \\\\ 0.2000 \\end{pmatrix}$"
166166
],
167167
"text/plain": [
168-
"<r3d2.state.State at 0x7f50a35c4410>"
168+
"<r3d2.state.State at 0x10c581eb8>"
169169
]
170170
},
171171
"execution_count": 2,
@@ -218,7 +218,7 @@
218218
"${\\cal S}_{\\leftarrow}: \\lambda^{(0)}= -0.9614$"
219219
],
220220
"text/plain": [
221-
"<r3d2.wave.Wave at 0x7f50a35c48d0>"
221+
"<r3d2.wave.Wave at 0x10c5a4390>"
222222
]
223223
},
224224
"execution_count": 4,
@@ -250,7 +250,7 @@
250250
"${\\cal R}_{\\leftarrow}: \\lambda^{(0)}\\in [-0.3209, -0.2383]$"
251251
],
252252
"text/plain": [
253-
"<r3d2.wave.Wave at 0x7f50a35c4350>"
253+
"<r3d2.wave.Wave at 0x10c5a4278>"
254254
]
255255
},
256256
"execution_count": 5,
@@ -282,7 +282,7 @@
282282
"${\\cal S}_{\\rightarrow}: \\lambda^{(2)}= 0.9978$"
283283
],
284284
"text/plain": [
285-
"<r3d2.wave.Wave at 0x7f50a35c41d0>"
285+
"<r3d2.wave.Wave at 0x10c5a45f8>"
286286
]
287287
},
288288
"execution_count": 6,
@@ -315,7 +315,7 @@
315315
"${\\cal C}: \\lambda^{(1)}= 0.1000$"
316316
],
317317
"text/plain": [
318-
"<r3d2.wave.Wave at 0x7f50a35da210>"
318+
"<r3d2.wave.Wave at 0x10c5a4cf8>"
319319
]
320320
},
321321
"execution_count": 7,
@@ -350,7 +350,7 @@
350350
"$\\begin{pmatrix} \\rho \\\\ v_x \\\\ v_t \\\\ \\epsilon \\\\ q \\end{pmatrix}= \\begin{pmatrix} 5.0000 \\\\ 0.0000 \\\\ 0.0000 \\\\ 2.0000 \\\\ 0.1000 \\end{pmatrix}$"
351351
],
352352
"text/plain": [
353-
"<r3d2.state.State at 0x10faad320>"
353+
"<r3d2.state.State at 0x10c5a4a20>"
354354
]
355355
},
356356
"execution_count": 8,
@@ -403,7 +403,7 @@
403403
"${\\cal SDT}_{\\leftarrow}: \\lambda^{(0)}= -0.7979$"
404404
],
405405
"text/plain": [
406-
"<r3d2.wave.Wave at 0x10faad2b0>"
406+
"<r3d2.wave.Wave at 0x10c5a4b38>"
407407
]
408408
},
409409
"execution_count": 10,
@@ -435,7 +435,7 @@
435435
"$\\left({\\cal CJDF}_{\\leftarrow}{\\cal R}_{\\leftarrow}\\right) : \\lambda^{(0)}\\in [-0.6097, 0.7607]$"
436436
],
437437
"text/plain": [
438-
"<r3d2.wave.Wave at 0x10faad198>"
438+
"<r3d2.wave.Wave at 0x10c5a49b0>"
439439
]
440440
},
441441
"execution_count": 11,

r3d2/riemann_problem.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,7 @@ def find_delta_v(p_star_guess):
5757
find_delta_v(pmax_rootfind)
5858
except ValueError:
5959
pmax_rootfind = pmax
60-
60+
6161
self.p_star = brentq(find_delta_v, pmin_rootfind, pmax_rootfind)
6262
wave_l = Wave(self.state_l, self.p_star, 0)
6363
wave_r = Wave(self.state_r, self.p_star, 2)
@@ -67,7 +67,7 @@ def find_delta_v(p_star_guess):
6767
Wave(self.state_star_l, self.state_star_r, 1), wave_r]
6868

6969
def _figure_data(self, format):
70-
fig, axs = pyplot.subplots(3,3)
70+
fig, axs = pyplot.subplots(3,3, figsize=(10,6))
7171
ax = axs[0,0]
7272
for w in self.waves[0], self.waves[2]:
7373
if len(w.wavespeed)==1:

requirements.txt

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,2 @@
1-
numpy
2-
matplotlib>=1.5
3-
scipy>=0.10
4-
IPython>=3
51
nbsphinx
62
ipykernel
7-
setuptools>=18.5

0 commit comments

Comments
 (0)