Simulating a folded tapped horn in AkAbak 3: from STEP to a full BEM model
By Adrian · · 16 min read
This post simulates a 450 L, three-leg tapped horn with two PRV Audio 12W1600 drivers, tuned to 25 Hz and folded into a cabinet 1520 mm long, 710 mm wide and 608 mm tall.
Hornresp is where this design started, and it's still the fastest way to tune a horn. But Hornresp treats the horn as a one-dimensional duct. It can't see the folds, the tight turns, the two drivers sitting side by side, or the mouth sitting on the floor. AkAbak's boundary element method (BEM) solves the real 3D shape. The price is setup time and solve time.
This post walks through the whole pipeline with the real files: CAD to STEP, STEP to a Gmsh mesh, and the mesh into AkAbak.
What you need
- AkAbak 3. This model was built in version 3.2.4.
- Gmsh 4 (free, gmsh.info).
The files for this cabinet: the STEP, the Gmsh script (.geo), the finished mesh (.msh) and the Hornresp record we compare against. They're in the downloads at the end.

The four stages, from CAD model to solved simulation.
1. Model the air, not the wood
BEM only meshes surfaces. What AkAbak needs is the boundary of each region of air, so the CAD model to export is the air inside the cabinet, not the panels.
The air is split along the sound path into five bodies:
- Leg 1, from the closed end to the first turn. The back of each cone (the magnet side) faces into it.
- Turn 1, the first fold at the front.
- Leg 2, the sloped middle channel. The front of each cone faces into it.
- Turn 2, the fold at the back.
- Leg 3, the bottom channel that ends at the mouth.
A sixth body is the cabinet itself: all the wood as one solid. Its outer faces become the outside skin that radiates into the room.

