Skip to content

holab.materials

This module provides a framework for representing acoustic materials used in simulations or experiments.

It includes classes that capture key physical properties of materials such as sound speed, density, and attenuation coefficient. Two main classes are provided: Material and its derived PowerLawAttenuation.

The module also comes with a pre-defined library of materials like Agilus30, VeroClear, and water.


agilus30 = PowerLawAttenuation('Agilus30', _vero_agiuls_paper, 2034.9, 1180.0, 9.109, y=1.017) module-attribute

Agilus30 material from Stratasys. The attenuation coefficient is measured from 1 to 3.5 MHz.

veroclear = PowerLawAttenuation('VeroClear', _vero_agiuls_paper, 2474.5, 1128.0, 3.696, y=0.9958) module-attribute

VeroClear material from Stratasys. The attenuation coefficient is measured from 1 to 3.5 MHz.

water = Material('water', '', 1480.0, 1000.0, 0.0) module-attribute

Water at 20°C. Note that the attenuation coefficient is 0.

Material

The generic interface for representing an acoustic material. The material is defined by its sound speed, density and attenuation coefficient.

Attributes:

Name Type Description
name str

The name of the material.

reference str

The bibliographic reference for the measured values.

sound_speed float

The sound speed of the material.

density float

The density of the material.

attenuation float

The attenuation coefficient of the material.

as_medium(domain, f0=1.0)

Returns the material as a jwave Medium object.

Parameters:

Name Type Description Default
domain Domain

The domain of the medium.

required
f0 float

The frequency at which the material is used. This is because the attenuation coefficient is frequency-dependent, and jwave uses a y=2 attenuation model (Stokes attenuation), so we need to make sure that the attenuation coefficient is correctly scaled for the frequency of interest.

1.0

Returns:

Name Type Description
Medium Medium

The material as a jwave Medium object.

PowerLawAttenuation

Bases: Material

A material with a power law attenuation coefficient.

__init__(name, reference, sound_speed, density, attenuation, y)

Initialize a material with a power law attenuation coefficient.

Parameters:

Name Type Description Default
name str

The name of the material.

required
reference str

The bibliographic reference for the measured values.

required
sound_speed float

The sound speed of the material in $m/s$.

required
density float

The density of the material in $kg/m^3$.

required
attenuation float

The attenuation coefficient of the material in $dB/cm/MHz$.

required
y float

The exponent of the power law.

required