ERF
Energy Research and Forecasting: An Atmospheric Modeling Code
erf_cloud_chamber_wall_flux::CellScalarWallRate Struct Reference

#include <ERF_CloudChamberWallFlux.H>

Collaboration diagram for erf_cloud_chamber_wall_flux::CellScalarWallRate:

Public Member Functions

AMREX_GPU_HOST_DEVICE AMREX_FORCE_INLINE void add (const erf_wall_thermodynamics::ScalarTransfer &scalar, amrex::Real U_t, amrex::Real dx_inv, amrex::Real z0_m, amrex::Real most_coefficient) noexcept
 
AMREX_GPU_HOST_DEVICE AMREX_FORCE_INLINE amrex::Real max_rate () const noexcept
 

Public Attributes

amrex::Real max_wall_law = 0
 
amrex::Real sum = 0
 
bool combined = false
 

Member Function Documentation

◆ add()

AMREX_GPU_HOST_DEVICE AMREX_FORCE_INLINE void erf_cloud_chamber_wall_flux::CellScalarWallRate::add ( const erf_wall_thermodynamics::ScalarTransfer &  scalar,
amrex::Real  U_t,
amrex::Real  dx_inv,
amrex::Real  z0_m,
amrex::Real  most_coefficient 
)
inlinenoexcept
700  {
701  using namespace erf_wall_thermodynamics;
702  amrex::Real rate = 0;
703  switch (scalar.model) {
704  case ScalarModel::ResolvedMolecular:
705  sum += scalar.resolved_speed * dx_inv;
706  return;
707  case ScalarModel::BulkAero: {
708  const auto C = scalar.provider == CoefficientProvider::MOST ?
709  most_coefficient : scalar.coefficient;
710  rate = neutral_scalar_rate(C, U_t, dx_inv) + scalar.molecular_speed * dx_inv;
711  // Setup requires positive diffusivity for bulk_aero_plus_molecular;
712  // plain bulk has zero molecular speed.
713  combined |= scalar.molecular_speed > 0;
714  break;
715  }
716  case ScalarModel::NeutralRoughnessLog:
718  amrex::Real(0.5) / dx_inv, z0_m, scalar.z0), U_t, dx_inv);
719  break;
720  }
721  sum += rate;
722  max_wall_law = amrex::max(max_wall_law, rate);
723  }
AMREX_GPU_HOST_DEVICE AMREX_FORCE_INLINE amrex::Real neutral_log_scalar_coefficient(amrex::Real wall_distance, amrex::Real z0_m, amrex::Real z0_scalar) noexcept
Definition: ERF_CloudChamberWallFlux.H:233
AMREX_GPU_HOST_DEVICE AMREX_FORCE_INLINE amrex::Real neutral_scalar_rate(amrex::Real coefficient, amrex::Real U_t, amrex::Real dx_inv) noexcept
Definition: ERF_CloudChamberWallFlux.H:573
Definition: ERF_WallThermodynamics.H:10
amrex::Real sum
Definition: ERF_CloudChamberWallFlux.H:693
bool combined
Definition: ERF_CloudChamberWallFlux.H:694
amrex::Real max_wall_law
Definition: ERF_CloudChamberWallFlux.H:692
amrex::Real coefficient
Definition: ERF_WallThermodynamics.H:78
CoefficientProvider provider
Definition: ERF_WallThermodynamics.H:77
amrex::Real z0
Definition: ERF_WallThermodynamics.H:79
amrex::Real resolved_speed
Definition: ERF_WallThermodynamics.H:83
amrex::Real molecular_speed
Definition: ERF_WallThermodynamics.H:81
ScalarModel model
Definition: ERF_WallThermodynamics.H:76
Here is the call graph for this function:

◆ max_rate()

AMREX_GPU_HOST_DEVICE AMREX_FORCE_INLINE amrex::Real erf_cloud_chamber_wall_flux::CellScalarWallRate::max_rate ( ) const
inlinenoexcept
727  {
728  return combined ? sum : max_wall_law;
729  }

Member Data Documentation

◆ combined

bool erf_cloud_chamber_wall_flux::CellScalarWallRate::combined = false

Referenced by add(), and max_rate().

◆ max_wall_law

amrex::Real erf_cloud_chamber_wall_flux::CellScalarWallRate::max_wall_law = 0

Referenced by add(), and max_rate().

◆ sum

amrex::Real erf_cloud_chamber_wall_flux::CellScalarWallRate::sum = 0

Referenced by add(), and max_rate().


The documentation for this struct was generated from the following file: