Skip to content
Merged
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
150 changes: 80 additions & 70 deletions Docs/sphinx_doc/Inputs.rst
Original file line number Diff line number Diff line change
Expand Up @@ -456,76 +456,86 @@ which means it is determined by the fluid speed rather than the sound speed and
List of Parameters
------------------

+----------------------------+----------------------+----------------+---------------------+
| Parameter | Definition | Acceptable | Default |
| | | Values | |
+============================+======================+================+=====================+
| **erf.substepping_type** | Should we substep in | "Implicit" or | "Implicit" if |
| | each RK stage? | "None" | compressible, |
| | | | "None" if anelastic |
+----------------------------+----------------------+----------------+---------------------+
| **erf.vert_implicit** | Do vertical implicit | Boolean | false |
| | solve for diffusion | | |
| | of u, v, and theta | | |
| | with default | | |
| | time-centering in | | |
| | each stage | | |
+----------------------------+----------------------+----------------+---------------------+
| **erf.vert_implicit_fac** | How much implicit | Real >= 0 | 0.0, 0.0, 0.0 |
| | vertical diffusion | (explicit) and | (fully explicit) |
| | to include in each | <= 1 (implicit)| |
| | RK stage? Currently, | | |
| | only applies to | | |
| | rho*theta component. | | |
| | | | |
| | Specify either one | | |
| | (the same for all | | |
| | stages) or three | | |
| | values, one per stage| | |
+----------------------------+----------------------+----------------+---------------------+
| **erf.cfl** | CFL number used to | Real > 0 and | 0.8 |
| | compute level 0 dt | <= 1 | |
+----------------------------+----------------------+----------------+---------------------+
| **erf.substepping_cfl** | CFL number used to | Real > 0 and | 1.0 |
| | compute the number | <= 1 | |
| | of substeps | | |
+----------------------------+----------------------+----------------+---------------------+
| **erf.fixed_dt** | set level 0 dt | Real > 0 | unused if not |
| | as this value | | set |
| | regardless of | | |
| | cfl or other | | |
| | settings | | |
+----------------------------+----------------------+----------------+---------------------+
| **erf.fixed_fast_dt** | set fast dt | Real > 0 | |
| | as this value | | |
+----------------------------+----------------------+----------------+---------------------+
| **erf.fixed_mri_dt_ratio** | set fast dt | even int > 0 | only relevant if |
| | as slow dt / | | substepping_type |
| | this ratio | | is not None |
+----------------------------+----------------------+----------------+---------------------+
| **erf.init_shrink** | factor by which | Real > 0 and | 1.0 |
| | to shrink the | <= 1 | |
| | initial dt | | |
+----------------------------+----------------------+----------------+---------------------+
| **erf.change_max** | factor by which | Real >= 1 | 1.1 |
| | dt can grow | | |
| | in subsequent | | |
| | steps | | |
+----------------------------+----------------------+----------------+---------------------+
| **erf.dt_max** | maximum adaptive | Real > 0 | 1e9 |
| | timestep | | |
| | allowed by time | | |
| | stepping | | |
+----------------------------+----------------------+----------------+---------------------+
| **erf.dt_max_initial** | maximum initial | Real > 0 | 1.0 |
| | timestep | | |
+----------------------------+----------------------+----------------+---------------------+
| **erf.dt_ref_ratio** | ratio of coarse | Integer >= 1 | same as |
| | to fine grid | (one per level)| maximum over |
| | time steps between | | directions of |
| | subsequent | | ref_ratio |
| | levels | | |
+----------------------------+----------------------+----------------+---------------------+
+-------------------------------------+----------------------+----------------+---------------------+
| Parameter | Definition | Acceptable | Default |
| | | Values | |
+=====================================+======================+================+=====================+
| **erf.substepping_type** | Should we substep in | "Implicit" or | "Implicit" if |
| | each RK stage? | "None" | compressible, |
| | | | "None" if anelastic |
+-------------------------------------+----------------------+----------------+---------------------+
| **erf.vert_implicit** | Do vertical implicit | Boolean | false |
| | solve for diffusion | | |
| | of u, v, theta, KE, | | |
| | and qv with default | | |
| | time-centering in | | |
| | each stage | | |
+-------------------------------------+----------------------+----------------+---------------------+
| **erf.vert_implicit_fac** | How much implicit | Real >= 0 | 0.0, 0.0, 0.0 |
| | vertical diffusion | (explicit) and | (fully explicit) |
| | to include in each | <= 1 (implicit)| |
| | RK stage? | | |
| | | | |
| | Specify either one | | |
| | (the same for all | | |
| | stages) or three | | |
| | values, one per stage| | |
+-------------------------------------+----------------------+----------------+---------------------+
| **erf.implicit_thermal_diffusion** | Do vertical implicit | Boolean | true |
| | for theta? | | |
+-------------------------------------+----------------------+----------------+---------------------+
| **erf.implicit_moisture_diffusion** | Do vertical implicit | Boolean | true |
| | for Qv? | | |
+-------------------------------------+----------------------+----------------+---------------------+
| **erf.implicit_ke_diffusion** | Do vertical implicit | Boolean | true |
| | for KE? | | |
+-------------------------------------+----------------------+----------------+---------------------+
| **erf.implicit_momentum_diffusion** | Do vertical implicit | Boolean | true |
| | for U & V? | | |
+-------------------------------------+----------------------+----------------+---------------------+
| **erf.cfl** | CFL number used to | Real > 0 and | 0.8 |
| | compute level 0 dt | <= 1 | |
+-------------------------------------+----------------------+----------------+---------------------+
| **erf.substepping_cfl** | CFL number used to | Real > 0 and | 1.0 |
| | compute the number | <= 1 | |
| | of substeps | | |
+-------------------------------------+----------------------+----------------+---------------------+
| **erf.fixed_dt** | set level 0 dt | Real > 0 | unused if not |
| | as this value | | set |
| | regardless of | | |
| | cfl or other | | |
| | settings | | |
+-------------------------------------+----------------------+----------------+---------------------+
| **erf.fixed_fast_dt** | set fast dt | Real > 0 | |
| | as this value | | |
+-------------------------------------+----------------------+----------------+---------------------+
| **erf.fixed_mri_dt_ratio** | set fast dt | even int > 0 | only relevant if |
| | as slow dt / | | substepping_type |
| | this ratio | | is not None |
+-------------------------------------+----------------------+----------------+---------------------+
| **erf.init_shrink** | factor by which | Real > 0 and | 1.0 |
| | to shrink the | <= 1 | |
| | initial dt | | |
+-------------------------------------+----------------------+----------------+---------------------+
| **erf.change_max** | factor by which | Real >= 1 | 1.1 |
| | dt can grow | | |
| | in subsequent | | |
| | steps | | |
+-------------------------------------+----------------------+----------------+---------------------+
| **erf.dt_max** | maximum adaptive | Real > 0 | 1e9 |
| | timestep | | |
| | allowed by time | | |
| | stepping | | |
+-------------------------------------+----------------------+----------------+---------------------+
| **erf.dt_max_initial** | maximum initial | Real > 0 | 1.0 |
| | timestep | | |
+-------------------------------------+----------------------+----------------+---------------------+
| **erf.dt_ref_ratio** | ratio of coarse | Integer >= 1 | same as |
| | to fine grid | (one per level)| maximum over |
| | time steps between | | directions of |
| | subsequent | | ref_ratio |
| | levels | | |
+-------------------------------------+----------------------+----------------+---------------------+

