Canoe
Comprehensive Atmosphere N' Ocean Engine
|
#include <radiation_band.hpp>
Classes | |
class | RTSolver |
class | RTSolverLambert |
Public Member Functions | |
RadiationBand (std::string name, YAML::Node const &rad) | |
virtual | ~RadiationBand () |
void | Resize (int nc1, int nc2=1, int nc3=1, int nstr=8) |
Allocate memory for radiation band. More... | |
void | ResizeSolver (int nlyr, int nstr=8, int nuphi=1, int numu=1) |
Allocate memory for radiation solver. More... | |
std::shared_ptr< RTSolver > | CreateRTSolverFrom (std::string const &name, YAML::Node const &rad) |
Create radiative transfer solver from YAML node. More... | |
size_t | GetNumSpecGrids () const |
Get number of spectral grids. More... | |
size_t | GetNumAbsorbers () const |
Get number of absorbers. More... | |
size_t | GetNumPhaseMoments () const |
Get number of phase function moments. More... | |
size_t | GetNumLayers () const |
Get number of phase function moments. More... | |
std::pair< Real, Real > | GetRange () const |
Get range of wavenumbers. More... | |
std::shared_ptr< Absorber > | GetAbsorber (int i) |
Get an individual absorber. More... | |
std::shared_ptr< Absorber > | GetAbsorberByName (std::string const &name) |
Get an individual absorber by name. More... | |
size_t | GetNumOutgoingRays () |
Get number of outgoing rays. More... | |
Real | GetCosinePolarAngle (int n) const |
Get cosine polar angle of the outgoing ray. More... | |
Real | GetAzimuthalAngle (int n) const |
Get azimuthal angle of the outgoing ray. More... | |
void | SetSpectralProperties (AirColumn &air, Coordinates const *pcoord, Real grav, int k, int j) |
Set spectral properties for an air column. More... | |
void | CalBandFlux (MeshBlock const *pmb, int k, int j, int il, int iu) |
Calculate band radiative fluxes. More... | |
void | CalBandRadiance (MeshBlock const *pmb, int k, int j) |
Calculate band radiances. More... | |
void | SetOutgoingRays (std::vector< Direction > const &ray) |
Set outgoing ray directions. More... | |
void | WriteAsciiHeader (OutputParameters const *) const override |
void | WriteAsciiData (OutputParameters const *) const override |
void | PackTemperature () |
Pack temperature at cell face into send buffer 0. More... | |
bool | UnpackTemperature (void *arg) |
Unpack temperature at cell face from receive buffer 0. More... | |
void | PackSpectralGrid (int b) |
Pack data in spectral grid b into send buffer 1. More... | |
bool | UnpackSpectralGrid (void *arg) |
Unpack data from receive buffer 1 into spectral grid b. More... | |
void | Transfer (MeshBlock const *pmb, int n) override |
Public Member Functions inherited from NamedGroup | |
NamedGroup (std::string name) | |
virtual | ~NamedGroup () |
std::string | GetName () const |
Public Member Functions inherited from FlagGroup | |
FlagGroup (uint64_t flags=0LL) | |
virtual | ~FlagGroup () |
int | TestFlag (uint64_t flag) const |
void | SetFlag (uint64_t flag) |
Public Member Functions inherited from ParameterGroup | |
virtual | ~ParameterGroup () |
void | SetRealsFrom (YAML::Node const &node) |
void | SetPar (std::string const &name, Real value) |
Set real parameter. More... | |
void | SetPar (std::string const &name, int value) |
Set int parameter. More... | |
void | SetPar (std::string const &name, std::string const &value) |
Set string parameter. More... | |
template<typename T > | |
T | GetPar (std::string const &name) const |
Get parameter. More... | |
bool | HasPar (std::string const &name) const |
Check if a parameter exists. More... | |
template<> | |
int | GetPar (std::string const &name) const |
template<> | |
Real | GetPar (std::string const &name) const |
Public Member Functions inherited from ASCIIOutputGroup | |
virtual | ~ASCIIOutputGroup () |
Public Member Functions inherited from LinearExchanger< RadiationBand > | |
LinearExchanger () | |
int | GetRankInGroup () const |
void | Regroup (MeshBlock const *pmb, CoordinateDirection dir) |
Public Member Functions inherited from Exchanger< T > | |
Exchanger () | |
virtual | ~Exchanger () |
virtual void | ClearBuffer (MeshBlock const *pmb) |
Clear buffer. More... | |
void | SetBoundaryStatus (int bid, BoundaryStatus status) |
Set the boundary status. More... | |
Public Member Functions inherited from ExchangerBase | |
ExchangerBase () | |
virtual | ~ExchangerBase () |
virtual void | PackData (MeshBlock const *pmb) |
Pack data to send buffer. More... | |
virtual bool | UnpackData (MeshBlock const *pmb) |
Unpack data from receive buffer. More... | |
Public Attributes | |
AthenaArray< Real > | btau |
band optical depth More... | |
AthenaArray< Real > | bssa |
band single scattering albedo More... | |
AthenaArray< Real > | bpmom |
band phase function moments More... | |
AthenaArray< Real > | bflxup |
band upward flux More... | |
AthenaArray< Real > | bflxdn |
band downward flux More... | |
AthenaArray< Real > | btoa |
band top-of-the-atmosphere radiance More... | |
Protected Attributes | |
std::shared_ptr< RTSolver > | psolver_ |
radiative transfer solver More... | |
std::shared_ptr< SpectralGridBase > | pgrid_ |
spectral grid More... | |
std::pair< Real, Real > | wrange_ |
identify wave- number (wavelength, frequency) range More... | |
std::vector< std::shared_ptr< Absorber > > | absorbers_ |
all absorbers More... | |
std::vector< Direction > | rayOutput_ |
outgoing rays More... | |
AthenaArray< Real > | tau_ |
spectral bin optical depth More... | |
AthenaArray< Real > | ssa_ |
spectral bin single scattering albedo More... | |
AthenaArray< Real > | toa_ |
spectral bin top-of-the-atmosphere radiance More... | |
AthenaArray< Real > | flxup_ |
spectral bin upward flux More... | |
AthenaArray< Real > | flxdn_ |
spectral bin downward flux More... | |
AthenaArray< Real > | pmom_ |
spectral bin phase function moments More... | |
std::vector< Real > | tem_ |
temperature at cell center More... | |
std::vector< Real > | temf_ |
temperature at cell boundary (face) More... | |
Protected Attributes inherited from Exchanger< T > | |
enum BoundaryStatus | status_flag_ [MessageTraits< T >::num_buffers] |
BufferType | send_buffer_ [MessageTraits< T >::num_buffers] |
BufferType | recv_buffer_ [MessageTraits< T >::num_buffers] |
Additional Inherited Members | |
Public Types inherited from LinearExchanger< RadiationBand > | |
using | Base = Exchanger< RadiationBand > |
Public Types inherited from Exchanger< T > | |
using | DataType = typename MessageTraits< T >::DataType |
using | BufferType = std::vector< DataType > |
Definition at line 32 of file radiation_band.hpp.
RadiationBand::RadiationBand | ( | std::string | name, |
YAML::Node const & | rad | ||
) |
Definition at line 37 of file radiation_band.cpp.
|
virtual |
Definition at line 80 of file radiation_band.cpp.
void RadiationBand::Resize | ( | int | nc1, |
int | nc2 = 1 , |
||
int | nc3 = 1 , |
||
int | nstr = 8 |
||
) |
Allocate memory for radiation band.
Definition at line 85 of file radiation_band.cpp.
void RadiationBand::ResizeSolver | ( | int | nlyr, |
int | nstr = 8 , |
||
int | nuphi = 1 , |
||
int | numu = 1 |
||
) |
Allocate memory for radiation solver.
Definition at line 116 of file radiation_band.cpp.
std::shared_ptr< RadiationBand::RTSolver > RadiationBand::CreateRTSolverFrom | ( | std::string const & | name, |
YAML::Node const & | rad | ||
) |
Create radiative transfer solver from YAML node.
[in] | rad | YAML node containing whole radiation configuration |
Definition at line 215 of file radiation_band.cpp.
|
inline |
Get number of spectral grids.
Definition at line 81 of file radiation_band.hpp.
|
inline |
Get number of absorbers.
Definition at line 84 of file radiation_band.hpp.
|
inline |
Get number of phase function moments.
Definition at line 87 of file radiation_band.hpp.
|
inline |
Get number of phase function moments.
Definition at line 90 of file radiation_band.hpp.
|
inline |
Get range of wavenumbers.
Definition at line 93 of file radiation_band.hpp.
|
inline |
Get an individual absorber.
Definition at line 96 of file radiation_band.hpp.
AbsorberPtr RadiationBand::GetAbsorberByName | ( | std::string const & | name | ) |
Get an individual absorber by name.
Definition at line 120 of file radiation_band.cpp.
|
inline |
Get number of outgoing rays.
Definition at line 102 of file radiation_band.hpp.
|
inline |
Get cosine polar angle of the outgoing ray.
Definition at line 105 of file radiation_band.hpp.
|
inline |
Get azimuthal angle of the outgoing ray.
Definition at line 108 of file radiation_band.hpp.
void RadiationBand::SetSpectralProperties | ( | AirColumn & | air, |
Coordinates const * | pcoord, | ||
Real | grav, | ||
int | k, | ||
int | j | ||
) |
Set spectral properties for an air column.
[in] | air | mole fraction representation of air column |
[in] | pcoord | coordinates |
[in] | grav | gravitational acceleration |
[in] | k | horizontal index |
[in] | j | horizontal index |
Definition at line 28 of file set_spectral_properties.cpp.
void RadiationBand::CalBandFlux | ( | MeshBlock const * | pmb, |
int | k, | ||
int | j, | ||
int | il, | ||
int | iu | ||
) |
Calculate band radiative fluxes.
Definition at line 132 of file radiation_band.cpp.
void RadiationBand::CalBandRadiance | ( | MeshBlock const * | pmb, |
int | k, | ||
int | j | ||
) |
Calculate band radiances.
Definition at line 144 of file radiation_band.cpp.
|
inline |
Set outgoing ray directions.
[in] | rayOutput | outgoing ray directions |
Definition at line 130 of file radiation_band.hpp.
|
overridevirtual |
Implements ASCIIOutputGroup.
Definition at line 155 of file radiation_band.cpp.
|
overridevirtual |
Implements ASCIIOutputGroup.
Definition at line 189 of file radiation_band.cpp.
void RadiationBand::PackTemperature | ( | ) |
Pack temperature at cell face into send buffer 0.
Definition at line 18 of file radiation_band_exchanger.cpp.
bool RadiationBand::UnpackTemperature | ( | void * | arg | ) |
Unpack temperature at cell face from receive buffer 0.
Definition at line 23 of file radiation_band_exchanger.cpp.
void RadiationBand::PackSpectralGrid | ( | int | b | ) |
Pack data in spectral grid b into send buffer 1.
[in] | b | spectral bin index |
Definition at line 46 of file radiation_band_exchanger.cpp.
bool RadiationBand::UnpackSpectralGrid | ( | void * | arg | ) |
Unpack data from receive buffer 1 into spectral grid b.
Definition at line 63 of file radiation_band_exchanger.cpp.
|
overridevirtual |
Implements ExchangerBase.
Definition at line 107 of file radiation_band_exchanger.cpp.
AthenaArray<Real> RadiationBand::btau |
band optical depth
Definition at line 44 of file radiation_band.hpp.
AthenaArray<Real> RadiationBand::bssa |
band single scattering albedo
Definition at line 47 of file radiation_band.hpp.
AthenaArray<Real> RadiationBand::bpmom |
band phase function moments
Definition at line 50 of file radiation_band.hpp.
AthenaArray<Real> RadiationBand::bflxup |
band upward flux
Definition at line 53 of file radiation_band.hpp.
AthenaArray<Real> RadiationBand::bflxdn |
band downward flux
Definition at line 56 of file radiation_band.hpp.
AthenaArray<Real> RadiationBand::btoa |
band top-of-the-atmosphere radiance
This is a shallow reference to radiance in Radiation
Definition at line 61 of file radiation_band.hpp.
|
protected |
radiative transfer solver
Definition at line 155 of file radiation_band.hpp.
|
protected |
spectral grid
Definition at line 158 of file radiation_band.hpp.
|
protected |
identify wave- number (wavelength, frequency) range
Definition at line 161 of file radiation_band.hpp.
|
protected |
all absorbers
Definition at line 164 of file radiation_band.hpp.
|
protected |
outgoing rays
Definition at line 167 of file radiation_band.hpp.
|
protected |
spectral bin optical depth
This is a two-dimensional array. The first dimension is the size of the spectral bin and the second dimension is the size of the vertical dimension.
Definition at line 174 of file radiation_band.hpp.
|
protected |
spectral bin single scattering albedo
This is a two-dimensional array. The first dimension is the size of the spectral bin and the second dimension is the size of the vertical dimension.
Definition at line 181 of file radiation_band.hpp.
|
protected |
spectral bin top-of-the-atmosphere radiance
This is a two-dimensional array. The first dimension is the size of the spectral bin and the second dimension is the size of the vertical dimension.
Definition at line 188 of file radiation_band.hpp.
|
protected |
spectral bin upward flux
This is a two-dimensional array. The first dimension is the size of the spectral bin and the second dimension is the size of the vertical dimension.
Definition at line 195 of file radiation_band.hpp.
|
protected |
spectral bin downward flux
This is a two-dimensional array. The first dimension is the size of the spectral bin and the second dimension is the size of the vertical dimension.
Definition at line 202 of file radiation_band.hpp.
|
protected |
spectral bin phase function moments
This is a three-dimensional array. The first dimension is the size of the spectral bin. The second dimension is the size of the vertical dimension. The third dimension is the size of the phase function moments (1 + npmom).
Definition at line 209 of file radiation_band.hpp.
|
protected |
temperature at cell center
Definition at line 212 of file radiation_band.hpp.
|
protected |
temperature at cell boundary (face)
Definition at line 215 of file radiation_band.hpp.