-
Notifications
You must be signed in to change notification settings - Fork 12
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'development' into chongchong/multigroup-adv-pulse
- Loading branch information
Showing
38 changed files
with
790 additions
and
17 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
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
File renamed without changes
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,83 @@ | ||
.. Advecting radiation pulse test | ||
Advecting radiation pulse test | ||
========================= | ||
|
||
This test demonstrates the code’s ability to deal with the relativistic | ||
correction source terms that arise from the mixed frame formulation of | ||
the RHD moment equations, in a fully-coupled RHD problem. The problems | ||
involve the advection of the a pulse of radiation energy in an optically | ||
thick (:math:`\tau \gg 1`) gas in both static (:math:`\beta \tau \ll 1`) | ||
and dynamic (:math:`\beta \tau \gg 1`) diffusion regimes, with a uniform | ||
background flow velocity :cite:`Krumholz_2007`. | ||
|
||
Parameters | ||
---------- | ||
|
||
Initial condition of the problem in static diffusion regime: | ||
|
||
.. math:: | ||
\begin{align} | ||
T = T_0 + (T_1 - T_0) \exp \left( - \frac{x^2}{2 w^2} \right), \\ | ||
w = 24 ~{\rm cm}, T_0 = 10^7 ~{\rm K}, T_1 = 2 \times 10^7 ~{\rm K} \\ | ||
\rho=\rho_0 \frac{T_0}{T}+\frac{a_{\mathrm{R}} \mu}{3 k_{\mathrm{B}}}\left(\frac{T_0^4}{T}-T^3\right) \\ | ||
\rho_0 = 1.2 ~{\rm g~cm^{-3}}, \mu = 2.33 ~m_{\rm H} \\ | ||
\kappa_P=\kappa_R=\kappa = 100 \mathrm{~cm}^2 \mathrm{~g}^{-1} \\ | ||
v = 10 ~{\rm km~s^{-1}} \\ | ||
\tau = \rho \kappa w = 3 \times 10^3, \beta = v/c = 3 \times 10^{-5}, \beta \tau = 9 \times 10^{-2} | ||
\end{align} | ||
The simulation is run till | ||
:math:`t_{\rm end} = 2 w/v = 4.8 \times 10^{-5} ~{\rm s}`. | ||
|
||
Initial condition of the problem in dynamic diffusion regime: same | ||
parameters as in the static diffusion regime except | ||
|
||
.. math:: | ||
\begin{align} | ||
\kappa_P=\kappa_R=\kappa=1000 \mathrm{~cm}^2 \mathrm{~g}^{-1} \\ | ||
v = 1000 ~{\rm km~s^{-1}} \\ | ||
t_{\rm end} = 2 w/v = 1.2 \times 10^{-4} ~{\rm s} \\ | ||
\tau = \rho \kappa w = 3 \times 10^4, \beta = v/c = 3 \times 10^{-3}, \beta \tau = 90 | ||
\end{align} | ||
Results | ||
------- | ||
|
||
Static diffusion regime: | ||
|
||
.. figure:: attach/radhydro_pulse_temperature-1.png | ||
:alt: radhydro_pulse_temperature-static-diffusion | ||
|
||
radhydro_pulse_temperature-static-diffusion | ||
|
||
.. figure:: attach/radhydro_pulse_density-1.png | ||
:alt: radhydro_pulse_density-static-diffusion | ||
|
||
radhydro_pulse_density-static-diffusion | ||
|
||
.. figure:: attach/radhydro_pulse_velocity-1.png | ||
:alt: radhydro_pulse_velocity-static-diffusion | ||
|
||
radhydro_pulse_velocity-static-diffusion | ||
|
||
Dynamic diffusion regime: | ||
|
||
.. figure:: attach/radhydro_pulse_temperature.png | ||
:alt: radhydro_pulse_temperature-dynamic-diffusion | ||
|
||
radhydro_pulse_temperature-dynamic-diffusion | ||
|
||
.. figure:: attach/radhydro_pulse_density.png | ||
:alt: radhydro_pulse_density-dynamic-diffusion | ||
|
||
radhydro_pulse_density-dynamic-diffusion | ||
|
||
.. figure:: attach/radhydro_pulse_velocity.png | ||
:alt: radhydro_pulse_velocity-dynamic-diffusion | ||
|
||
radhydro_pulse_velocity-dynamic-diffusion |
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,95 @@ | ||
Uniform advecting radiation in diffusive limit | ||
============================================== | ||
|
||
In this test, we simulation an advecting uniform gas where radiation and | ||
matter are in thermal equilibrium in the co-moving frame. Following the | ||
Lorentz tranform, the initial radiation energy and flux in the lab frame | ||
to first order in :math:`v/c` are :math:`E_r = a_r T^4` and | ||
:math:`F_r = \frac{4}{3} v E_r`. | ||
|
||
Parameters | ||
---------- | ||
|
||
.. math:: | ||
\begin{align} | ||
T_0 = 10^7~{\rm K} \\ | ||
\rho_0 = 1.2 ~{\rm g~cm^{-3}}, \mu = 2.33 ~m_{\rm H} \\ | ||
\kappa_P=\kappa_R=100 \mathrm{~cm}^2 \mathrm{~g}^{-1} \\ | ||
v_{x,0} = 10 ~{\rm km~s^{-1}} \\ | ||
E_{r,0} = a_r T_0^4 \\ | ||
F_{x,0} = \frac{4}{3} v_{x,0} E_{r,0} \\ | ||
t_{\rm end} = 4.8 \times 10^{-5} ~{\rm s} | ||
\end{align} | ||
Results | ||
------- | ||
|
||
With :math:`O(\beta \tau)` terms: | ||
|
||
.. figure:: attach/radhydro_uniform_advecting_temperature.png | ||
:alt: A figure showing the radiation temperature and material temperature as a function of time. | ||
|
||
The radiation temperature and matter temperatures, along with the exact solution. | ||
|
||
.. figure:: attach/radhydro_uniform_advecting_velocity.png | ||
:alt: A figure showing the radiation velocity and material velocity as a function of time. | ||
|
||
The matter velocity, along with the exact solution. | ||
|
||
Without :math:`O(\beta \tau)` terms: | ||
|
||
.. figure:: attach/radhydro_uniform_advecting_temperature-nobeta.png | ||
:alt: A figure showing the radiation temperature and material temperature as a function of time. | ||
|
||
The radiation temperature and matter temperatures, along with the exact solution. | ||
|
||
.. figure:: attach/radhydro_uniform_advecting_velocity-nobeta.png | ||
:alt: A figure showing the radiation velocity and material velocity as a function of time. | ||
|
||
The matter velocity, along with the exact solution. | ||
|
||
|
||
Physics | ||
------- | ||
|
||
In the transport equation, both the radiation energy and flux are | ||
unchanged because the radiation flux and pressure are uniform. In the | ||
matter-radiation exchange step, the source term is zero since the | ||
radiation and matter are in equilibrium. Finally, the flux is updated | ||
following | ||
|
||
.. math:: | ||
\mathbf{F}_{r}^{(t+1)} = \frac{\mathbf{F}_{r}^{(t)} + \Delta t \left[ \rho \kappa_P \left(\frac{4 \pi B}{c}\right) \boldsymbol{v}c + \rho \kappa_F (\boldsymbol{v} :\boldsymbol{P}_r) c \right] }{1+\rho \kappa_{F} {c} \Delta t}. | ||
With :math:`F_{r}^{(t)} = 4 v E_{r}^{(t)} / 3`, and | ||
:math:`\kappa_P=\kappa_R=\kappa`, we have | ||
|
||
.. math:: | ||
\mathbf{F}_{r}^{(t+1)} = \frac{\frac{4}{3} v E_r^{(t)} + \Delta t \left[ \rho \kappa E_r^{(t)} \boldsymbol{v}c + \rho \kappa \boldsymbol{v} (\frac{1}{3}E_r^{(t)}) c \right] }{1+\rho \kappa {c} \Delta t} = \frac{4}{3} v E_r^{(t)} = F_{r}^{(t)} | ||
Therefore, :math:`F_r` remains constant. This demonstrates that the code | ||
is invariant under Lorentz transformation. | ||
|
||
We can also show that, with the :math:`O(\beta \tau)` terms in the | ||
matter-radiation exchange step, the space-like component of the | ||
radiation four-force vanishes: | ||
|
||
.. math:: | ||
\begin{align} | ||
-G &= -\rho \kappa_F \frac{\boldsymbol{F}_r}{c} + \rho \kappa_P\left(\frac{4 \pi B}{c}\right) \frac{\boldsymbol{v}}{c}+\rho \kappa_F \frac{\boldsymbol{v} :\boldsymbol{P}_r}{c} \\ | ||
&= -\rho \kappa \frac{4}{3} E_r v / c + \rho \kappa E_r v / c+ \rho \kappa \frac{1}{3} E_r v / c \\ | ||
&= 0 | ||
\end{align} | ||
.. |radhydro_uniform_advecting_temperature| image:: attach/radhydro_uniform_advecting_temperature.png | ||
.. |radhydro_uniform_advecting_velocity| image:: attach/radhydro_uniform_advecting_velocity.png | ||
.. |radhydro_uniform_advecting_temperature-nobeta| image:: attach/radhydro_uniform_advecting_temperature-nobeta.png | ||
.. |radhydro_uniform_advecting_velocity-nobeta| image:: attach/radhydro_uniform_advecting_velocity-nobeta.png |
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
Submodule Microphysics
updated
244 files
Submodule amrex
updated
93 files
Submodule fmt
updated
36 files
+2 −2 | .github/workflows/cifuzz.yml | |
+26 −0 | .github/workflows/lint.yml | |
+2 −2 | CMakeLists.txt | |
+247 −3 | ChangeLog.md | |
+490 −0 | README.md | |
+0 −553 | README.rst | |
+2 −3 | doc/api.rst | |
+8 −3 | doc/build.py | |
+11 −4 | doc/syntax.rst | |
+6 −5 | include/fmt/args.h | |
+84 −71 | include/fmt/chrono.h | |
+42 −32 | include/fmt/color.h | |
+7 −7 | include/fmt/compile.h | |
+33 −15 | include/fmt/core.h | |
+56 −48 | include/fmt/format-inl.h | |
+145 −179 | include/fmt/format.h | |
+17 −16 | include/fmt/os.h | |
+36 −5 | include/fmt/ostream.h | |
+16 −9 | include/fmt/ranges.h | |
+8 −10 | include/fmt/std.h | |
+9 −8 | include/fmt/xchar.h | |
+1 −1 | src/fmt.cc | |
+1 −1 | support/AndroidManifest.xml | |
+43 −18 | support/manage.py | |
+227 −247 | test/chrono-test.cc | |
+9 −6 | test/compile-test.cc | |
+429 −440 | test/format-test.cc | |
+1 −1 | test/gtest/gmock-gtest-all.cc | |
+4 −4 | test/posix-mock.h | |
+2 −2 | test/printf-test.cc | |
+32 −2 | test/ranges-test.cc | |
+81 −34 | test/scan-test.cc | |
+466 −152 | test/scan.h | |
+4 −6 | test/std-test.cc | |
+14 −12 | test/util.h | |
+1 −1 | test/xchar-test.cc |
Submodule openPMD-api
updated
241 files
Submodule yaml-cpp
updated
3 files
+11 −0 | .github/dependabot.yml | |
+1 −1 | .github/workflows/bzlmod-archive.yml | |
+1 −0 | include/yaml-cpp/emitfromevents.h |
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,7 +1,9 @@ | ||
add_executable(test_radhydro_pulse test_radhydro_pulse.cpp ../fextract.cpp ${QuokkaObjSources}) | ||
if (AMReX_SPACEDIM EQUAL 1) | ||
add_executable(test_radhydro_pulse test_radhydro_pulse.cpp ../fextract.cpp ${QuokkaObjSources}) | ||
|
||
if(AMReX_GPU_BACKEND MATCHES "CUDA") | ||
setup_target_for_cuda_compilation(test_radhydro_pulse) | ||
endif(AMReX_GPU_BACKEND MATCHES "CUDA") | ||
if(AMReX_GPU_BACKEND MATCHES "CUDA") | ||
setup_target_for_cuda_compilation(test_radhydro_pulse) | ||
endif(AMReX_GPU_BACKEND MATCHES "CUDA") | ||
|
||
add_test(NAME RadhydroPulse COMMAND test_radhydro_pulse RadhydroPulse.in WORKING_DIRECTORY ${CMAKE_SOURCE_DIR}/tests) | ||
add_test(NAME RadhydroPulse COMMAND test_radhydro_pulse RadhydroPulse.in WORKING_DIRECTORY ${CMAKE_SOURCE_DIR}/tests) | ||
endif() |
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,7 @@ | ||
add_executable(test_radhydro_shock_multigroup test_radhydro_shock_multigroup.cpp ../fextract.cpp ../interpolate.cpp ${QuokkaObjSources}) | ||
|
||
if(AMReX_GPU_BACKEND MATCHES "CUDA") | ||
setup_target_for_cuda_compilation(test_radhydro_shock_multigroup) | ||
endif(AMReX_GPU_BACKEND MATCHES "CUDA") | ||
|
||
add_test(NAME RadhydroShockMultigroup COMMAND test_radhydro_shock_multigroup radshockMG.in WORKING_DIRECTORY ${CMAKE_SOURCE_DIR}/tests) |
Oops, something went wrong.