Class Acoustics

java.lang.Object
org.episteme.natural.physics.classical.waves.acoustics.Acoustics

public class Acoustics extends Object
Acoustics equations - sound propagation, intensity, resonance.
Since:
1.0
Author:
Silvere Martin-Michiellot, Gemini AI (Google DeepMind)
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    static final Real
    Speed of sound in air at 20°C
    static final Real
    Speed of sound in water
  • Constructor Summary

    Constructors
    Constructor
    Description
     
  • Method Summary

    Modifier and Type
    Method
    Description
    static Real
    acousticImpedance(Real density, Real soundSpeed)
    Acoustic impedance: Z = ρv (density × sound speed)
    static Real
    beatFrequency(Real freq1, Real freq2)
    Beat frequency: f_beat = |f₁ - f₂|
    static Real
    closedPipeResonance(int harmonicNumber, Real soundSpeed, Real length)
    Resonance frequency of closed pipe: f_n = (2n-1)v/(4L)
    static Real
    dopplerFrequency(Real sourceFreq, Real soundSpeed, Real observerVelocity, Real sourceVelocity)
    Doppler effect: f' = f(v + v_observer)/(v - v_source)
    static int
    frequencyToMidi(Real frequency)
    Frequency to MIDI note number. n = 69 + 12 * logâ‚‚(f/440)
    static Real
    midiToFrequency(int midiNote)
    MIDI note number to frequency. f = 440 * 2^((n-69)/12)
    static Real
    openPipeResonance(int harmonicNumber, Real soundSpeed, Real length)
    Resonance frequency of open pipe: f_n = nv/(2L)
    static Real
    Pressure to decibels: L = 20 log₁₀(p/p₀) where p₀ = 2×10⁻⁵ Pa (reference pressure)
    static Real
    soundIntensity(Real power, Real distance)
    Sound intensity from power: I = P/(4πr²)
    static Real
    Sound intensity level (decibels): L = 10 log₁₀(I/I₀) where I₀ = 10⁻¹² W/m² (threshold of hearing)
    static Real
    speedOfSoundInAir(Real temperatureCelsius)
    Speed of sound in air: v ≈ 331 + 0.6T (m/s, T in °C)
    static Real
    Speed of sound in air (more accurate formula). v = 331.3 * sqrt(1 + T/273.15)

    Methods inherited from class Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Field Details

    • C_AIR_20C

      public static final Real C_AIR_20C
      Speed of sound in air at 20°C
    • C_WATER

      public static final Real C_WATER
      Speed of sound in water
  • Constructor Details

    • Acoustics

      public Acoustics()
  • Method Details

    • speedOfSoundInAir

      public static Real speedOfSoundInAir(Real temperatureCelsius)
      Speed of sound in air: v ≈ 331 + 0.6T (m/s, T in °C)
    • speedOfSoundInAirAccurate

      public static Real speedOfSoundInAirAccurate(Real tempCelsius)
      Speed of sound in air (more accurate formula). v = 331.3 * sqrt(1 + T/273.15)
    • soundIntensityLevel

      public static Real soundIntensityLevel(Real intensity)
      Sound intensity level (decibels): L = 10 log₁₀(I/I₀) where I₀ = 10⁻¹² W/m² (threshold of hearing)
    • pressureToDecibels

      public static Real pressureToDecibels(Real pressure)
      Pressure to decibels: L = 20 log₁₀(p/p₀) where p₀ = 2×10⁻⁵ Pa (reference pressure)
    • dopplerFrequency

      public static Real dopplerFrequency(Real sourceFreq, Real soundSpeed, Real observerVelocity, Real sourceVelocity)
      Doppler effect: f' = f(v + v_observer)/(v - v_source)
    • closedPipeResonance

      public static Real closedPipeResonance(int harmonicNumber, Real soundSpeed, Real length)
      Resonance frequency of closed pipe: f_n = (2n-1)v/(4L)
    • openPipeResonance

      public static Real openPipeResonance(int harmonicNumber, Real soundSpeed, Real length)
      Resonance frequency of open pipe: f_n = nv/(2L)
    • beatFrequency

      public static Real beatFrequency(Real freq1, Real freq2)
      Beat frequency: f_beat = |f₁ - f₂|
    • acousticImpedance

      public static Real acousticImpedance(Real density, Real soundSpeed)
      Acoustic impedance: Z = ρv (density × sound speed)
    • soundIntensity

      public static Real soundIntensity(Real power, Real distance)
      Sound intensity from power: I = P/(4πr²)
    • midiToFrequency

      public static Real midiToFrequency(int midiNote)
      MIDI note number to frequency. f = 440 * 2^((n-69)/12)
    • frequencyToMidi

      public static int frequencyToMidi(Real frequency)
      Frequency to MIDI note number. n = 69 + 12 * logâ‚‚(f/440)