Notes
-----------------
Expand Down
10 changes: 8 additions & 2 deletions Source/DataStructs/ERF_DataStruct.H
Original file line number Diff line number Diff line change
Expand Up @@ -682,14 +682,19 @@ struct SolverChoice {
// moisture diffusion
pp.query("implicit_moisture_diffusion", implicit_moisture_diffusion);

// If true (default), include implicit contributions to vertical
// KE diffusion
pp.query("implicit_ke_diffusion", implicit_ke_diffusion);

// If true (default), include implicit contributions in tau13, tau23,
// (and if ERF_IMPLICIT_W is set, tau33) to correct u, v, (and w).
pp.query("implicit_momentum_diffusion", implicit_momentum_diffusion);

if (!implicit_thermal_diffusion &&
if (!implicit_thermal_diffusion &&
!implicit_moisture_diffusion &&
!implicit_ke_diffusion &&
!implicit_momentum_diffusion) {
amrex::Print() << "Thermal and momentum diffusion are both turned off -- turning off vertical implicit solve" << std::endl;
amrex::Print() << "Thermal, moisture, KE, and momentum diffusion are both turned off -- turning off vertical implicit solve" << std::endl;
vert_implicit_fac[0] = zero;
vert_implicit_fac[1] = zero;
vert_implicit_fac[2] = zero;
Expand Down Expand Up @@ -1170,6 +1175,7 @@ struct SolverChoice {
// if any vert_implicit_fac > 0, then the following apply:
bool implicit_thermal_diffusion = true;
bool implicit_moisture_diffusion = true;
bool implicit_ke_diffusion = true;
bool implicit_momentum_diffusion = true;
bool implicit_before_substep = true;

Expand Down
6 changes: 3 additions & 3 deletions Source/Diffusion/ERF_ImplicitDiff_N.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ ImplicitDiffForStateLU_N (const Box& bx,
const GpuArray<Real, AMREX_SPACEDIM>& cellSizeInv,
const Array4<const Real>& scalar_zflux,
const Array4<const Real>& mu_turb,
const SolverChoice &solverChoice,
const SolverChoice& solverChoice,
const BCRec* bc_ptr,
const bool use_SurfLayer,
const Real implicit_fac)
Expand Down Expand Up @@ -129,7 +129,7 @@ ImplicitDiffForStateLU_N (const Box& bx,
a_tmp = -Fact * rhoAlpha_lo * dz_inv;
c_tmp = -Fact * rhoAlpha_hi * dz_inv;
b_tmp = cell_data(i,j,k,Rho_comp) - a_tmp - c_tmp;
inv_b2_tmp = one/ (b_tmp - a_tmp * coeffG_a(i,j,k-1));
inv_b2_tmp = one / (b_tmp - a_tmp * coeffG_a(i,j,k-1));

RHS_a(i,j,k) = cell_data(i,j,k,n); // NOTE: this is rho*phi; solution is phi

Expand All @@ -147,7 +147,7 @@ ImplicitDiffForStateLU_N (const Box& bx,
a_tmp = -Fact * rhoAlpha_lo * dz_inv;
c_tmp = zero;
b_tmp = cell_data(i,j,khi,Rho_comp) - a_tmp - c_tmp;
inv_b2_tmp = one/ (b_tmp - a_tmp * coeffG_a(i,j,khi-1));
inv_b2_tmp = one / (b_tmp - a_tmp * coeffG_a(i,j,khi-1));

RHS_a(i,j,khi) = cell_data(i,j,khi,n); // NOTE: this is rho*phi; solution is phi
if (neumann_on_zhi) {
Expand Down
2 changes: 1 addition & 1 deletion Source/Diffusion/ERF_ImplicitDiff_S.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ ImplicitDiffForStateLU_S (const Box& bx,
const Gpu::DeviceVector<Real>& stretched_dz_d,
const Array4<const Real>& scalar_zflux,
const Array4<const Real>& mu_turb,
const SolverChoice &solverChoice,
const SolverChoice& solverChoice,
const BCRec* bc_ptr,
const bool use_SurfLayer,
const Real implicit_fac)
Expand Down
2 changes: 1 addition & 1 deletion Source/Diffusion/ERF_ImplicitDiff_T.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ ImplicitDiffForStateLU_T (const Box& bx,
const GpuArray<Real, AMREX_SPACEDIM>& cellSizeInv,
const Array4<const Real>& scalar_zflux,
const Array4<const Real>& mu_turb,
const SolverChoice &solverChoice,
const SolverChoice& solverChoice,
const BCRec* bc_ptr,
const bool use_SurfLayer,
const Real implicit_fac)
Expand Down
1 change: 0 additions & 1 deletion Source/IO/ERF_ReadFromWRFBdy.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -163,7 +163,6 @@ convert_wrfbdy_data (const int itime,
int ihi = domain.bigEnd()[0];
int jlo = domain.smallEnd()[1];
int jhi = domain.bigEnd()[1];
int klo = domain.smallEnd()[2];
int khi = domain.bigEnd()[2];

// PH bounds limiting
Expand Down
Loading
Loading