Skip to content

Commit

Permalink
update incompressible inputs and small fixes for refinement and WW3 s…
Browse files Browse the repository at this point in the history
…tuff (erf-model#1692)
  • Loading branch information
asalmgren authored Jul 18, 2024
1 parent 11b746b commit 1526b1a
Show file tree
Hide file tree
Showing 3 changed files with 27 additions and 13 deletions.
11 changes: 2 additions & 9 deletions Exec/DevTests/ABL_perturbation_inflow/incompressible_inputs
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down Expand Up @@ -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
Expand Down
13 changes: 10 additions & 3 deletions Source/ERF_make_new_arrays.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -262,12 +262,19 @@ ERF::init_stuff (int lev, const BoxArray& ba, const DistributionMapping& dm,

Hwave_onegrid[lev] = std::make_unique<MultiFab>(ba2d_onegrid,dm_onegrid,1,IntVect(1,1,0));
Lwave_onegrid[lev] = std::make_unique<MultiFab>(ba2d_onegrid,dm_onegrid,1,IntVect(1,1,0));
Hwave[lev] = std::make_unique<MultiFab>(ba2d,dm,1,IntVect(3,3,0));
Lwave[lev] = std::make_unique<MultiFab>(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<MultiFab>(ba2d_wave,dm,1,IntVect(3,3,0));
Lwave[lev] = std::make_unique<MultiFab>(ba2d_wave,dm,1,IntVect(3,3,0));

std::cout<<ba_onegrid<<std::endl;
std::cout<<ba2d_onegrid<<std::endl;
std::cout<<dm_onegrid<<std::endl;
std::cout<<dm_onegrid<<std::endl;
#endif


Expand Down
16 changes: 15 additions & 1 deletion Source/TimeIntegration/ERF_make_tau_terms.cpp
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#include <AMReX_MultiFab.H>

#include <AMReX_ArrayLim.H>
#include <AMReX_BCRec.H>
#include <AMReX_GpuContainers.H>
Expand Down Expand Up @@ -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<Real> er_arr = expr->array(mfi);

Expand Down

0 comments on commit 1526b1a

Please sign in to comment.