💿🐜 Antkeeper source code https://antkeeper.com
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

75 lines
2.4 KiB

  1. /*
  2. * Copyright (C) 2021 Christopher J. Howard
  3. *
  4. * This file is part of Antkeeper source code.
  5. *
  6. * Antkeeper source code is free software: you can redistribute it and/or modify
  7. * it under the terms of the GNU General Public License as published by
  8. * the Free Software Foundation, either version 3 of the License, or
  9. * (at your option) any later version.
  10. *
  11. * Antkeeper source code is distributed in the hope that it will be useful,
  12. * but WITHOUT ANY WARRANTY; without even the implied warranty of
  13. * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  14. * GNU General Public License for more details.
  15. *
  16. * You should have received a copy of the GNU General Public License
  17. * along with Antkeeper source code. If not, see <http://www.gnu.org/licenses/>.
  18. */
  19. #ifndef ANTKEEPER_PHYSICS_GAS_OZONE_HPP
  20. #define ANTKEEPER_PHYSICS_GAS_OZONE_HPP
  21. namespace physics {
  22. namespace gas {
  23. /// Ozone-related constants and functions.
  24. namespace ozone {
  25. /**
  26. * Cross section of ozone at wavelength 680nm and temperature 293K, in m-2/molecule.
  27. *
  28. * @see https://www.iup.uni-bremen.de/gruppen/molspec/databases/referencespectra/o3spectra2011/index.html
  29. */
  30. template <class T>
  31. constexpr T cross_section_680nm_293k = T(1.36820899679147e-25);
  32. /**
  33. * Cross section of ozone at wavelength 550nm and temperature 293K, in m-2/molecule.
  34. *
  35. * @see https://www.iup.uni-bremen.de/gruppen/molspec/databases/referencespectra/o3spectra2011/index.html
  36. */
  37. template <class T>
  38. constexpr T cross_section_550nm_293k = T(3.31405330400124e-25);
  39. /**
  40. * Cross section of ozone at wavelength 550nm and temperature 293K, in m-2/molecule.
  41. *
  42. * @see https://www.iup.uni-bremen.de/gruppen/molspec/databases/referencespectra/o3spectra2011/index.html
  43. */
  44. template <class T>
  45. constexpr T cross_section_440nm_293k = T(1.36017282525383e-26);
  46. /**
  47. * Calculates an ozone absorption coefficient (wavelength-dependent).
  48. *
  49. * @param cross_section Ozone cross section of a wavelength, in m-2/molecule.
  50. * @param n Molecular number density of standard air, in molecules/m-3.
  51. * @param c Concentration of ozone in the atmosphere, unitless.
  52. *
  53. * @return Ozone absorption coefficient.
  54. *
  55. * @see https://skyrenderer.blogspot.com/2012/10/ozone-absorption.html
  56. */
  57. template <class T>
  58. T absorption(T cross_section, T n, T c)
  59. {
  60. return cross_section * n * c;
  61. }
  62. } // namespace ozone
  63. } // namespace gas
  64. } // namespace physics
  65. #endif // ANTKEEPER_PHYSICS_GAS_OZONE_HPP