Skip to content

Acoustics 001 - Loudspeaker in a cabinet

In this example case, a loudspeaker in a cabinet is simulated.

Loudspeakers are ubiquitous in today’s world. From the compact earbuds that accompany our daily commute to the massive concert sound systems that fill stadiums with music, loudspeakers are essential for delivering audio in various applications.

Simulating sound waves emanating from speaker systems is critical for several reasons. It provides engineers with a valuable tool to:

  • Optimize Sound Quality: By understanding how sound waves interact with the speaker’s enclosure and the surrounding environment, engineers can design loudspeaker cabinets that minimize unwanted resonances and distortions, resulting in a cleaner and more accurate sound reproduction.
  • Predict Performance: Simulations allow engineers to predict how a loudspeaker will perform in various acoustic settings before physically building the system. This helps identify potential issues and optimize the loudspeaker’s design for its intended use.
  • Evaluate New Technologies: Simulations enable engineers to evaluate new materials, speaker designs, and enclosure configurations without the need for expensive and time-consuming prototyping. This accelerates the development of innovative loudspeaker technologies.
  • Reduce Development Costs: By minimizing the need for physical prototypes and testing, simulations help reduce development costs and time-to-market for new loudspeaker products.

Example image

The loudspeaker model used in this example is built in a cabinet, surrounded by an air bubble with a radius of 1 m.

Demo project: LoudspeakerWithCabinet

Example image

The results of this example were also covered in a Quanscient webinar by Dr. Deshmukh 1.

Simulation setup guide

Here you’ll find a simplified, example case level guide for setting up a loudspeaker simulation.

Step 1 - Build the geometry

  1. In the Model section, start off by importing CAD files for your loudspeaker and cabinet.

    Example image

    Example image

    To try out the .step files used in this example, download them here:

  2. Build a sphere for the air bubble geometry:

    NameElement typeCenter point (m)Radius (m)
    sphereSphereX: 01
    Y: 0.5
    Z: 0
  3. Build a box to cut the sphere in the correct YZ-plane:

    NameElement typeCenter point (m)Size (m)Rotation (deg)
    boxBoxX: 0.9975X: 1X: 0
    Y: 0Y: 4Y: 0
    Z: 0Z: 4Z: 0
  4. Apply the fragment all operation.

  5. Apply the remove operation. As target, select the box, the air bubble segment hanging below the loudspeaker, and the thin sliver of loudspeaker cabinet that was cut off by the box. Example image

    The air bubble and cabinet bottom surfaces should be level: Example image

The model geometry is now finished. Confirm model changes before moving on.

Step 2 - Define shared expressions and materials

Proceed to the Properties section.

  1. Define the following shared expression:

    NameDescriptionExpression
    freqFrequency (Hz)3e3
  2. Define the model materials:

Material 1 - Air

Assign the Air material to the air bubble volume. Hide the air bubble.

Material 2 - Aluminium

Assign the Aluminium material to the outer cabinet volumes (here 2 - 5, 11, 12).

Example image

Material 3 - Iron

Assign the Iron material to the magnet volume in the speaker driver (here 7).

Edit the iron material properties:

  • Change Magnetic permeability to mu0.
  • Add Speed of sound with value 5120.

Example image

Material 4 - Copper

Assign the Copper material to the homogenized coil volume in the speaker driver (here 9).

Example image

Material 5 - Nylon

Create a new material, Nylon:

  • Description
    • Appendix H: Ceramic and Polymer Materials, Table H.2
  • Color
    • Turquoise
  • Material properties
    • Density: 1150
    • Elasticity matrix:
      • Poisson’s ratio: 0.4
      • Young’s modulus: 3.5e9
    • Electric permittivity: 4.5*epsilon0
    • Magnetic permeability: mu0

Assign your finished Nylon material to the speaker spider volume (here 1).

Example image

Material 6 - Carbon steel

Assign the Carbon steel AISI 1020 material to the pole piece of the loudspeaker driver (here volumes 6, 8).

Example image

Your model materials are now defined.

Step 3 - Define the physics

Go to the Physics section to define the physics.

In this example, the Solid mechanics, Current flow, Magnetism A and Acoustic waves physics are required. Add all of them under Physics first, and after that, move on to setting up interactions for each physics as below.

Physics 1 - Solid mechanics

  • As solid mechanics target, select all volumes except the air bubble (1 - 9, 11, 12).

  • Add Clamp.

    • As clamp target, select the cabinet bottom surface (76) and the spider edge surface (112). Example image Example image

  • Add Clamp 2.

    • As clamp 2 target, select the magnet and driver pole volumes (6 - 8). Example image
  • Add Magnetic force to couple Solid mechanics with Magnetism A.

Physics 2 - Current flow

  • As current flow target, select the coil volume (9). Example image
  • Add Constraint.
    • As constraint target, select a point on the coil outer boundary (68).
    • Set constraint value to 0. Example image
  • Add Lump V/I cut.
    • As lump V/I target, select a curve on the coil outer boundary (119).
    • Set Current to 1 + sin(2*pi*freq*t) * 1e-3. Example image

Physics 3 - Magnetism A

  • Let magnetism A target default to the whole geometry.
  • Add Magnetic wall.
    • As magnetic wall target, select all outer boundary surfaces of the model (76, 94, 95). Example image
  • Add Remanence, which is the permanent magnetic field strength applied on the magnet.
    • As Target, select the magnet volume (7).
    • Set Remanence (X; Y; Z) as [0; 0.7; 0]. Example image
  • Add A-v coupling to couple Magnetism A with Current flow.

Physics 4 - Acoustic waves

  • As acoustic waves target, select the air bubble volume (14).
  • Add Perfectly matched layer.
    • As Target, select the air bubble outer dome surface (94).
  • Add Acoustic structure to couple Acoustic waves with Solid mechanics.

Your simulation physics are now defined, and your physics tree should contain all physics as in the image below.

Example image

Step 4 - Generate the mesh

Proceed to the Simulations section and create a new mesh:

  1. Set Mesh quality to Expert settings.
  2. Set Max size to 0.05.
  3. Set Scale factor to 0.5.
  4. Apply the settings & mesh.

In translucent mode, your mesh should look something like in the image below:

Example image

Step 5 - Simulate

In the Simulations section, create a new simulation:

  • In Simulation settings:
    • Set Analysis type to Multiharmonic.
    • Set Fundamental frequency to 3e3.
    • Set Harmonics to 1 2 3.
    • Set Solver mode to Iterative solver.
  • In Mesh, select the mesh you created.
  • In Inputs:
    • Add freq sweep.
      • Set Override expression to [100, 500, 1e3, 3e3, 5e3, 8e3, 10e3, 15e3, 20e3].
  • In Outputs:
    • Add the p, B and u harmonic field outputs.
    • Add a custom value output called SPL.
      • Set Output expression to integrate(reg.air_target, p, 3).

Run the simulation and plot/visualize results.

Results

Here, the pressure field p is visualized. A roughly human-sized mannequin is added in front of the loudspeaker to visualize acoustic waves interpolated on the surface of the body.

Example image

Footnotes

  1. Dr. Abhishek Deshmukh. Acoustics simulations powered by the cloud. Quanscient webinars (2024). https://quanscient.com/events/acoustics-webinar/register ↩