Code_TYMPAN  4.4.0
Industrial site acoustic simulation
TYChemin9613Solver.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 __TY_CHEMIN_9613SOLVER__
17 #define __TY_CHEMIN_9613SOLVER__
18 
19 #include <deque>
24 
41 {
42  // Methods
43 public:
58  ~TYChemin9613Solver() override;
59 
63  bool operator==(const TYChemin9613Solver& other) const;
65  bool operator!=(const TYChemin9613Solver& other) const;
66 
82  void calcAttenuation(const TYTabEtape9613Solver& tabEtapes, const AtmosphericConditions& atmos,
83  double dp = 0.0, double hs = 0.0, double hr = 0.0, double Gs = 0.5, double Gm = 0.5,
84  double Gr = 0.5);
85 
98  const OPoint3D& O, double d_SO,
99  double d_OR, double a, double h,
100  const OVector3D& n) const;
101 
113  virtual void calcCylinderReflectionAttenuation(const OPoint3D& S, const OPoint3D& R, const OPoint3D& P,
114  const OPoint3D& M, double r, const OVector3D& axis);
115 
121 
133  void computeBarAttenuation(const OSpectreOctave& Dz, const bool vertical, const bool left);
134 
141 
146  void setAttenuation(const TYTypeAttenuation& type, const OSpectreOctave& att)
147  {
148  _attenuations[type] = att;
149  }
150 
155  void setAttenuationBarWhenNoPath(bool vertical, bool left);
156 
162  bool hasAttenuation(const TYTypeAttenuation type) const
163  {
164  return _attenuations.find(type) != _attenuations.end();
165  }
166 
167 protected:
179  const OSpectreOctave& Agr_r,
180  const OSpectreOctave& Agr_m, double hs, double hr,
181  double dp) const;
182 
183 private:
184  void calcGroundAttenuations(double distance, double hs, double hr, double Gs, double Gm, double Gr);
185  OSpectreOctave calcGroundAttenuationSR(double dp, double h, double G);
186  OSpectreOctave calcGroundAttenuationM(double q, double Gm);
187 
188 protected:
190  std::map<TYTypeAttenuation, OSpectreOctave> _attenuations;
191 };
192 
194 typedef std::deque<TYChemin9613Solver> TYTabChemin9613Solver;
195 
196 #endif // __TY_CHEMIN_9613SOLVER__
std::deque< TYChemin9613Solver > TYTabChemin9613Solver
TYChemin collection.
Representation of one of the most optimal path between source and receptor: S—>R.
TYTypeAttenuation
Definition: TYChemin.h:41
std::deque< TYEtape9613Solver > TYTabEtape9613Solver
TYEtape collection.
Class for the definition of atmospheric conditions.
The 3D point class.
Definition: 3d.h:487
The 3D vector class.
Definition: 3d.h:298
Representation of one of the most optimal path between source and receptor: S—>R. The class TYChemin ...
bool operator!=(const TYChemin9613Solver &other) const
Operator !=.
bool operator==(const TYChemin9613Solver &other) const
Operator ==.
OSpectreOctave calcGroundAttenuationM(double q, double Gm)
TYChemin9613Solver & operator=(const TYChemin9613Solver &other)
Operator =.
void calcGroundAttenuations(double distance, double hs, double hr, double Gs, double Gm, double Gr)
~TYChemin9613Solver() override
Destructor.
OSpectreOctave calcGroundAttenuationSR(double dp, double h, double G)
std::map< TYTypeAttenuation, OSpectreOctave > _attenuations
Attenuations spectra of the path.
void setMinimalExtensionConditionReflection(const OSpectreOctave &filter)
Set the minimal extension condition reflection.
void setAttenuationBarWhenNoPath(bool vertical, bool left)
Set attenuation bar to max to traduce the lack of diffracted ray on this path.
OSpectreOctave & getAttenuation(const TYTypeAttenuation type)
Return attenuation of the path of the type.
void calcAttenuation(const TYTabEtape9613Solver &tabEtapes, const AtmosphericConditions &atmos, double dp=0.0, double hs=0.0, double hr=0.0, double Gs=0.5, double Gm=0.5, double Gr=0.5)
Compute the global attenuation on the path.
virtual void calcCylinderReflectionAttenuation(const OPoint3D &S, const OPoint3D &R, const OPoint3D &P, const OPoint3D &M, double r, const OVector3D &axis)
Compute attenuation when a reflection occur on a cylinder Its value is 0 for 9613Solver.
virtual OSpectreOctave calcMinimalExtensionConditionOneReflection(const OPoint3D &Oprev, const OPoint3D &O, double d_SO, double d_OR, double a, double h, const OVector3D &n) const
Evaluate minimal extension condition for a specular reflection on a flat surface in function of the w...
void setAttenuation(const TYTypeAttenuation &type, const OSpectreOctave &att)
Set the atmospheric attenuation.
TYChemin9613Solver()
Constructor.
void computeBarAttenuation(const OSpectreOctave &Dz, const bool vertical, const bool left)
Compute barrier attenuation on the path. It implements recommendation 5.5 of 17534-3 standard,...
virtual OSpectreOctave calcTotalGroundAttenuation(const OSpectreOctave &Agr_s, const OSpectreOctave &Agr_r, const OSpectreOctave &Agr_m, double hs, double hr, double dp) const
Compute total ground attenuation Agr from region ground attenuations and geometric configuration.
bool hasAttenuation(const TYTypeAttenuation type) const
Check if the attenuation of the given type exists in the attenuations table.
Representation of one of the most optimal path between source and receptor: S—>R. The class TYChemin ...
Definition: TYChemin.h:67