Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

New initial model and input file for xrb_layered problem #2691

Closed
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions Exec/science/xrb_layered/_prob_params
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
H_min real 1.e-4_rt y

refine_height real 0.0 y

cutoff_density real 50.0_rt y

model_name character "" y
Expand Down
24 changes: 15 additions & 9 deletions Exec/science/xrb_layered/inputs_2d → Exec/science/xrb_layered/inputs
100644 → 100755
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,8 @@ geometry.is_periodic = 1 0
geometry.coord_sys = 0 # 0 => cart, 1 => RZ 2=>spherical
geometry.prob_lo = 0.0 0.0
geometry.prob_hi = 3072 3072
amr.n_cell = 128 128
#amr.n_cell = 128 128
amr.n_cell = 256 256

# >>>>>>>>>>>>> BC FLAGS <<<<<<<<<<<<<<<<
# 0 = Interior 3 = Symmetry
Expand Down Expand Up @@ -53,34 +54,39 @@ castro.sponge_lower_density = 1.e2
castro.sponge_timescale = 1.0e-7

# DIAGNOSTICS & VERBOSITY
castro.sum_interval = 1 # timesteps between computing mass
castro.sum_interval = 100 # timesteps between computing mass
castro.v = 1 # verbosity in Castro.cpp
amr.v = 1 # verbosity in Amr.cpp

# REFINEMENT / REGRIDDING
amr.max_level = 1 # maximum level number allowed
amr.ref_ratio = 4 2 2 2 # refinement ratio
#amr.max_level = 1 # maximum level number allowed
amr.max_level = 1
amr.ref_ratio = 2 2 2 2 # refinement ratio
amr.regrid_int = 2 2 2 2 # how often to regrid
amr.blocking_factor = 8 # block factor in grid generation
amr.max_grid_size = 256
#amr.max_grid_size = 256
amr.max_grid_size = 128
amr.n_error_buf = 2 2 2 2 # number of buffer cells in error est

# CHECKPOINT FILES
amr.check_file = xrb_chk # root name of checkpoint file
amr.check_file = CHECKS/chk # root name of checkpoint file
amr.check_int = 1000 # number of timesteps between checkpoints

# PLOTFILES
amr.plot_file = xrb_plt # root name of plotfile
amr.plot_int = 1000 # number of timesteps between plotfiles
amr.plot_file = PLOTS/xrb_ # root name of plotfile
amr.plot_per = 1.e-4
amr.derive_plot_vars = ALL

# PROBLEM PARAMETERS
problem.model_name = "toy_atm_hot_castro_3cm.hse"
#problem.model_name = "toy_atm_hot_castro_3cm.hse"
problem.model_name = "toy_atm_hot_3cm.hse"

problem.apply_perturbation = 1

problem.model_shift = 300.0

problem.refine_height = 500

# MICROPHYSICS
integrator.jacobian = 1

Expand Down
14 changes: 12 additions & 2 deletions Exec/science/xrb_layered/problem_tagging.H
Original file line number Diff line number Diff line change
@@ -1,16 +1,26 @@
#ifndef problem_tagging_H
#define problem_tagging_H

#include <Castro_util.H>

AMREX_GPU_HOST_DEVICE AMREX_INLINE
void problem_tagging(int i, int j, int k,
Array4<char> const& tag,
Array4<Real const> const& state,
int level, const GeometryData& geomdata)
{
// Tag on regions of with H > H_min and rho < cutoff_density.
// Note that H is the first species variable and so is in index UFS of the state array.
// Also allow us to not refine the very base.
// Note that H is the first species variable and so is in index
// UFS of the state array.

GpuArray<Real, 3> loc;
position(i, j, k, geomdata, loc);


if (state(i,j,k,URHO) > problem::cutoff_density && state(i,j,k,UFS) > problem::H_min) {
if (state(i,j,k,URHO) > problem::cutoff_density &&
state(i,j,k,UFS) > problem::H_min &&
loc[AMREX_SPACEDIM-1] > problem::refine_height) {
tag(i,j,k) = TagBox::SET;
}
}
Expand Down
Loading