ARTS  2.4.0(git:4fb77825)
m_tmatrix.cc File Reference

T-Matrix related workspace methods. More...

#include <cfloat>
#include <cmath>
#include <stdexcept>
#include "check_input.h"
#include "logic.h"
#include "math_funcs.h"
#include "messages.h"
#include "refraction.h"
#include "special_interp.h"
#include "tmatrix.h"

Go to the source code of this file.

Functions

void diameter_maxFromDiameter_volume_equ (Numeric &diameter_max, Numeric &diameter_aspect_area_max, const String &shape, const Numeric &diameter_volume_equ, const Numeric &aspect_ratio, const Verbosity &)
 WORKSPACE METHOD: diameter_maxFromDiameter_volume_equ. More...
 
void diameter_volume_equFromDiameter_max (Numeric &diameter_volume_equ, Numeric &volume, const String &shape, const Numeric &diameter_max, const Numeric &aspect_ratio, const Verbosity &)
 WORKSPACE METHOD: diameter_volume_equFromDiameter_max. More...
 
void scat_data_singleTmatrix (SingleScatteringData &scat_data_single, ScatteringMetaData &scat_meta_single, const GriddedField3 &complex_refr_index, const String &shape, const Numeric &diameter_volume_equ, const Numeric &aspect_ratio, const Numeric &mass, const String &ptype, const Vector &data_f_grid, const Vector &data_t_grid, const Vector &data_za_grid, const Vector &data_aa_grid, const Numeric &precision, const String &cri_source, const Index &ndgs, const Index &robust, const Index &quiet, const Verbosity &verbosity)
 WORKSPACE METHOD: scat_data_singleTmatrix. More...
 
void TMatrixTest (const Verbosity &verbosity)
 WORKSPACE METHOD: TMatrixTest. More...
 

Variables

const Numeric PI
 

Detailed Description

T-Matrix related workspace methods.

Author
Oliver Lemke
Date
2013-06-25

Definition in file m_tmatrix.cc.

Function Documentation

◆ diameter_maxFromDiameter_volume_equ()

void diameter_maxFromDiameter_volume_equ ( Numeric diameter_max,
Numeric diameter_area_equ,
const String shape,
const Numeric diameter_volume_equ,
const Numeric aspect_ratio,
const Verbosity verbosity 
)

WORKSPACE METHOD: diameter_maxFromDiameter_volume_equ.

Calculates maximum and area equivalent diameters from volume equivalent diameter.

This is primarily a help function for using the T-matrix method and only a few particle shapes are handled. For shapes handled and further comments on the input arguments, see scat_data_singleTmatrix*.

Area equivalent diameter is the equivalent sphere diameter corresponding to the "maximum axial area". This is the largest cross-sectional area of the particle, observed either along the particle's main axis or in the perpendicular direction. That is, for a cylinder having diameter d and thickness h, this area is either (pi*d^2)/4 or (h*d).

Author
Johan Strandgren
Patrick Eriksson
Parameters
[out]diameter_maxGeneric output
[out]diameter_area_equGeneric output
[in]shapeGeneric Input
[in]diameter_volume_equGeneric Input
[in]aspect_ratioGeneric Input

Definition at line 40 of file m_tmatrix.cc.

References max, PI, and pow().

Referenced by diameter_maxFromDiameter_volume_equ_g().

◆ diameter_volume_equFromDiameter_max()

void diameter_volume_equFromDiameter_max ( Numeric diameter_volume_equ,
Numeric volume,
const String shape,
const Numeric diameter_max,
const Numeric aspect_ratio,
const Verbosity verbosity 
)

WORKSPACE METHOD: diameter_volume_equFromDiameter_max.

Converts from maximum to volume equivalent diameter.

This is primarily a help function for using the T-matrix part and only a few particle shapes are handled. For shapes handled and further comments on the input arguments, see scat_data_singleTmatrix.

Also the volume is provided. It is simply sqrt(pi*dveq^3/6).

Author
Johan Strandgren
Patrick Eriksson
Parameters
[out]diameter_volume_equGeneric output
[out]volumeGeneric output
[in]shapeGeneric Input
[in]diameter_maxGeneric Input
[in]aspect_ratioGeneric Input

Definition at line 82 of file m_tmatrix.cc.

