From 1526b1a2c197d22a9bb591125552f2cd2b830f22 Mon Sep 17 00:00:00 2001 From: Ann Almgren Date: Wed, 17 Jul 2024 17:47:22 -0700 Subject: [PATCH] update incompressible inputs and small fixes for refinement and WW3 stuff (#1692) --- .../incompressible_inputs | 11 ++--------- Source/ERF_make_new_arrays.cpp | 13 ++++++++++--- Source/TimeIntegration/ERF_make_tau_terms.cpp | 16 +++++++++++++++- 3 files changed, 27 insertions(+), 13 deletions(-) diff --git a/Exec/DevTests/ABL_perturbation_inflow/incompressible_inputs b/Exec/DevTests/ABL_perturbation_inflow/incompressible_inputs index 06d3306c8..8122dba68 100644 --- a/Exec/DevTests/ABL_perturbation_inflow/incompressible_inputs +++ b/Exec/DevTests/ABL_perturbation_inflow/incompressible_inputs @@ -12,8 +12,8 @@ amrex.fpe_trap_invalid = 1 fabarray.mfiter_tile_size = 1024 1024 1024 # PROBLEM SIZE & GEOMETRY -geometry.prob_extent = 16. 2. 8. -amr.n_cell = 128 16 64 +geometry.prob_extent = 2. 0.25 1. +amr.n_cell = 128 16 64 geometry.is_periodic = 0 1 0 @@ -67,13 +67,6 @@ erf.buoyancy_type = 1 erf.init_type = "input_sounding" erf.input_sounding_file = "input_ReTau2000DNS_sounding.txt" -# Inflow boundary condition -erf.sponge_type = "input_sponge" -erf.input_sponge_file = "input_ReTau2000DNS_sponge.txt" -erf.sponge_strength = 100000.0 -erf.use_xlo_sponge_damping = true -erf.xlo_sponge_end = 1.0 - # Turbulent inflow generation erf.perturbation_type = "source" erf.perturbation_direction = 1 0 0 diff --git a/Source/ERF_make_new_arrays.cpp b/Source/ERF_make_new_arrays.cpp index 138f69499..9bdb45f79 100644 --- a/Source/ERF_make_new_arrays.cpp +++ b/Source/ERF_make_new_arrays.cpp @@ -262,12 +262,19 @@ ERF::init_stuff (int lev, const BoxArray& ba, const DistributionMapping& dm, Hwave_onegrid[lev] = std::make_unique(ba2d_onegrid,dm_onegrid,1,IntVect(1,1,0)); Lwave_onegrid[lev] = std::make_unique(ba2d_onegrid,dm_onegrid,1,IntVect(1,1,0)); - Hwave[lev] = std::make_unique(ba2d,dm,1,IntVect(3,3,0)); - Lwave[lev] = std::make_unique(ba2d,dm,1,IntVect(3,3,0)); + + BoxList bl2d_wave = ba.boxList(); + for (auto& b : bl2d_wave) { + b.setRange(2,0); + } + BoxArray ba2d_wave(std::move(bl2d_wave)); + + Hwave[lev] = std::make_unique(ba2d_wave,dm,1,IntVect(3,3,0)); + Lwave[lev] = std::make_unique(ba2d_wave,dm,1,IntVect(3,3,0)); + std::cout< + #include #include #include @@ -140,6 +140,20 @@ void erf_make_tau_terms (int level, int nrk, tbxxz.grow(IntVect(1,1,0)); tbxyz.grow(IntVect(1,1,0)); + if (bxcc.smallEnd(2) != domain.smallEnd(2)) { + bxcc.growLo(2,1); + tbxxy.growLo(2,1); + tbxxz.growLo(2,1); + tbxyz.growLo(2,1); + } + + if (bxcc.bigEnd(2) != domain.bigEnd(2)) { + bxcc.growHi(2,1); + tbxxy.growHi(2,1); + tbxxz.growHi(2,1); + tbxyz.growHi(2,1); + } + // Expansion rate Array4 er_arr = expr->array(mfi);