-
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.
### Description Main updates: - Defined three opacity models described in Paper III: piecewise constant (`piecewise_constant_opacity`), piecewise powerlaw with fixed slope (`PPL_opacity_fixed_slope_spectrum`), piecewise powerlaw with full spectrum fitting (`PPL_opacity_full_spectrum`). - Added tests for each of these methods. - RadhydroBB tests the PC method's ability to resolve the Doppler-shifted spectrum in a moving blackbody. - RadMarshakVaytet tests the ability of all three methods (by default `PPL_opacity_full_spectrum`) to deal with frequency-dependent velocities within an energy bin. - RadTube tests that in the special case of opacity being independent of frequency, the `PPL_opacity_fixed_slope_spectrum` method provides the same result as the single-group method. - RadhydroShockMultigroup tests `PPL_opacity_full_spectrum` in the special case of constant opacity. More updates: - Removed `ComputePlanckOpacityTempDerivative` - Defined `ComputeDiffusionFluxMeanOpacity` and removed the calculation of component-specific flux-mean opacity. See Paper III. - Defined `ComputeBinCenterOpacity` to use when `opacity_model_ == OpacityModel::PPL_opacity_full_spectrum` and `use_diffuse_flux_mean_opacity = false`. - Changed the structure of the Newton-Raphson iteration loop. We check the residuals first, then calculate opacities and the Jacobian. - Fixed a bug in the Newton iteration where the calculation of alpha_E uses `Erad0Vec` but `EradVec_guess` should be used. - More robust break condition for the Newton iteration. - Stop updating `alpha_E` and `alpha_B` after `max_ite_to_update_alpha_E` steps in the Newton iteration. - Set `reconstructionOrder_=3` in the RadTube and RadhydroShockMultigroup tests to avoid "erroneous arithmetic" error after using `-DCMAKE_CXX_FLAGS=-ffp-exception-behavior=strict`. ### Checklist _Before this pull request can be reviewed, all of these tasks should be completed. Denote completed tasks with an `x` inside the square brackets `[ ]` in the Markdown source below:_ - [x] I have added a description (see above). - [x] I have added a link to any related issues see (see above). - [x] I have read the [[Contributing Guide](https://github.com/quokka-astro/quokka/blob/development/CONTRIBUTING.md)](https://github.com/quokka-astro/quokka/blob/development/CONTRIBUTING.md). - [x] I have added tests for any new physics that this PR adds to the code. - [x] I have tested this PR on my local computer and all tests pass. - [x] I have manually triggered the GPU tests with the magic comment `/azp run`. - [x] I have requested a reviewer for this PR. --------- Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
- Loading branch information
1 parent
d5210ff
commit 4686c6a
Showing
21 changed files
with
2,888 additions
and
502 deletions.
There are no files selected for viewing
Large diffs are not rendered by default.
Oops, something went wrong.
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,7 @@ | ||
add_executable(test_radiation_marshak_Vaytet test_radiation_marshak_Vaytet.cpp ../fextract.cpp ../interpolate.cpp ${QuokkaObjSources}) | ||
|
||
if(AMReX_GPU_BACKEND MATCHES "CUDA") | ||
setup_target_for_cuda_compilation(test_radiation_marshak_Vaytet) | ||
endif(AMReX_GPU_BACKEND MATCHES "CUDA") | ||
|
||
add_test(NAME MarshakWaveVaytet COMMAND test_radiation_marshak_Vaytet MarshakVaytet.in WORKING_DIRECTORY ${CMAKE_SOURCE_DIR}/tests) |
Large diffs are not rendered by default.
Oops, something went wrong.
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,26 @@ | ||
#ifndef TEST_RADIATION_MARSHAK_VAYTET_HPP_ // NOLINT | ||
#define TEST_RADIATION_MARSHAK_VAYTET_HPP_ | ||
//============================================================================== | ||
// TwoMomentRad - a radiation transport library for patch-based AMR codes | ||
// Copyright 2020 Benjamin Wibking. | ||
// Released under the MIT license. See LICENSE file included in the GitHub repo. | ||
//============================================================================== | ||
/// \file test_radiation_marshak_vaytet.hpp | ||
/// \brief Defines a test problem for radiation in the static diffusion regime. | ||
/// | ||
|
||
// external headers | ||
#ifdef HAVE_PYTHON | ||
#include "matplotlibcpp.h" | ||
#endif | ||
#include <fmt/format.h> | ||
#include <fstream> | ||
|
||
// internal headers | ||
|
||
#include "interpolate.hpp" | ||
#include "radiation_system.hpp" | ||
|
||
// function definitions | ||
|
||
#endif // TEST_RADIATION_MARSHAK_VAYTET_HPP_ |
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,7 @@ | ||
add_executable(test_radhydro_bb test_radhydro_bb.cpp ../fextract.cpp ../interpolate.cpp ${QuokkaObjSources}) | ||
|
||
if(AMReX_GPU_BACKEND MATCHES "CUDA") | ||
setup_target_for_cuda_compilation(test_radhydro_bb) | ||
endif(AMReX_GPU_BACKEND MATCHES "CUDA") | ||
|
||
add_test(NAME RadhydroBB COMMAND test_radhydro_bb RadhydroBB.in WORKING_DIRECTORY ${CMAKE_SOURCE_DIR}/tests) |
Oops, something went wrong.