brimfile.physics

 1from math import sin, radians, pi
 2# refractive index of water (dimensionless)
 3refractive_index_water = 1.333
 4
 5def Brillouin_shift_water(wavelength_nm: float, temperature_C: float, scattering_angle_deg: float) -> float:
 6    """
 7    Calculate the Brillouin shift for water at a given temperature and wavelength.
 8
 9    Args:
10        wavelength (float): Wavelength in nanometers.
11        temperature (float): Temperature in degrees Celsius. Valid range 20 to 40 °C.
12        scattering_angle (float): Scattering angle in degrees.
13    Returns:
14        float: Brillouin shift in GHz.
15    """
16    
17    # Speed of sound in water as a function of temperature (in m/s)
18    # obtained by fitting a 4th-order polynomial to experimental data from Supplementary Table 1 of https://doi.org/10.1038/s41566-025-01681-6
19    # while assuming a constant refractive index of 1.333 across the temperature range of 20 to 40 °C
20    speed_of_sound = 1485.115245 - 6.273078 * temperature_C + 5.308978e-1 * temperature_C**2 + \
21                        -1.319485681e-2 * temperature_C**3 + 1.12602896e-4 * temperature_C**4
22    # Brillouin shift calculation (in GHz)
23    shift_ghz = 2 * speed_of_sound * refractive_index_water * sin(radians(scattering_angle_deg/2)) / wavelength_nm
24    return shift_ghz
25
26def Brillouin_width_water(wavelength_nm: float, temperature_C: float, scattering_angle_deg: float) -> float:
27    """
28    Calculate the Brillouin width for water at a given temperature and wavelength.
29
30    Args:
31        wavelength (float): Wavelength in nanometers.
32        temperature (float): Temperature in degrees Celsius. Valid range 20 to 40 °C.
33        scattering_angle (float): Scattering angle in degrees.
34    Returns:
35        float: Brillouin width in GHz.
36    """
37    
38    # Longitudinal viscosity in water as a function of temperature (in mm^2/s)
39    # obtained by fitting a 5th-order polynomial to experimental data from Supplementary Table 1 of https://doi.org/10.1038/s41566-025-01681-6
40    # while assuming a constant refractive index of 1.333 across the temperature range of 20 to 40 °C
41    longitudinal_viscosity = -49.087245994 + 9.27181683 * temperature_C + -0.655137659 * temperature_C**2 + \
42                        2.264061633e-002 * temperature_C**3  - 3.84984120021e-004* temperature_C**4 + \
43                        2.5816236806198040e-006 * temperature_C**5 
44    # Brillouin width calculation (in GHz)
45    width_ghz = 8e3 * pi * refractive_index_water**2 * longitudinal_viscosity * \
46                    (sin(radians(scattering_angle_deg/2)))**2 / (wavelength_nm)**2
47    return width_ghz
refractive_index_water = 1.333
def Brillouin_shift_water( wavelength_nm: float, temperature_C: float, scattering_angle_deg: float) -> float:
 6def Brillouin_shift_water(wavelength_nm: float, temperature_C: float, scattering_angle_deg: float) -> float:
 7    """
 8    Calculate the Brillouin shift for water at a given temperature and wavelength.
 9
10    Args:
11        wavelength (float): Wavelength in nanometers.
12        temperature (float): Temperature in degrees Celsius. Valid range 20 to 40 °C.
13        scattering_angle (float): Scattering angle in degrees.
14    Returns:
15        float: Brillouin shift in GHz.
16    """
17    
18    # Speed of sound in water as a function of temperature (in m/s)
19    # obtained by fitting a 4th-order polynomial to experimental data from Supplementary Table 1 of https://doi.org/10.1038/s41566-025-01681-6
20    # while assuming a constant refractive index of 1.333 across the temperature range of 20 to 40 °C
21    speed_of_sound = 1485.115245 - 6.273078 * temperature_C + 5.308978e-1 * temperature_C**2 + \
22                        -1.319485681e-2 * temperature_C**3 + 1.12602896e-4 * temperature_C**4
23    # Brillouin shift calculation (in GHz)
24    shift_ghz = 2 * speed_of_sound * refractive_index_water * sin(radians(scattering_angle_deg/2)) / wavelength_nm
25    return shift_ghz

Calculate the Brillouin shift for water at a given temperature and wavelength.

Args: wavelength (float): Wavelength in nanometers. temperature (float): Temperature in degrees Celsius. Valid range 20 to 40 °C. scattering_angle (float): Scattering angle in degrees. Returns: float: Brillouin shift in GHz.

def Brillouin_width_water( wavelength_nm: float, temperature_C: float, scattering_angle_deg: float) -> float:
27def Brillouin_width_water(wavelength_nm: float, temperature_C: float, scattering_angle_deg: float) -> float:
28    """
29    Calculate the Brillouin width for water at a given temperature and wavelength.
30
31    Args:
32        wavelength (float): Wavelength in nanometers.
33        temperature (float): Temperature in degrees Celsius. Valid range 20 to 40 °C.
34        scattering_angle (float): Scattering angle in degrees.
35    Returns:
36        float: Brillouin width in GHz.
37    """
38    
39    # Longitudinal viscosity in water as a function of temperature (in mm^2/s)
40    # obtained by fitting a 5th-order polynomial to experimental data from Supplementary Table 1 of https://doi.org/10.1038/s41566-025-01681-6
41    # while assuming a constant refractive index of 1.333 across the temperature range of 20 to 40 °C
42    longitudinal_viscosity = -49.087245994 + 9.27181683 * temperature_C + -0.655137659 * temperature_C**2 + \
43                        2.264061633e-002 * temperature_C**3  - 3.84984120021e-004* temperature_C**4 + \
44                        2.5816236806198040e-006 * temperature_C**5 
45    # Brillouin width calculation (in GHz)
46    width_ghz = 8e3 * pi * refractive_index_water**2 * longitudinal_viscosity * \
47                    (sin(radians(scattering_angle_deg/2)))**2 / (wavelength_nm)**2
48    return width_ghz

Calculate the Brillouin width for water at a given temperature and wavelength.

Args: wavelength (float): Wavelength in nanometers. temperature (float): Temperature in degrees Celsius. Valid range 20 to 40 °C. scattering_angle (float): Scattering angle in degrees. Returns: float: Brillouin width in GHz.