diff --git a/Exec/DevTests/EB_Test/ERF_prob.cpp b/Exec/DevTests/EB_Test/ERF_prob.cpp index 0e6bb861d..e6d0a0a81 100644 --- a/Exec/DevTests/EB_Test/ERF_prob.cpp +++ b/Exec/DevTests/EB_Test/ERF_prob.cpp @@ -170,7 +170,5 @@ Problem::init_custom_pert( // Populate terrain height z_arr(i,j,k0) = height; - - // z_arr(i,j,k0) = 2.5; }); } diff --git a/Exec/DevTests/EB_Test/inputs b/Exec/DevTests/EB_Test/inputs index 0e567c908..51ab1b2dd 100644 --- a/Exec/DevTests/EB_Test/inputs +++ b/Exec/DevTests/EB_Test/inputs @@ -14,7 +14,7 @@ fabarray.mfiter_tile_size = 1024 1024 1024 geometry.prob_lo = 0. 0. 0. geometry.prob_hi = 10. 1. 4. -amr.n_cell = 256 8 64 # dx=dy=dz=100 m, Straka et al 1993 / Xue et al 2000 +amr.n_cell = 128 8 64 geometry.is_periodic = 0 1 0 @@ -51,7 +51,7 @@ erf.plot_int_1 = 20 # number of timesteps between plotfiles erf.plot_vars_1 = density rhoadv_0 x_velocity y_velocity z_velocity pressure scalar volfrac # SOLVER CHOICE -erf.use_gravity = true +erf.use_gravity = false erf.use_coriolis = false erf.les_type = "None" @@ -65,4 +65,6 @@ erf.alpha_C = 0.0 erf.init_type = "uniform" # PROBLEM PARAMETERS +prob.rho_0 = 1.0 +prob.T_0 = 1.0 prob.u_0 = 1.0 diff --git a/Source/EB/ERF_TerrainIF.H b/Source/EB/ERF_TerrainIF.H index 15373cb0f..cbcfbcef6 100644 --- a/Source/EB/ERF_TerrainIF.H +++ b/Source/EB/ERF_TerrainIF.H @@ -33,8 +33,6 @@ public: amrex::Array4 const& terr_arr = m_terr.const_array(); - if (i == 128 and j == 3) amrex::Print() <<" TERRARR " << amrex::IntVect(i,j,0) << " " << z << " " << terr_arr(i,j,0) << std::endl; - return -(z - terr_arr(i,j,0)); } diff --git a/Source/ERF.H b/Source/ERF.H index 729e5d410..a0330870b 100644 --- a/Source/ERF.H +++ b/Source/ERF.H @@ -942,7 +942,7 @@ private: const amrex::Vector derived_names {"soundspeed", "temp", "theta", "KE", "scalar", "vorticity_x","vorticity_y","vorticity_z", "magvel", "divU", - "pres_hse", "dens_hse", "pressure", "pert_pres", "pert_dens", + "pres_hse", "dens_hse", "theta_hse", "pressure", "pert_pres", "pert_dens", "eq_pot_temp", "num_turb", "SMark0", "SMark1", "dpdx", "dpdy", "pres_hse_x", "pres_hse_y", "z_phys", "detJ" , "mapfac", "lat_m", "lon_m", @@ -957,6 +957,10 @@ private: // moisture vars "qt", "qv", "qc", "qi", "qp", "qrain", "qsnow", "qgraup", "qsat", "rain_accum", "snow_accum", "graup_accum" +#ifdef ERF_USE_EB + // EB variables + ,"volfrac", +#endif #ifdef ERF_COMPUTE_ERROR // error vars ,"xvel_err", "yvel_err", "zvel_err", "pp_err" diff --git a/Source/ERF.cpp b/Source/ERF.cpp index 236de3b05..581b45e9e 100644 --- a/Source/ERF.cpp +++ b/Source/ERF.cpp @@ -336,7 +336,7 @@ ERF::ERF_shared () // We define m_factory even with no EB m_factory.resize(max_level+1); -#ifdef AMREX_USE_EB +#ifdef ERF_USE_EB // We will create each of these in MakeNewLevel.../RemakeLevel // This is needed before initializing level MultiFabs diff --git a/Source/ERF_make_new_level.cpp b/Source/ERF_make_new_level.cpp index f027e87f5..d2a69f3bd 100644 --- a/Source/ERF_make_new_level.cpp +++ b/Source/ERF_make_new_level.cpp @@ -53,7 +53,7 @@ void ERF::MakeNewLevelFromScratch (int lev, Real time, const BoxArray& ba_in, if (lev == 0) init_bcs(); -#ifdef AMREX_USE_EB +#ifdef ERF_USE_EB m_factory[lev] = makeEBFabFactory(geom[lev], grids[lev], dmap[lev], {nghost_eb_basic(), nghost_eb_volume(), diff --git a/Source/IO/ERF_Plotfile.cpp b/Source/IO/ERF_Plotfile.cpp index 24bf98e15..9c95fb188 100644 --- a/Source/IO/ERF_Plotfile.cpp +++ b/Source/IO/ERF_Plotfile.cpp @@ -354,20 +354,24 @@ ERF::WritePlotFile (int which, PlotFileType plotfile_type, Vector p mf_comp += 1; } - MultiFab r_hse(base_state[lev], make_alias, 0, 1); // r_0 is first component - MultiFab p_hse(base_state[lev], make_alias, 1, 1); // p_0 is second component + MultiFab r_hse(base_state[lev], make_alias, 0, BaseState::r0_comp); + MultiFab p_hse(base_state[lev], make_alias, 1, BaseState::p0_comp); + MultiFab th_hse(base_state[lev], make_alias, 1, BaseState::th0_comp); if (containerHasElement(plot_var_names, "pres_hse")) { - // p_0 is second component of base_state MultiFab::Copy(mf[lev],p_hse,0,mf_comp,1,0); mf_comp += 1; } if (containerHasElement(plot_var_names, "dens_hse")) { - // r_0 is first component of base_state MultiFab::Copy(mf[lev],r_hse,0,mf_comp,1,0); mf_comp += 1; } + if (containerHasElement(plot_var_names, "theta_hse")) + { + MultiFab::Copy(mf[lev],th_hse,0,mf_comp,1,0); + mf_comp += 1; + } if (containerHasElement(plot_var_names, "pressure")) { @@ -1321,7 +1325,7 @@ ERF::WritePlotFile (int which, PlotFileType plotfile_type, Vector p #endif } -#ifdef EB_USE_EB +#ifdef ERF_USE_EB for (int lev = 0; lev <= finest_level; ++lev) { EB_set_covered(mf[lev], 0.0); } diff --git a/Source/TimeIntegration/ERF_ComputeTimestep.cpp b/Source/TimeIntegration/ERF_ComputeTimestep.cpp index 89da2f884..d09f9b80a 100644 --- a/Source/TimeIntegration/ERF_ComputeTimestep.cpp +++ b/Source/TimeIntegration/ERF_ComputeTimestep.cpp @@ -87,8 +87,8 @@ ERF::estTimeStep (int level, long& dt_fast_ratio) const Real estdt_comp_inv = ReduceMax(S_new, ccvel, detJ, 0, [=] AMREX_GPU_HOST_DEVICE (Box const& b, Array4 const& s, - Array4 const& vf, - Array4 const& u) -> Real + Array4 const& u, + Array4 const& vf) -> Real #else Real estdt_comp_inv = ReduceMax(S_new, ccvel, 0, [=] AMREX_GPU_HOST_DEVICE (Box const& b,