1 #ifndef SRC_HARP_RADIATION_BAND_HPP_
2 #define SRC_HARP_RADIATION_BAND_HPP_
11 #include <yaml-cpp/yaml.h>
14 #include <athena/athena.hpp>
27 class OutputParameters;
69 void Resize(
int nc1,
int nc2 = 1,
int nc3 = 1,
int nstr = 8);
72 void ResizeSolver(
int nlyr,
int nstr = 8,
int nuphi = 1,
int numu = 1);
78 YAML::Node
const &rad);
119 Real grav,
int k,
int j);
122 void CalBandFlux(MeshBlock
const *pmb,
int k,
int j,
int il,
int iu);
151 void Transfer(MeshBlock
const *pmb,
int n)
override;
158 std::shared_ptr<SpectralGridBase>
pgrid_;
std::vector< AirParcel > AirColumn
base class of all absorbers
bool UnpackTemperature(void *arg)
Unpack temperature at cell face from receive buffer 0.
void PackSpectralGrid(int b)
Pack data in spectral grid b into send buffer 1.
void CalBandFlux(MeshBlock const *pmb, int k, int j, int il, int iu)
Calculate band radiative fluxes.
std::shared_ptr< Absorber > GetAbsorberByName(std::string const &name)
Get an individual absorber by name.
Real GetAzimuthalAngle(int n) const
Get azimuthal angle of the outgoing ray.
bool UnpackSpectralGrid(void *arg)
Unpack data from receive buffer 1 into spectral grid b.
std::shared_ptr< Absorber > GetAbsorber(int i)
Get an individual absorber.
std::pair< Real, Real > GetRange() const
Get range of wavenumbers.
AthenaArray< Real > flxdn_
spectral bin downward flux
std::vector< Real > temf_
temperature at cell boundary (face)
std::pair< Real, Real > wrange_
identify wave- number (wavelength, frequency) range
AthenaArray< Real > bpmom
band phase function moments
void ResizeSolver(int nlyr, int nstr=8, int nuphi=1, int numu=1)
Allocate memory for radiation solver.
Real GetCosinePolarAngle(int n) const
Get cosine polar angle of the outgoing ray.
std::shared_ptr< RTSolver > psolver_
radiative transfer solver
AthenaArray< Real > pmom_
spectral bin phase function moments
void SetOutgoingRays(std::vector< Direction > const &ray)
Set outgoing ray directions.
size_t GetNumOutgoingRays()
Get number of outgoing rays.
std::shared_ptr< SpectralGridBase > pgrid_
spectral grid
AthenaArray< Real > toa_
spectral bin top-of-the-atmosphere radiance
void CalBandRadiance(MeshBlock const *pmb, int k, int j)
Calculate band radiances.
AthenaArray< Real > flxup_
spectral bin upward flux
AthenaArray< Real > btau
band optical depth
std::shared_ptr< RTSolver > CreateRTSolverFrom(std::string const &name, YAML::Node const &rad)
Create radiative transfer solver from YAML node.
AthenaArray< Real > bflxup
band upward flux
void Transfer(MeshBlock const *pmb, int n) override
AthenaArray< Real > ssa_
spectral bin single scattering albedo
void PackTemperature()
Pack temperature at cell face into send buffer 0.
AthenaArray< Real > btoa
band top-of-the-atmosphere radiance
size_t GetNumLayers() const
Get number of phase function moments.
std::vector< Real > tem_
temperature at cell center
RadiationBand(std::string name, YAML::Node const &rad)
size_t GetNumAbsorbers() const
Get number of absorbers.
void WriteAsciiData(OutputParameters const *) const override
std::vector< std::shared_ptr< Absorber > > absorbers_
all absorbers
void SetSpectralProperties(AirColumn &air, Coordinates const *pcoord, Real grav, int k, int j)
Set spectral properties for an air column.
void Resize(int nc1, int nc2=1, int nc3=1, int nstr=8)
Allocate memory for radiation band.
AthenaArray< Real > tau_
spectral bin optical depth
size_t GetNumPhaseMoments() const
Get number of phase function moments.
size_t GetNumSpecGrids() const
Get number of spectral grids.
AthenaArray< Real > bflxdn
band downward flux
void WriteAsciiHeader(OutputParameters const *) const override
std::vector< Direction > rayOutput_
outgoing rays
AthenaArray< Real > bssa
band single scattering albedo
static RadiationBandContainer CreateFrom(ParameterInput *pin, std::string key)
Base class for a collection of spectral grids.
std::shared_ptr< RadiationBand > RadiationBandPtr
std::vector< RadiationBandPtr > RadiationBandContainer