Skip to content

Loudspeaker in a cabinet

Prerequisites: work through Bending of a cantilever beam first so you are comfortable with the Allsolve project layout (Geometry, Physics, Simulations, Results).

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.

Loudspeaker sound pressure field radiating into the surrounding air

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

Loudspeaker in a cabinet surrounded by a 1 m radius air bubble

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

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

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

    Imported loudspeaker driver CAD model

    Imported cabinet CAD model

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

  2. Build a sphere for the air bubble geometry:

    Name Element type Center point (m) Radius (m)
    sphere Sphere X: 0 1
    Y: 0.5
    Z: 0
  3. Build a box to cut the sphere in the correct YZ-plane:

    Name Element type Center point (m) Size (m) Rotation (deg)
    box Box X: 0.9975 X: 1 X: 0
    Y: 0 Y: 4 Y: 0
    Z: 0 Z: 4 Z: 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. Remove operation targeting the box, the air bubble segment below the loudspeaker and the cut-off cabinet sliver

    The air bubble and cabinet bottom surfaces should be level: Air bubble and cabinet bottom surfaces level with each other

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

Proceed to the Common sidebar.

  1. Define the following variables:

    Name Description Expression
    freq Frequency (Hz) 3e3
  2. Go to the Physics section.

  3. Define the model materials:

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

Assign the Aluminium material to the outer cabinet volumes.

Aluminium assigned to the outer cabinet volumes

Assign the Iron material to the magnet volume in the speaker driver.

Edit the iron material properties:

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

Iron material with permeability mu0 and speed of sound 5120

Assign the Copper material to the homogenized coil volume in the speaker driver.

Copper assigned to the homogenized coil volume

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.

Nylon assigned to the speaker spider volume

Assign the Carbon steel AISI 1020 material to the pole piece of the loudspeaker driver.

Carbon steel assigned to the driver pole piece

Your model materials are now defined.

Proceed 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.

  • As solid mechanics target, select all volumes except the air bubble.

  • Add Clamp.

    • As clamp target, select the cabinet bottom surface and the spider edge surface. Clamp target on the cabinet bottom surface Clamp target on the spider edge surface

  • Add Clamp 2.

    • As clamp 2 target, select the magnet and driver pole volumes. Second clamp target on the magnet and driver pole volumes
  • Add Magnetic force to couple Solid mechanics with Magnetism A.

  • As current flow target, select the coil volume. Current flow physics targeting the coil volume
  • Add Constraint.
    • As constraint target, select a point on the coil outer boundary.
    • Set constraint value to 0. Voltage constraint on a point of the coil outer boundary
  • Add Lump V/I cut.
    • As lump V/I target, select a curve on the coil outer boundary.
    • Set Current to 1 + sin(2*pi*freq*t) * 1e-3. Lump V/I cut driving current on a curve of the coil outer boundary
  • Let magnetism A target default to the whole geometry.
  • Add Magnetic wall.
    • As magnetic wall target, select all outer boundary surfaces of the model. Magnetic wall on all outer boundary surfaces of the model
  • Add Remanence, which is the permanent magnetic field strength applied on the magnet.
    • As Target, select the magnet volume.
    • Set Remanence (X; Y; Z) as [0; 0.7; 0]. Remanence of 0.7 T applied to the magnet volume
  • Add A-v coupling to couple Magnetism A with Current flow.
  • As acoustic waves target, select the air bubble volume.
  • Add Perfectly matched layer.
    • As Target, select the air bubble outer dome surface.
  • 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.

Physics tree with solid mechanics, current flow, magnetism A and acoustic waves

Go to the Simulations section and create a new mesh:

  1. Open the collapsible menu for Mesh element size.
  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:

Translucent view of the finished mesh

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.

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.

Pressure field animation with acoustic waves interpolated on a mannequin in front of the loudspeaker

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