Module: ISO_1996::Part_1_2016
- Includes:
- Constants
- Defined in:
- lib/iso_1996/part_1_2016.rb
Overview
ISO 1996-1:2016 Acoustics - Description, measurement and assessment of environmental noise - Part 1: Basic quantities and assessment procedures
Module implementing calculations defined in ISO 1996-1:2016
Defined Under Namespace
Modules: Constants
Class Method Summary collapse
-
.assessment_level(l_aeq_t, k_t, k_i) ⇒ Float
Calculate assessment level (L_r) as defined in Section 3.6.
-
.compliance_evaluation(assessment_level, noise_limit, measurement_uncertainty) ⇒ Boolean
Evaluate compliance with noise limits as defined in Section 9.2.
-
.day_evening_night_level(l_day, l_evening, l_night, day_duration: Constants::DAY_DURATION, evening_duration: Constants::EVENING_DURATION, night_duration: Constants::NIGHT_DURATION, evening_penalty: Constants::EVENING_PENALTY, night_penalty: Constants::NIGHT_PENALTY) ⇒ Float
Calculate day-evening-night level (L_den) as defined in Annex C.2.
-
.equivalent_continuous_sound_level(levels, measurement_time) ⇒ Float
Calculate equivalent continuous sound level (L_Aeq,T) as defined in Section 3.1.7.
-
.impulsive_adjustment_factor(is_audible: false, is_distinct: false) ⇒ Float
Determine impulsive adjustment factor (K_I) as defined in Annex D.4.
-
.peak_sound_pressure_level(p_c_max) ⇒ Float
Calculate peak sound pressure level (L_pC,peak) as defined in Section 3.1.10.
-
.sound_exposure_level(p_a) ⇒ Float
Calculate sound exposure level (L_AE) as defined in Section 3.1.8.
-
.sound_pressure_level(p) ⇒ Float
Calculate sound pressure level (L_p) as defined in Section 3.1.2.
-
.tonal_adjustment_factor(is_audible: false, is_prominent: false) ⇒ Float
Determine tonal adjustment factor (K_T) as defined in Annex D.3.
Class Method Details
.assessment_level(l_aeq_t, k_t, k_i) ⇒ Float
Calculate assessment level (L_r) as defined in Section 3.6
203 204 205 |
# File 'lib/iso_1996/part_1_2016.rb', line 203 def self.assessment_level(l_aeq_t, k_t, k_i) l_aeq_t + k_t + k_i end |
.compliance_evaluation(assessment_level, noise_limit, measurement_uncertainty) ⇒ Boolean
Returns true when assessment_level > noise_limit + measurement_uncertainty
Evaluate compliance with noise limits as defined in Section 9.2
217 218 219 |
# File 'lib/iso_1996/part_1_2016.rb', line 217 def self.compliance_evaluation(assessment_level, noise_limit, measurement_uncertainty) assessment_level > noise_limit + measurement_uncertainty end |
.day_evening_night_level(l_day, l_evening, l_night, day_duration: Constants::DAY_DURATION, evening_duration: Constants::EVENING_DURATION, night_duration: Constants::NIGHT_DURATION, evening_penalty: Constants::EVENING_PENALTY, night_penalty: Constants::NIGHT_PENALTY) ⇒ Float
Calculate day-evening-night level (L_den) as defined in Annex C.2
142 143 144 145 146 147 148 149 150 151 152 153 154 155 |
# File 'lib/iso_1996/part_1_2016.rb', line 142 def self.day_evening_night_level(l_day, l_evening, l_night, day_duration: Constants::DAY_DURATION, evening_duration: Constants::EVENING_DURATION, night_duration: Constants::NIGHT_DURATION, evening_penalty: Constants::EVENING_PENALTY, night_penalty: Constants::NIGHT_PENALTY) total_hours = day_duration + evening_duration + night_duration term_day = day_duration * 10 ** (l_day / 10.0) term_evening = evening_duration * 10 ** ((l_evening + evening_penalty) / 10.0) term_night = night_duration * 10 ** ((l_night + night_penalty) / 10.0) 10 * Math.log10((term_day + term_evening + term_night) / total_hours) end |
.equivalent_continuous_sound_level(levels, measurement_time) ⇒ Float
Calculate equivalent continuous sound level (L_Aeq,T) as defined in Section 3.1.7
104 105 106 107 108 109 110 |
# File 'lib/iso_1996/part_1_2016.rb', line 104 def self.equivalent_continuous_sound_level(levels, measurement_time) raise ArgumentError, "Measurement time must be positive" if measurement_time <= 0 return -Float::INFINITY if levels.empty? energy_sum = levels.sum { |l| 10 ** (l / 10.0) } 10 * Math.log10(energy_sum / measurement_time) end |
.impulsive_adjustment_factor(is_audible: false, is_distinct: false) ⇒ Float
According to Annex D.4: - Distinct impulsive sound: 6 dB - Clearly audible but not distinct: 3 dB - Not clearly audible: 0 dB
Determine impulsive adjustment factor (K_I) as defined in Annex D.4
187 188 189 190 191 |
# File 'lib/iso_1996/part_1_2016.rb', line 187 def self.impulsive_adjustment_factor(is_audible: false, is_distinct: false) return 0.0 unless is_audible return 6.0 if is_distinct 3.0 end |
.peak_sound_pressure_level(p_c_max) ⇒ Float
Calculate peak sound pressure level (L_pC,peak) as defined in Section 3.1.10
120 121 122 |
# File 'lib/iso_1996/part_1_2016.rb', line 120 def self.peak_sound_pressure_level(p_c_max) 20 * Math.log10(p_c_max / Constants::REFERENCE_SOUND_PRESSURE) end |
.sound_exposure_level(p_a) ⇒ Float
This method assumes a single value for simplicity. For time-varying signals, integration over time is required.
Calculate sound exposure level (L_AE) as defined in Section 3.1.8
86 87 88 |
# File 'lib/iso_1996/part_1_2016.rb', line 86 def self.sound_exposure_level(p_a) 10 * Math.log10((1.0 / Constants::REFERENCE_TIME) * (p_a ** 2) / (Constants::REFERENCE_SOUND_PRESSURE ** 2)) end |
.sound_pressure_level(p) ⇒ Float
Calculate sound pressure level (L_p) as defined in Section 3.1.2
71 72 73 |
# File 'lib/iso_1996/part_1_2016.rb', line 71 def self.sound_pressure_level(p) 10 * Math.log10((p ** 2) / (Constants::REFERENCE_SOUND_PRESSURE ** 2)) end |
.tonal_adjustment_factor(is_audible: false, is_prominent: false) ⇒ Float
According to Annex D.3: - Prominent tone: 6 dB - Clearly audible but not prominent: 3 dB - Not clearly audible: 0 dB
Determine tonal adjustment factor (K_T) as defined in Annex D.3
169 170 171 172 173 |
# File 'lib/iso_1996/part_1_2016.rb', line 169 def self.tonal_adjustment_factor(is_audible: false, is_prominent: false) return 0.0 unless is_audible return 6.0 if is_prominent 3.0 end |