Numerical Simulation Software for Designing Loudspeakers?

Status
This old topic is closed. If you want to reopen this topic, contact a moderator using the "Report Post" button.
Jens, thanks for the pointers but the programs use "lumped element" 1D modelling. Such simulations are very fast but rely heavily on empirical data and cannot really examine the 3D acoustic performance of the internal details of a cabinet. For example, the penalty in terms of reflections of folding a horn this way or that. My interest was in simulation programs which require a computational grid (hence numerical simulation) for the cabinet and take minutes or hours to perform a simulation.
 
Yes I have some familiarity with Ansys software but I would assume it is far too expensive for someone designing loudspeakers for a hobby (also, I am fairly sure their software does not solve the required acoustic equations but there are Ansys-type engineering companies that sell the appropriate software but, unfortunately, for a similar price).

I think my original question may need clarifying. My enquiry is about software for simulating the sound waves in and around loudspeaker cabinents and whether DIY audio enthusiasts use such software. I do not have a particular design problem to solve. The question was prompted by looking at a few DIY audio designs that look a bit odd acoustically and knowing that a current PC is quick enough given a little patience to solve for the sound field in and around a loudspeaker cabinet (subject to one or two limitations).
 
diyAudio Moderator Emeritus
Joined 2001
As I recall, Martin J. King's programs, using MathCAD, do not use lumped parameters, but instead actually crunch the numbers.

I have a slower computer, (300 MHz), and it takes a couple of minutes for any particular simulation to be calculated and graphed usisng MJK's software. Something must be going on there. All the lumped parameter programs graph it simultaneously.
 
kelticwizard: I have very briefly scanned Martins equations. As you say, they are not based on lumped parameters but a 1D wave equation with a variable area. This is a step in the direction I was enquiring about but 1D cannot represent the 3D effects of folds, bends, the driver chamber, external cabinet effects, etc...
 
1D cannot represent the 3D effects of folds, bends, the driver chamber, external cabinet effects, etc..
Considering the precision of AJ-Horn and Martins sheets I´d like to ask what you think you´re aiming at further improving simulation results.
Quite a few measurements I´ve seen that were absolutely congruent with the simulations. If not, well I guess it´s other factors but mostly not the simulation that is the reason for the tolerance like materials used or several measurement flaws, wrong input data...

If you want to rebuild something like the nautilus from B&W such a "3D-program" will be quite useful of course.

greets
 
> Considering the precision of AJ-Horn and Martins sheets I´d like to ask what you
> think you´re aiming at further improving simulation results.

joensd: At the moment I am not aiming at anything just asking questions about what is typcially used by DIY audio enthusiasts. Nonetheless, it is surely reasonable to expect simulation methods to improve as home computers become more able to run scientific/engineering software? (subject to the latter being available hence the question).

> Quite a few measurements I´ve seen that were absolutely congruent with the
> simulations. If not, well I guess it´s other factors but mostly not the simulation
> that is the reason for the tolerance like materials used or several measurement
> flaws, wrong input data...

I can only agree with you about the reasons for discrepencies between simulation and measurements but I am fairly sure you are not correct in believing simulations are good enough. The ear is certainly sensitive to significant to deviations in gross parameters like frequency response but it also picks up on many other lesser effects like harmonic distortion and secondary sources from edges, cabinet panels and internal cabinet reflections. Are current simulation methods providing useful information about such effects?
 
Interesting discussion!

My worksheets do use the 1D wave equation so they are better then a lumped parameter model, in my opinion, but are not as accurate as a complete 3D solution. I have used ANSYS to calculate the standing waves in TL enclosures to try an assess at what frequency the 1D wave equation results become inaccurate and to verify the fundamental tuning frequency of the enclosure. For a TL the inaccuracy seems to become apparent up in the 500 Hz or greater frequency range depending on the size of the line being modeled. For the bass range the 1D solution does OK even when folds are used to fit a long line to a rectangular enclosure. The ANSYS frequencies and mode shapes correlate well with the MathCad model below about 500 Hz. I have not used ANSYS for any more complicated acoustics problems although I believe the potential is there to do some more types of modeling.

I have a pair of MathCad worksheets that do calculate a 3D solution to the wave equation for rectangular closed and ported boxes. Right now they do calculate results but I need to clean up a few math errors to get accurate SPL plots. The results look interesting and promising, I would need to extend them to try and simulate folds and bends. These have been on the back burner for probably a year while I work on other improvements to the worksheets.

For me the biggest source of inaccuracy in the SPL predictions comes outside of the enclosure. The current worksheets treat the driver and open end as coincident sources radiating into 2 pi space. My newest worksheets are intended to calculate the SPL including the effects of driver and mouth/terminus/port position on the front or back baffle, baffle step, floor reflection, and even back wall reflection. I am still putting the finishing touches on these worksheets and I believe they will provide a better tool to assess BSC circuits and what you will hear in the way of SPL balance.

But in the end, listening is still the ultimate test.
 