References PI, and pow().

Referenced by diameter_volume_equFromDiameter_max_g().

◆ scat_data_singleTmatrix()

void scat_data_singleTmatrix ( SingleScatteringData scat_data_single,
ScatteringMetaData scat_meta_single,
const GriddedField3 complex_refr_index,
const String shape,
const Numeric diameter_volume_equ,
const Numeric aspect_ratio,
const Numeric mass,
const String ptype,
const Vector data_f_grid,
const Vector data_t_grid,
const Vector data_za_grid,
const Vector data_aa_grid,
const Numeric precision,
const String cri_source,
const Index ndgs,
const Index robust,
const Index quiet,
const Verbosity verbosity 
)

WORKSPACE METHOD: scat_data_singleTmatrix.

A basic interface to Mishchenko's T-matrix code linked to ARTS.

The method performs a T-matrix calculation for a single scattering element, i.e. a combination of particle shape, size, aspect ratio and orientation.

Particle shape (shape) has two options: <br> "spheroidal" and "cylindrical"

Particle size (diameter_volume_equ) is given as the equivalent volume sphere diameter. That is, the diameter obtained if all the particle's material is rearranged into a (solid) sphere.

Particle aspect ratio ar (aspect_ratio) is a numeric value, defined according to Mishchenko's definition as ratio of horizontal axis a to vertical (rotational) axis b: ar=a/b. That is, oblates have ar>1, prolates ar<1. Perfect spheres (spheroidals with ar=1) can trigger numerical issues. To avoid these, we internally increase their aspect ratio by 1e-6, i.e. turning perfect spheres into very light oblates.

Particle type (ptype) has two options: <br> "totally_random" and "azimuthally_random" For totally randomly oriented particles, data_aa_grid is not taken into account (but a Vector type container needs to be passed).

For further information on how aspect ratio and the different shapes and orientations are defined, see the documentation of the T-matrix code found http://www.giss.nasa.gov/staff/mmishchenko/t_matrix.html

Regarding ndgs, we refer to the this comment from the documentation: <br> "Parameter controlling the number of division points <br> in computing integrals over the particle surface. <br> For compact particles, the recommended value is 2. <br> For highly aspherical particles larger values (3, 4,...) <br> may be necessary to obtain convergence. <br> The code does not check convergence over this parameter. <br> Therefore, control comparisons of results obtained with <br> different NDGS-values are recommended."

Author
Johan Strandgren
Patrick Eriksson
Parameters
[out]scat_data_singleWS Output
[out]scat_meta_singleWS Output
[in]complex_refr_indexWS Input
[in]shapeGeneric Input
[in]diameter_volume_equGeneric Input
[in]aspect_ratioGeneric Input
[in]massGeneric Input (Default: "NaN")
[in]ptypeGeneric Input
[in]data_f_gridGeneric Input
[in]data_t_gridGeneric Input
[in]data_za_gridGeneric Input
[in]data_aa_gridGeneric Input (Default: "[]")
[in]precisionGeneric Input (Default: "0.001")
[in]cri_sourceGeneric Input (Default: "Set by user, unknown source.")
[in]ndgsGeneric Input (Default: "2")
[in]robustGeneric Input (Default: "0")
[in]quietGeneric Input (Default: "1")

Definition at line 116 of file m_tmatrix.cc.

References is_same_within_epsilon(), last(), ConstVectorView::nelem(), PTYPE_AZIMUTH_RND, PTYPE_TOTAL_RND, PTypeFromString(), and ARTS::Var::scat_data_single().

Referenced by scat_data_singleTmatrix_g().

◆ TMatrixTest()

void TMatrixTest ( const Verbosity verbosity)

WORKSPACE METHOD: TMatrixTest.

T-Matrix validation test.

Executes the standard test included with the T-Matrix Fortran code. Should give the same as running the tmatrix_lp executable in 3rdparty/tmatrix/.

Author
Oliver Lemke

Definition at line 278 of file m_tmatrix.cc.

References calc_ssp_fixed_test(), calc_ssp_random_test(), tmatrix_ampld_test(), tmatrix_tmd_test(), and ARTS::Var::verbosity().

Referenced by TMatrixTest_g().

Variable Documentation

◆ PI