Code_TYMPAN  4.4.0
Industrial site acoustic simulation
atmospheric_conditions.h
Go to the documentation of this file.
1 /*
2  * Copyright (C) <2012-2024> <EDF-DTG> <FRANCE>
3  * This file is part of Code_TYMPAN (R).
4  * Code_TYMPAN (R) is free software: you can redistribute it and/or modify
5  * it under the terms of the GNU General Public License as published by
6  * the Free Software Foundation, either version 3 of the License, or
7  * (at your option) any later version.
8  * Code_TYMPAN (R) is distributed in the hope that it will be useful,
9  * but WITHOUT ANY WARRANTY; without even the implied warranty of
10  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
11  * See the GNU General Public License for more details.
12  * You should have received a copy of the GNU General Public License along
13  * with Code_TYMPAN (R). If not, see <https://www.gnu.org/licenses/>.
14  */
15 
16 #ifndef TYMPAN_MODELS_COMMON_ATMOSPHERIC_CONDITIONS
17 #define TYMPAN_MODELS_COMMON_ATMOSPHERIC_CONDITIONS
18 
20 
23 
27 {
28 public:
30  AtmosphericConditions(double static_pressure_, double temperature_, double hygrometry_);
33 
39 
45 
48  {
49  return absorption_spectrum;
50  }
51 
54  {
56  }
57 
58  double compute_c() const;
59 
60  void compute_k();
61 
62  double compute_z();
63 
64  OSpectre compute_length_absorption(double length) const;
65 
66  OSpectreOctave compute_length_absorption_oct(double length) const;
67 
71  const OSpectre& get_k() const
72  {
73  return wave_number;
74  }
75 
80  double get_absorption_value(double freq)
81  {
82  return absorption_spectrum.getValueReal(freq);
83  }
84 
85 private:
86  double compute_hm() const;
87 
88 protected:
89  double static_pressure;
90  double temperature;
91  double hygrometry;
96 
97 public:
98  static const double Z_ref;
99 
100  static const double reference_pressure;
101  static const double reference_temperature;
102  static const double absolute_zero;
103 };
104 
105 #endif
Class for the definition of atmospheric conditions.
void compute_k()
compute wave number
double hygrometry
Hygrometry.
OSpectre compute_length_absorption(double length) const
static const double Z_ref
reference impedance
OSpectre get_absorption_spectrum() const
Get absorption spectrum.
double compute_z()
compute impedance
OSpectre absorption_spectrum
Absorption spectrum.
static const double absolute_zero
273.15 K
OSpectreOctave compute_length_absorption_oct(double length) const
AtmosphericConditions(double static_pressure_, double temperature_, double hygrometry_)
Constructor.
double static_pressure
Static pressure [Pa].
void compute_absorption_spectrum()
Compute absorption spectrum in dB/m.
OSpectreOctave absorption_spectrum_oct
const OSpectre & get_k() const
Get the wave number spectrum.
OSpectreOctave get_absorption_spectrum_oct() const
Get absorption spectrum for octave band computation.
static const double reference_temperature
Reference temperature [K].
OSpectre wave_number
Wave number spectrum.
static const double reference_pressure
Reference pressure [Pa].
double compute_hm() const
compute molar hygrometry coefficient
virtual ~AtmosphericConditions()
Destructor.
void compute_absorption_spectrum_oct()
Compute absorption spectrum in dB/m for octave band computation.
double get_absorption_value(double freq)
return absorption value at a given frequency
double temperature
Temperature [°C].
double compute_c() const
compute sound speed
double getValueReal(double freq)
Definition: spectre.cpp:974