I have used Matlab and the PDE toolbox to look at wave propagation in 2D. I mostly used this to get a feel for how the sound waves go around bends, and where I will start to get cancellation (where reality will start to diverge from a lumped parameter model). I also used it to look at the polar response which can be used to correct the response predicted by a lumped parameter model (ie, if you know the power response from lumped element and you know how the power is distributed from fea, you can figure out what the response curve at any angle will be).

I've been playing with Ansys recently for both 3D and 2D problems. Simple geometries are okay, but it is not particularly user friendly for more complex problems, imo. Newer versions (past 4 or 5 maybe?) can do coupled-field problems (structural to acoustic for example), so in theory this is what you would need for completely modeling speakers.

Neither of these approaches are what the typical diyer uses - just what is possible.

Before I got into the fea, I did some measuring of how sound waves went around bends. My thought was to try to educate myself on how sound waves behave when they encounter bends. Then with this behaviour in mind, I could design horns to avoid major pitfalls in the frequency range I was interested in. Since then I've sometimes used fea to do the same sort of thing. This info is posted on my webpage.
 
MJK & John: Did you purchase ANSYS or did you run it at work? I have had a quick browse and there is a cheap $200 Windows version but it is severely limited by the number of elements that can be used. Is this the version used?

John: what did you find unfriendly about defining complex problems? Was it the process of creating a solid model geometry, tesselating it, defining appropriate boundary conditions and running the simulation, or was it problems with the user interface, or something else?

> But in the end, listening is still the ultimate test.

It may be the ultimate pass-off test but it can be pretty poor at sorting out what is wrong if used in isolation.
 
Did you purchase ANSYS or did you run it at work? I have had a quick browse and there is a cheap $200 Windows version but it is severely limited by the number of elements that can be used. Is this the version used?

I used the full ANSYS package at work. Basically my former employer encouraged people to use software off hours for non business related jobs and personal development. They felt that what was learned would pay back when that type of problem came up on a company related job. The software was sitting there not being used so they looked apon this as a win-win situation. The policy worked very well in my opinion.

Having used ANSYS for almost 20 years, I found it really easy to use for acoustics problems. Modeling different geometries was not that difficult, you need to simplify problems by making intelligent decisions about what to include and what to neglect. I plan on continuing experimenting with horn and TL geometries to correlate and validate my MathCad models and to solve problems beyond my mathcad capabilities.

It may be the ultimate pass-off test but it can be pretty poor at sorting out what is wrong if used in isolation.

I never said to use listening in isolation. What I intended to get across was that a paper design that produces a "good" calculated SPL response may or may not sound good. I want to learn from listening so that I know what to look for in a simulation result that contributes to a good or bad sounding speaker. They need to be closely linked. Making changes to the design that impact the mathematical response and the physical performance should allow one to learn so that the next design is even better.
 
andy19191 said:

I can only agree with you about the reasons for discrepencies between simulation and measurements but I am fairly sure you are not correct in believing simulations are good enough. The ear is certainly sensitive to significant to deviations in gross parameters like frequency response but it also picks up on many other lesser effects like harmonic distortion and secondary sources from edges, cabinet panels and internal cabinet reflections. Are current simulation methods providing useful information about such effects?

The tools are really for the following purposes:

1. Provide the best estimation one can do prior to building a speaker.

2. Compare with measurements and identify any potential problems.

3. Estimate whether a design modification will potentially fix a problem.

4. Try to identify where problems might exist based on listening.

I think Martins publihsed worksheets work well for most of the DIY
designs. As people like Martin spend more efforts to enhance the models, it will be easier to get closer to the optimum design in one pass.
 
MJK said:
Interesting discussion!

My worksheets do use the 1D wave equation so they are better then a lumped parameter model, in my opinion, but are not as accurate as a complete 3D solution. I have used ANSYS to calculate the standing waves in TL enclosures to try an assess at what frequency the 1D wave equation results become inaccurate and to verify the fundamental tuning frequency of the enclosure. For a TL the inaccuracy seems to become apparent up in the 500 Hz or greater frequency range depending on the size of the line being modeled. For the bass range the 1D solution does OK even when folds are used to fit a long line to a rectangular enclosure. The ANSYS frequencies and mode shapes correlate well with the MathCad model below about 500 Hz. I have not used ANSYS for any more complicated acoustics problems although I believe the potential is there to do some more types of modeling.

I have a pair of MathCad worksheets that do calculate a 3D solution to the wave equation for rectangular closed and ported boxes. Right now they do calculate results but I need to clean up a few math errors to get accurate SPL plots. The results look interesting and promising, I would need to extend them to try and simulate folds and bends. These have been on the back burner for probably a year while I work on other improvements to the worksheets.

For me the biggest source of inaccuracy in the SPL predictions comes outside of the enclosure. The current worksheets treat the driver and open end as coincident sources radiating into 2 pi space. My newest worksheets are intended to calculate the SPL including the effects of driver and mouth/terminus/port position on the front or back baffle, baffle step, floor reflection, and even back wall reflection. I am still putting the finishing touches on these worksheets and I believe they will provide a better tool to assess BSC circuits and what you will hear in the way of SPL balance.

But in the end, listening is still the ultimate test.


With ANSYS, wouldn't you also be able to model the speaker in a room as well?