Half the cabinet's air in Gmsh, with the outside skin and side walls hidden. Each colour is one air body; the red faces are interfaces.
A few rules make the model work:
- Interfaces have no thickness. Where two air bodies meet, the shared face is the interface. Don't model it as a 1 mm plate: that gives two faces 1 mm apart, and AkAbak's help warns that thin shapes like that need a very fine mesh or the results go wrong. In Onshape, the Split feature makes these zero-thickness faces.
- No holes for the drivers. Leave the divider solid, and split a circle the size of the cone's effective area (Sd) on each side of it. For the 12W1600, Sd is 594 cm², a circle of 275 mm. The circle on the Leg 1 side is the cone's rear; the one on the Leg 2 side is its front. The magnet is left out.
- One subdomain per leg and turn. The dividers are 25 mm thick. If one air body wrapped around a divider, both of its faces would be in the same domain, 25 mm apart, and the BEM can only tell them apart when the triangles are smaller than about 1.7 times that gap. That's around 40 mm on every divider face: roughly 2,500 triangles on the dividers alone, more than the whole mesh used here. In separate subdomains the two faces never see each other, so a coarse mesh is fine. AkAbak's help notes that the subdomain method is exact; it adds no approximation.
- Model half and let AkAbak mirror it. The cabinet is symmetric about its mid-width, and the two drivers sit side by side across the width. So only one half is modelled: one driver, and no faces at all on the mid-width plane. AkAbak mirrors the half back into the full cabinet, and the solve gets a lot faster: for one mirror plane, AkAbak's help says the system matrix shrinks to a quarter.
- Put the origin where AkAbak wants it. The mid-width plane is z = 0, so the mirror needs no shift. The floor (the bottom panel's outside face) is x = 0, with the cabinet at negative x, so the floor can be an infinite baffle at x = 0.

The outside skin. The mouth (red) is cut into the front face; the face on the floor and the face on the mid-width plane are left out.
2. Gmsh: group the faces and mesh
AkAbak reads meshes in Gmsh's .msh format, so Gmsh (free) sits between the CAD model and AkAbak. It has three jobs: make each shared face exist only once, sort the faces into named groups that AkAbak can pick from, and mesh them.
- File > Open the STEP.
- Join the shared faces. Every interface belongs to two bodies, so it arrives from the STEP twice, once with each body. Run Modules > Geometry > Elementary entities > Boolean > Fragments on all the bodies; Gmsh tells you at the top of the window what to select next. Afterwards each interface is a single face, so the subdomains on both sides of it share exactly the same triangles.
- Name the face groups under Modules > Geometry > Physical groups > Add > Surface, one group for each job a face does in AkAbak. This cabinet has 13: the walls of each air body (five groups), the outside walls, the two cone faces and the five interfaces. Name each interface after the body its normals point into first: IF Leg1-Turn1 points into Leg 1, and Leg 1 will be its Subdomain 1. Faces on the mid-width plane and on the floor go in no group.
- Set the mesh size under Tools > Options > Mesh: a maximum element size of 150 mm. Keep it coarse on purpose. AkAbak can refine a mesh but can't coarsen one, and the narrow parts get refined in AkAbak later. Round edges need enough segments: the cone circles here have 36, which keeps their area within 0.5% of Sd.
- Modules > Mesh > 2D.
- File > Export, choose the
.mshtype and save. In the options box, pick Version 2 ASCII and leave Save all elements unticked. Then only the named groups are saved, and the faces that are in no group (the mid-width plane and the floor) drop out by themselves.

Gmsh's export options: Version 2 ASCII, Save all elements unticked.
Normals. Every face has a front and a back, and AkAbak needs them the right way round. Walls and cones point into their own air body, the outside walls point out into the room, and each interface points into the body that will be its Subdomain 1. Gmsh has no way of knowing which side of a face is air, so whatever the CAD exported comes through. You don't have to fix them in Gmsh: AkAbak can show and flip them, which section 5 covers.
The mesh in the downloads has all of this done, normals included. It comes to 1,655 triangles and 863 nodes. We checked it before going further: each air body is closed apart from the mid-width plane (and the floor, for the outside), and there are no duplicate nodes, so the interfaces join both sides exactly.

The 13 mesh groups, seen through from the mid-width side. Outside walls are drawn as outlines only.
3. AkAbak: import the mesh
Start a new project. On the General page, add a Mesh-File object (Edit > New Component, or Ctrl+N).
- File page: Open the
.msh. The report should say GMSH, 3D, 863 nodes and 1,655 shapes. The size it reports comes out in kilometres, because the mesh is in millimetres and AkAbak reads it as metres. - Scaling page: set Scaling isotropic to 0.001 to turn millimetres into metres. No shift or rotation is needed, because the origin is already on the mid-width plane and the floor.
- Drawing page: the Tags tab lists what the mesh contains. With Filter of list-box Type set to Physical you see the 13 named groups; with Elementary you see Gmsh's face numbers instead. Every boundary component later picks its triangles from this list.

The Mesh-File report after opening the .msh.

Scaling isotropic = 0.001: the mesh is in millimetres.

The 13 named groups on the Mesh-File's Tags tab, with the list filtered by Physical.
4. Global settings
- Global > Dim, Sym and BEM: Dimension 3D, Symmetry z. AkAbak names a mirror plane by its normal, so "z" means the plane z = 0. Non-uniqueness compensation (NUC) can be switched off to save time; AkAbak's help says it matters mostly at high frequencies and can usually be left off for woofers. Leave it on if you have time to spare.
- Global > Frequencies: for example 10 to 250 Hz, logarithmic, 12 points per octave (about 56 frequencies). The BEM solve time scales with the number of frequencies, so time a single frequency first and multiply. Don't leave it at a full-range sweep to 20 kHz: this mesh is only good to about 1 kHz, and every frequency above that costs a full solve for nothing.
- Global > Meshing: this project leaves the global Edge Length at 0 (not set), so anywhere without its own value AkAbak uses the 150 mm triangles from Gmsh as they are. AkAbak rates a mesh as useful up to c / (2 × Edge Length), about 1.1 kHz at 150 mm, far above where this sub works.
- Global > Level of Driving: 2.83 V.

Dim, Sym and BEM: 3D, Symmetry = z.
5. AkAbak: the BEM page
The BEM page has two levels: Subdomains and Interfaces at the top, and boundary components (here, Elements (Mesh-File)) underneath them. A new boundary component goes under whichever subdomain or interface is selected when you create it.
Subdomains (6)
| Subdomain | Type |
|---|---|
| Leg1, Turn1, Leg2, Turn2, Leg3 | Interior |
| Outside | Exterior, with the Infinite Baffle |
Infinite Baffle. Select the Outside subdomain and add an Infinite Baffle; it sits inside Outside in the tree. On its Position page set the direction to -x: the plane is x = 0 (the floor) and its normal must point into the half space where the sound goes, which is where the cabinet is.
Elements (13). One Elements (Mesh-File) component per mesh group. On each component's Drawing page, open Tags and move its faces into the include list as (+). You can pick by group name (filter the list by Physical) or by Gmsh face number (filter by Elementary). This project picks by face number; just don't mix the two up, because group numbers 1 to 13 overlap with face numbers.
| Group | Gmsh face numbers |
|---|---|
| Leg1 walls | 1, 3, 5, 7 |
| Cone rear - Leg1 | 4 |
| Turn1 walls | 8, 9, 10, 12, 14 |
| Leg2 walls | 15, 17, 20 |
| Cone front - Leg2 | 16 |
| Turn2 walls | 21, 22, 23, 25, 27 |
| Leg3 walls | 28, 29, 31, 33 |
| Outside walls | 34, 35, 36, 37 |
| IF Leg1-Turn1 | 2 |
| IF Turn1-Leg2 | 11 |
| IF Leg2-Turn2 | 18 |
| IF Turn2-Leg3 | 24 |
| IF Leg3-Outside (mouth) | 30 |
| Elements component | Goes under | Mesh group | Boundary type |
|---|---|---|---|
| Leg1 walls | Leg1 | Leg1 walls | Neumann |
| Cone Rear | Leg1 | Cone rear - Leg1 | Driven |
| Turn1 walls | Turn1 | Turn1 walls | Neumann |
| Leg2 walls | Leg2 | Leg2 walls | Neumann |
| Cone Front | Leg2 | Cone front - Leg2 | Driven |
| Turn2 walls | Turn2 | Turn2 walls | Neumann |
| Leg3 walls | Leg3 | Leg3 walls | Neumann |
| Outside walls | Outside | Outside walls | Neumann |
| IF Leg1-Turn1 | Interface Leg1Turn1 | IF Leg1-Turn1 | (ignored) |
| IF Turn1-Leg2 | Interface Turn1Leg2 | IF Turn1-Leg2 | (ignored) |
| IF Leg2-Turn2 | Interface Leg2Turn2 | IF Leg2-Turn2 | (ignored) |
| IF Turn2-Leg3 | Interface Turn2Leg3 | IF Turn2-Leg3 | (ignored) |
| Mouth | Interface Mouth | IF Leg3-Outside (mouth) | (ignored) |
Neumann is a rigid wall, AkAbak's default. Driven makes the face vibrate; the LE driver will move it. Boundary types on interface components are ignored, because an interface is acoustically transparent. With the mesh from the downloads, leave Swap Normals off everywhere: its normals are already right. With your own mesh, turn on Views > Structure > Normals to see them, and tick Swap Normals on any component whose normals point the wrong way (the rule is in section 2).

The BEM tree with Leg1 and Outside expanded. Leg1 holds its walls (Elements7) and Cone Rear, both at 40 mm; Outside holds its walls and the Infinite Baffle.

The Leg1 walls component: Gmsh faces 1, 3, 5 and 7 in the include list, picked by Elementary number.

Cone Front's Boundaries page: Driven, normal to the surface. The green field is the drive-group number AkAbak assigned to it.
Interfaces (5). On each interface's Parameters page, the order of the two subdomains matters. Subdomain 1 must be the one its normals point into, which is the first body in the group's name. If you get it backwards, the field plot shows a strange, non-physical pressure pattern; Swap flips it.
| Interface | Subdomain 1 | Subdomain 2 |
|---|---|---|
| Leg1Turn1 | Leg1 | Turn1 |
| Turn1Leg2 | Turn1 | Leg2 |
| Leg2Turn2 | Leg2 | Turn2 |
| Turn2Leg3 | Turn2 | Leg3 |
| Mouth | Leg3 | Outside |

The Mouth interface: Subdomain 1 = Leg3, Subdomain 2 = Outside.
Finer mesh where the channel is narrow. Leg 1 narrows from 145 mm at the closed end to 46 mm where it meets Turn 1, and the gap at Turn 1, between the divider's tip and the front panel, is about 45 mm. The same thin-shape rule applies inside a channel: triangles on opposite walls must be small enough not to "see" each other. On the Meshing page of these four, type Edge Length = 40 mm (the field turns white when it overrides the inherited value):
- the Leg1 and Turn1 subdomains (their Elements inherit it);
- the Leg1Turn1 and Turn1Leg2 interfaces. AkAbak's help notes that interfaces are more sensitive to mesh density, and these two only have 12 triangles each as imported.
Everything else keeps Gmsh's 150 mm triangles.

Leg1's Meshing page: Edge Length 40 mm by value, which AkAbak rates to 4.3 kHz.
Check what closes each subdomain. Every interior subdomain must be a closed volume once its interfaces are counted (the mid-width plane is closed by the mirror):
- Leg1: its walls, Cone Rear, IF Leg1-Turn1.
- Turn1: its walls, IF Leg1-Turn1, IF Turn1-Leg2.
- Leg2: its walls, Cone Front, IF Turn1-Leg2, IF Leg2-Turn2.
- Turn2: its walls, IF Leg2-Turn2, IF Turn2-Leg3.
- Leg3: its walls, IF Turn2-Leg3, the mouth.
- Outside: its walls and the mouth. The floor is the infinite baffle.

The whole model in AkAbak's 3D view, with the mirrored half and the infinite baffle shown.
6. AkAbak: the driver (LE page)
The lumped-element network is small: a voltage Source, an Elec-Dyn Driver, and one Radiator on each side of the diaphragm.
- Source (S1): Domain Electric, Potential source.
- Elec-Dyn Driver (Dyn1): Diaph front = Cone Front, Diaph rear = Cone Rear. Select it in the schematic and its parameters appear in the table on the left.
- Radiators: Application = BEM Boundaries. One links to Cone Front, the other to Cone Rear. This is what couples the driver to the BEM model: the BEM supplies the radiation and box loading, the network supplies the motor.

The LE schematic: source S1, driver Dyn1 and the two radiators, Front Cone and Cone Rear.
Mass without air load. Enter Mms as the moving mass without air load (Hornresp calls it Mmd). AkAbak's help says Mms is the mass measured in vacuum, because the BEM supplies the air load. Datasheet Mms already includes air load, so using it would count that mass twice.
The symmetry catch: one driver, two diaphragms
Mirroring the half cabinet also mirrors the cone. AkAbak's help covers exactly this case, two drivers side by side with the mirror plane between them, and labels it "Symmetry wrong": you end up with a single driver with two diaphragms. One motor would have to push two cones' worth of air load, which is not what happens in the real cabinet.
You can see it in AkAbak itself. Select the driver and look at the info box under its parameter table: in our first setup it read SD = 0.1182 m². That's 1182 cm², two of the 591 cm² cone faces, for a driver whose real Sd is 594 cm².

Our first setup: one driver's values (and the datasheet Mms, which already includes air load), with SD = 0.1182 m² in the info box.
Because the two real drivers are identical, wired in parallel and moving together, there's a simple way out: give that one LE driver the values of the two drivers in parallel. Compared with one driver, that's half the resistance and inductance, the same Bl, twice the mass and damping, and twice the stiffness:
| One 12W1600 | Pair in parallel (enter this) | |
|---|---|---|
| Re | 5.10 Ω | 2.55 Ω |
| Le | 1.26 mH | 0.63 mH |
| Bl | 20.35 N/A | 20.35 N/A |
| Mms (no air load) | 84.45 g | 168.9 g |
| Kms (= 1/Cms) | 10.47 N/mm | 20.94 N/mm |
| Rms | 2.17 N·s/m | 4.34 N·s/m |
If you enter the driver by fs, Qms and Qes instead, those three stay the same; only Mms doubles and Re and Le halve.
In AkAbak, edit Mms, Kms, Rms and Re one at a time (double-click each row). Each editor shows which value it recalculates: Mms and Kms update fs, Re updates Qes. Then check fs reads about 56.0 Hz, Qms 13.7 and Qes 0.366. Le is inside the VC row; with AkAbak's own voice-coil model, halve Le and leave the exponents alone.
With these values the source sees the impedance of the parallel pair, the cone excursion is each driver's own excursion, and the SPL is the whole cabinet at 2.83 V across both drivers. That's the same setup as the Hornresp record we compare against (two drivers in parallel, 2.83 V, half space).
The info box still says SD = 0.1182 m² afterwards, and that's expected: the two diaphragms are still there. What changed is that the motor driving them now has the strength of two. AkAbak also rates the driver as 4 Ω now, the impedance of the pair.
You don't need to re-solve to try this. AkAbak solves the BEM once for each vibrating face and keeps those solutions apart ("superposition"), so a change on the LE page only needs the observations recalculated. If you already ran with single-driver values, change them and recalculate the spectra.

After the fix: the parallel pair, with Mms without air load. fs 56.0 Hz, Qms 13.7, Qes 0.366, rated 4 Ω.
7. Observations
- Microphone Curve (point): on its Position page this project uses Distance 2000 mm in the yz plane at 0° rotation. That puts the mic on the floor on the centre line, 2 m from the origin along +y: about 0.94 m in front of the mouth. That's close enough to Hornresp's 1 m; the shorter distance reads about 0.5 dB higher. On its Driving page, tick both cone faces for Curve 1.
- Network Inspection: the Source's Zin gives the impedance; the driver's Excursion gives cone travel.
- Field (optional): this project has a Mic Field (shell) observation for pressure plots. A vertical plane through the middle of the cabinet (z = 0) that reaches out past the mouth shows the pressure inside the folds and in the room. Fields cost extra time per frequency, so keep their Edge Length coarse (50 to 100 mm) and look at only a few frequencies.

The microphone's position: 2000 mm in the yz plane, which lands on the floor in front of the mouth.
8. Solve
Processing > Calculate All. AkAbak solves the BEM first, which is the slow part, then the fields, then the spectra.
The Pro version (commercial, or the free Student licence for hobby use) saves the BEM results next to the project as a .akpbe file, so reopening the project doesn't need a re-solve. The Demo version does the same simulations but can't save BEM results: keep the project open until you've taken everything you need from a long run.
To check the meshing before committing to a long run, use Processing > Calculate Individually > BEM Meshing. It only meshes, so you can look at the refined 40 mm mesh in Leg 1 and Turn 1 in the 3D view.
9. Results

SPL at 1 m in front of the mouth, 2.83 V, cabinet on the floor: AkAbak against Hornresp.

Impedance of the parallel pair.

Cone excursion.

Pressure on the mid-width plane at 25 Hz.

Pressure on the mid-width plane at 50 Hz.

Pressure on the mid-width plane at 80 Hz.
[Results write-up to come: how AkAbak compares with Hornresp, where they part ways, and what the field plots show.]
Troubleshooting
- The model comes out a kilometre wide. The mesh is in millimetres: set the Mesh-File's Scaling to 0.001.
- The pressure field looks strange or non-physical. An interface has its subdomains the wrong way round. Subdomain 1 is the side its normals point into; use Swap.
- Odd results in a narrow channel. The triangles are too big for the gap. Lower the Edge Length on that subdomain.
- Faces on the mirror plane. With symmetry on, no face may lie on z = 0. If you see any in AkAbak's 3D view, re-export from Gmsh with Save all elements unticked.
- The bottom octave doesn't line up with Hornresp. Check the driver first: vacuum mass (Mmd, not datasheet Mms), and the parallel-pair values when the half model mirrors a whole cone. Both are LE changes, so no re-solve is needed.
Downloads
450L Box - BEM air.step: the six bodies (five air bodies and the cabinet), interfaces and cone faces already cut in.450L Box - BEM air.geo: a Gmsh script that does all of section 2 for this cabinet in one go, normals included. Open it in Gmsh instead of the STEP.450L Box - BEM air.msh: the finished mesh, ready for AkAbak. You can skip Gmsh with it.12W1600 3-leg 450L - Hornresp 1 cab.txt: the Hornresp record for comparison (two drivers in parallel, 2.83 V, half space).