Skip to content

Commit

Permalink
update shock-cloud problem (#350)
Browse files Browse the repository at this point in the history
This updates the shock-cloud problem to use a new setup that:

- tracks the cloud center-of-mass frame
- refines so that the cooling length $l_{\text{cool}} = c_s
t_{\text{cool}}$ is resolved with at least 10 cells
- adds derived fields for temperature, entropy, pressure, etc. to the
outputs
- uses the (simplified) Navier-Stokes Characteristic Boundary Conditions
for inflow/outflow on the left/right sides of the box
- adds shock-cloud problem to nightly regression testing

**This PR depends on:**
* #352
* #360
* #363
* #364
* #365
* #366
* #367
* #430
* #581
* #596
* #597
* #598
* #599
* #616
* #645
  • Loading branch information
BenWibking authored Jul 1, 2024
1 parent cd6cdb6 commit d6728ef
Show file tree
Hide file tree
Showing 14 changed files with 1,854 additions and 447 deletions.
Binary file added extern/cooling/isrf_1000Go_grains.h5
Binary file not shown.
17 changes: 17 additions & 0 deletions regression/quokka-tests.ini
Original file line number Diff line number Diff line change
Expand Up @@ -90,3 +90,20 @@ compareParticles = 1
particleTypes = tracer_particles
testSrcTree = .
ignore_return_code = 1

[ShockCloud-GPU]
buildDir = .
target = shock_cloud
inputFile = tests/ShockCloud_64_regression.in
dim = 3
cmakeSetupOpts = -DAMReX_GPU_BACKEND=CUDA
restartTest = 0
useMPI = 1
numprocs = 1
compileTest = 0
doVis = 1
visVar = temperature
compareParticles = 1
particleTypes = tracer_particles
testSrcTree = .
ignore_return_code = 1
2 changes: 0 additions & 2 deletions src/NSCBC_inflow.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -166,8 +166,6 @@ AMREX_GPU_DEVICE AMREX_FORCE_INLINE void setInflowX1LowerLowOrder(const amrex::I
amrex::Box const &box = geom.Domain();
const auto &domain_lo = box.loVect3d();
const int ilo = domain_lo[0];
const Real dx = geom.CellSize(0);
const Real Lx = geom.prob_domain.length(0);
constexpr int N = HydroSystem<problem_t>::nvar_;

/// x1 lower boundary -- subsonic inflow
Expand Down
1 change: 0 additions & 1 deletion src/NSCBC_outflow.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -370,7 +370,6 @@ AMREX_GPU_DEVICE AMREX_FORCE_INLINE void setOutflowBoundaryLowOrder(const amrex:
const int im1 = (SIDE == BoundarySide::Lower) ? ibr + 1 : ibr - 1;
const int im2 = (SIDE == BoundarySide::Lower) ? ibr + 2 : ibr - 2;
const int im3 = (SIDE == BoundarySide::Lower) ? ibr + 3 : ibr - 3;
const Real dx = geom.CellSize(static_cast<int>(DIR));

// compute primitive vars
quokka::valarray<amrex::Real, N> Q_i{};
Expand Down
2 changes: 0 additions & 2 deletions src/ShockCloud/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,10 +1,8 @@
if (AMReX_SPACEDIM GREATER_EQUAL 3)
add_executable(shock_cloud cloud.cpp ${QuokkaObjSources})
add_executable(test_grackle_cooling test_grackle_cooling.cpp ${QuokkaObjSources})

if(AMReX_GPU_BACKEND MATCHES "CUDA")
setup_target_for_cuda_compilation(shock_cloud)
setup_target_for_cuda_compilation(test_grackle_cooling)
endif(AMReX_GPU_BACKEND MATCHES "CUDA")

endif(AMReX_SPACEDIM GREATER_EQUAL 3)
812 changes: 812 additions & 0 deletions src/ShockCloud/boundary_conditions.ipynb

Large diffs are not rendered by default.

Loading

0 comments on commit d6728ef

Please sign in to comment.