It would really be neat if you could import 3D speaker dimension from a CAD package into your worksheets.
 
With ANSYS, wouldn't you also be able to model the speaker in a room as well?

Yes, but I am not sure how accurate the results would be without a fairly fine mesh and a lot of assumptions about the reflections at the walls.

Actually, a few years ago I wrote an add-on for my worksheets that treated room reflections. It was limited to a rectangular room but could account for carpet on the floor, walls, and ceilings. The reflections coefficients were functions of frequency and the summation was reasonably quick. This is when I stopped worrying about every little ripple in the calculated response of a speaker.
 
I have not used ANSYS for as long as Martin, but compared to several CAD and FEA packages I've used, I find ANSYS a bit more complex and time consuming (in most aspects of setting up the problem). At the same time, that complexity gives you the capability to model many more situations - it's all a tradeoff. I generally model things in a cad package and then import them unless I am doing a simple geometry, but most of what I'm doing is more complex. This might also be what prompts my comment that it is not user-friendly - I am just working with models that are time consuming to setup (mostly mesh). It's not completely clear, but I am guessing that Martin is doing strictly acoustic analysis (?), while I am usually trying to do a structure-fluid interface model which adds a layer of complexity. In the case of ANSYS, I am trying to use FEA to model as much of the system as I can.

I use ANSYS at work. I called and asked for a price once - I think it was in the neighborhood of $80k for what I wanted (all the solvers). They would also lease it to you for a similarly outrageous price (I don't remember what, but it was in the $10k-$30k a year range, I'm pretty sure).

You could model a speaker in a room, but the problem you would run into would be the size of the model at high frequencies. You generally need the element size to be 0.2 times the wavelength of the frequency you're interested in or smaller, so if you want to go up to a high frequency in a large room, your model gets huge. I am playing with a supertweeter model at the moment, and I am modeling in 2D, axisymmetric (a simplification from 3D obviously). I am also just modeling a small sphere around the tweeter. My model size is around 300MB, and a one freqeuncy solution produces around 8.5GB of data in about 2.5 hours. Each additional frequency doubles the time requirement and adds about 700MB of data storage requirement. This is on a 3GHz P4 computer with 1GB of ram.
 
The trouble with more complicated models is that you need to have more specs to put in them. Eventually you get to a point where you need to guess. Lumped parameter models that account for all three damping types in a bass reflex are really not that much different (at least for resultant frequency response) from simulations where all of the damping terms are thrown into the leakage term.

Doing a full numerical with nonlinear compliance, BL, and modeling the 3D acoustic environment inside the box and port would be the next two steps, then modeling the shape of the piston, baffle and 3D boundary effects would be the next three steps.

The question is when does one stop? At 98% correlation with measured small-signal half-space data, at 98.5%? Perhaps the full blown model above would get you to 98% correlation with actual measured in-room data. How much effort does it take to get to that point? What does it tell you about how the system works in useful terms? The more complicated the model, the less likely you are able to draw broadly useful conclusions from it. I'm sure some of the loudspeaker companies have interesting in-house programs, but one has to hit the law of diminishing returns somewhere - and likely sooner rather than later.

Only a few programs can even do nonlinear driver parameter analysis, and it is usually at best a curve fit to a lot of tedious data taken to characterize the driver - at worst some kind of guess. Sound Easy and LspCAD and LEAP can do limited nonlinear analysis, and that is as far as it has been taken for commercially available software. Speak32 is another, IIRC.

As for freebies, Martin's are the best you will find - but these don't do nonlinear driver parameters that I recall.

It would be interesting to see some of these ANSYS results you guys are talking about. Are these FEA sims still assuming a perfect piston and perfectly stiff enclosure walls, or?

Cheers.
 
Ron E said:
It would be interesting to see some of these ANSYS results you guys are talking about. Are these FEA sims still assuming a perfect piston and perfectly stiff enclosure walls, or?

I have some Matlab stuff posted on my webpage. ANSYS basically looks the same for the same quantities. You can look at pressure or SPL countours among other things.

My matlab stuff assumed a unit input from a piston (which I defined the shape of) with stiff walls, etc. Coupled field models in ANSYS couple the structural and acoustic models together, so the deformation of the solid is computed. For example, I model the tweeter cone as being aluminum with the associated physical properties and put a force on the voice coil. ANSYS calculates the deformed shape of the dome / surround / coil, etc. is and uses that to calculate what the pressure in the air is. (That is probably a technically bad explanation.) To speed up the setup and modeling process, you can also assume things like a rigid piston, a pressure over a certain area, etc.
 
MJK said:


Yes, but I am not sure how accurate the results would be without a fairly fine mesh and a lot of assumptions about the reflections at the walls.

Actually, a few years ago I wrote an add-on for my worksheets that treated room reflections. It was limited to a rectangular room but could account for carpet on the floor, walls, and ceilings. The reflections coefficients were functions of frequency and the summation was reasonably quick. This is when I stopped worrying about every little ripple in the calculated response of a speaker.


Smart Guy!;)
 
Status
This old topic is closed. If you want to reopen this topic, contact a moderator using the "Report Post" button.