Source
xxxxxxxxxx
std::complex<double> mkSpecificRefractivity(unsigned int species, double temperature, double pressure, double frequency, double width, unsigned int n){return mkSpecificRefractivity(species, temperature, pressure, double(0.0), frequency, width, n);}
/*******************************************************************************
* ALMA - Atacama Large Millimiter Array
* (c) Instituto de Estructura de la Materia, 2009
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; either
* version 2.1 of the License, or (at your option) any later version.
*
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with this library; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*
* "@(#) $Id: ATMRefractiveIndex.h Exp $"
*
* who when what
* -------- -------- ----------------------------------------------
* pardo 24/03/09 created
*/
ATM_NAMESPACE_BEGIN
/*! \brief RefractiveIndex allows to extract absorption and Phase coefficient(s) at
* a given frequency and P/T/gas densities.
*
* \anchor definitions Definitions to intepret the outputs:
* - Phase and amplitude response of a plane wave propagating a distance \f$z\f$ at frequency \f$\nu\f$:
* \f$E(z)=e^{ikz(1+N)}E(0)\f$
* - \f$k=2\pi\nu/c\f$ is the <b>free space wave number</b>.
* - \f$N=(n-1)=(N_r+iN_i)\f$ is the <b>Refractivity</b> (\f$n\f$ is the <b>Refraction Index</b>). <br>
* - \f$N=N_{g1}+N_{g2}+N_{g3}+ ...\f$ (\f$gi\f$ are atmospheric gases or account for other mechanisms
* that modify the refractivity such as <br> collision-induced absorption by \f$O_2-N_2\f$, \f$N_2-N_2\f$,
* \f$O_2-O_2\f$, \f$O_2-H_2O\f$ or \f$N_2-H_2O\f$ pairs.
* - For a given gas \f$g\f$:
* -# \f$N_g=(N_{rg}+iN_{ig})\f$ is the <b>Refractivity</b> of that gas.
* -# \f$N_g/\rho_g\f$, where \f$\rho_g\f$ is the <b>number density</b> of gas \f$g\f$, is the <b>Specific Refractivity</b> of that gas.
* -# \f$2\pi\nu N_{rg}/c=\phi_g\f$ \f$(rad\cdot m^{-1})\f$ is the <b>Phase Dispersion Coefficient</b> of gas \f$g\f$
* -# \f$2\pi\nu N_{ig}/c=\kappa_g\f$ \f$(m^{-1})\f$ is the <b>Absorption Coefficient</b> of gas \f$g\f$
* -# \f$2\pi\nu N_{rg}/(c\rho_g)=\phi_g/\rho_{g}\f$ \f$(rad\cdot m^2)\f$ is the <b>Specific Phase Dispersion Coefficient</b> of gas \f$g\f$
* -# \f$2\pi\nu N_{ig}/(c\rho_g)=\kappa_g/\rho_{g}\f$ \f$(m^2)\f$ is the <b>Specific Absorption Coefficient</b> of gas \f$g\f$.
* -# \f$(2\pi\nu/c)\cdot(N_{rg}+iN_{ig})\f$ with units \f$(rad\cdot m^{-1},m^{-1})\f$ is the result of <b>getRefractivity</b> operators for gas \f$g\f$.
* -# \f$[2\pi\nu/(c\rho_g)]\cdot(N_{rg}+iN_{ig})\f$ with units \f$(rad\cdot m^2,m^2)\f$ is the result og <b>getSpecificRefractivity</b> operators for gas \f$g\f$.
* - Therefore in order to obtain Phase Dispersion and Absorption Coefficients:
* -# Absorption Coefficient (\f$m^{-1}\f$) = Imaginary part of the result of the <b>getRefractivity</b> operator.
* -# Phase Dispersion Coefficient (\f$rad\cdot m^{-1}\f$) = Real part of the result of the <b>getRefractivity</b> operator.
* -# Specific Absorption Coefficient (\f$m^2\f$) = Imaginary part of the result of the <b>getSpecificRefractivity</b> operator.
* -# Specific Phase Dispersion Coefficient (\f$rad\cdot m^2\f$) = Real part of the result of the <b>getSpecificRefractivity</b> operator.
*
* - <b>species \f$(g)\f$ codes: <b>
* -# \f$^{16}O^{16}O\f$
* -# \f$^{16}O^{16}O vib\f$
* -# \f$^{16}O^{18}O\f$
* -# \f$^{16}O^{17}O\f$
* -# \f$CO \f$
* -# \f$N_2O\f$
* -# \f$NO_2\f$
* -# \f$SO_2\f$
* -# \f$CNTH2O \f$
* -# \f$CNTDRY \f$
* -# \f$HH^{16}O \f$
* -# \f$HH^{16}O v2 \f$
* -# \f$HH^{18}O \f$
* -# \f$HH^{17}O \f$
* -# \f$HDO\f$
* -# \f$^{16}O^{16}O^{16}O\f$
* -# \f$^{16}O^{16}O^{16}O v2\f$
* -# \f$^{16}O^{16}O^{16}O v1\f$
* -# \f$^{16}O^{16}O^{16}O v3 \f$
* -# \f$^{16}O^{16}O^{18}O \f$
* -# \f$^{16}O^{16}O^{17}O \f$
* -# \f$^{16}O^{18}O^{16}O \f$
* -# \f$^{16}O^{17}O^{16}O \f$
*/
class RefractiveIndex
{