Skip to content

Commit

Permalink
update ascent actions
Browse files Browse the repository at this point in the history
  • Loading branch information
BenWibking committed Aug 30, 2023
1 parent 5dc4ec9 commit 81790f4
Show file tree
Hide file tree
Showing 3 changed files with 47 additions and 22 deletions.
2 changes: 2 additions & 0 deletions src/ShockCloud/cloud.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -203,6 +203,7 @@ AMREX_GPU_DEVICE AMREX_FORCE_INLINE void AMRSimulation<ShockCloud>::setCustomBou

} else if (i > ihi) {
// x1 upper boundary -- NSCBC outflow
// TODO(bwibking): should we specify the normal velocity at the boundary instead of the pressure??
if (time < ::shock_crossing_time) {
NSCBC::setOutflowBoundary<ShockCloud, FluxDir::X1, NSCBC::BoundarySide::Upper>(iv, consVar, geom, ::P0);
} else { // shock has passed, so we use P_wind
Expand Down Expand Up @@ -789,6 +790,7 @@ auto problem_main() -> int
::rho_wind = rho_post;
::P_wind = P_post;
amrex::Print() << fmt::format("v_wind = {} km/s (v_pre = {}, v_post = {})\n", v_wind / 1.0e5, v_pre / 1.0e5, v_post / 1.0e5);
amrex::Print() << fmt::format("P_wind = {} K cm^-3\n", P_post / C::k_B);

// compute shock-crossing time
::shock_crossing_time = sim.geom[0].ProbLength(0) / v_wind;
Expand Down
6 changes: 3 additions & 3 deletions tests/ShockCloud_32.in
Original file line number Diff line number Diff line change
Expand Up @@ -29,8 +29,8 @@ do_subcycle = 1
max_walltime = 6:00:00
max_timesteps = 5000
checkpoint_interval = 5000
plotfile_interval = 10
ascent_interval = -1
plotfile_interval = -1
ascent_interval = 10
derived_vars = pressure entropy nH temperature cooling_length \
cloud_fraction lab_velocity_x mass velocity_mag c_s

Expand All @@ -45,5 +45,5 @@ nH_bg = 0.003356403333 # cm^-3
nH_cloud = 0.003356403333 # cm^-3
P_over_k = 1.304005e+04 # K cm^-3
R_cloud_pc = 16.09084149928867 # pc
Mach_shock = 1.2
Mach_shock = 1.8
max_t_cc = 200.
61 changes: 42 additions & 19 deletions tests/ascent_actions.yaml
Original file line number Diff line number Diff line change
@@ -1,30 +1,53 @@
-
action: "add_pipelines"
pipelines:
pl1:
f2:
pipelines:
z_slice_pl:
f1:
type: "slice"
params:
point:
x: 0.5
y: 0.5
z: 0.5
y: 0.125
z: 0.125
normal:
x: 0.0
y: 0.0
z: 1.0
-
action: "add_extracts"
extracts:
zslice_extract:
type: "relay"
pipeline: "z_slice_pl"
params:
path: "slices/zslice"
protocol: "blueprint/mesh/hdf5"
-
action: "add_scenes"
scenes:
s1:
plots:
p1:
type: "pseudocolor"
field: "gasDensity"
pipeline: "pl1"
renders:
r1:
image_prefix: "dens%05d"
annotations: "true"
camera:
zoom: 1.5
action: "add_queries"
queries:
q1:
params:
expression: "max(field('temperature'))"
name: "max_temperature"
q2:
params:
expression: "max(field('nH'))"
name: "max_nH"
q3:
params:
expression: "max(field('cooling_length'))"
name: "max_cooling_length"
q4:
params:
expression: "min(field('temperature'))"
name: "min_temperature"
q5:
params:
expression: "min(field('nH'))"
name: "min_nH"
q6:
params:
expression: "min(field('cooling_length'))"
name: "min_cooling_length"
-
action: "save_session"

0 comments on commit 81790f4

Please sign in to comment.