ath4 · abec.numfrequencies i number of frequencies (within the limits specifed) for which tha...

13
Ath4 Acoustic Horn Design – The Easy Way User Guide - v4.3.5 Marcel Batík Prague, Czech Republic, Europe 2019

Upload: others

Post on 28-May-2020

3 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: Ath4 · ABEC.NumFrequencies i Number of frequencies (within the limits specifed) for which tha calculation will be made. ABEC.MeshFrequency r Sets the mesh frequency as documented

Ath4

Acoustic Horn Design – The Easy Way

User Guide - v4.3.5

Marcel Batík

Prague, Czech Republic, Europe

2019

Page 2: Ath4 · ABEC.NumFrequencies i Number of frequencies (within the limits specifed) for which tha calculation will be made. ABEC.MeshFrequency r Sets the mesh frequency as documented

1. Introduction

A little background

The presented program ath41 can be used to design constant directivity horns of various shapes. The basicidea is to take an oblate spheroidal (OS) waveguide [1-3] as a good starting point and do something to it.Why to do that? Because there are well known diffraction related issues in strictly axi-symmetric devices,especially when moderate size and constant directivity are of concern: the inevitable diffracted waves from ahorn termination are simply too coherent to not to bother. The effect is of course most pronaunced around thehorn's axis where the wave travel paths are all equal around the circumference. One way to solve this issue isto use large enough termination flare. Unfortunatelly "large enough" might well mean too big to be practical.The other most obvious remedy is to change the horn's mouth shape to something different than a circle andthere is an infinite number of ways how to do that.

In the OS waveguide a wall profile (as seen from a longitudinal cut) is a conical section, namely hyperbola.Because of its axial symmety, this curve is the same everywhere. What would happen if we changed themouth shape arbitrarily and keeped the wall profile to be hyperbola at each longitudinal cut? This is thetechnique employed in ath4 and it proved to work quite well.

Of course this is not the whole story because the horn needs to be terminated into free space finally. Howsmoothly it can be done? It seems that Euler spiral, also known as clothoid, would be the shape to try for itsgradual change of curvature. This is also the shape employed in ath4. In the end a moderately sized horn withpretty good beamwidth control and frequency response smoothness everywhere can be designed. For a moredetailed treatise and also for the terminology used see the appendix A.

Requirements

• Windows operating system (tested on Windows 7/10),

• Gmsh SDK (available at http://gmsh.info),

• STL viewer (optional),

• ABEC+VACS (optional; available at http://www.randteam.de, BEM analysis of the horn acoustics).

The basic workflow

1. First a horn definition script must be prepared. Most easily an existing one can be modified or someof the provided examples adapted. In this plain text file a complete description of the horn geometryand all the related parameters are contained (more on chapter 2).

2. Then the utility ath4 is executed from a command line with the script filename as a parameter. Ittakes just a few seconds to run. Among the results is the STL file which can be quicky inspected inyour favourite STL viewer. Also the resulting horn dimensions are shown.

3. Once satisfied with the design, take the ABEC project also created by the utility, open it and run inABEC. Repeat steps 1 - 3 until fully satisfied with the predicted performance.

4. Build the horn.

1 „ath“ stands for „advanced transition horn“ and it is the best name the author happened to come up with.

2

Page 3: Ath4 · ABEC.NumFrequencies i Number of frequencies (within the limits specifed) for which tha calculation will be made. ABEC.MeshFrequency r Sets the mesh frequency as documented

2. Horn definition script

The script is an ordinary text file and has to edited with a plain text editor such as Notepad, Notepad++(highly recommended2). Its structure is very simple and the only syntactical entity is an item. Items arespecified per line in the following format:

<Item_Identifier> = <Item_Value>

There are several types of values:

Value Type Description

r General real number. Decimal places separated by a dot. Written without units.

i Integer number.

b Boolean ("yes" or "no").

s Text string. Must be enclosed in quotes if containing blanks ("...").

All identifiers and keywords are case sensitive. Comments can be used, started by semicolon, and the rest ofthe line will be ignored. The script comprises of several logical sections. All the items available are describedin detail on the following pages.

A short overview of the script sections:

Horn Geometry

In this section the basic horn geometry is specified. First decide on coverage angles and the depth. When theutility is executed, horn's width and height are derived automatically and printed out. As this calculationtakes only a fraction of a second it is easy to iterate manually until satisfied with the dimensions.

Mesh Setting

Mesh setting strongly affects not only the output STL quality but also the performance of the BEM analysis.Usually the finer mesh the higher quality of the results but be aware that too fine mesh will greatly increasecomputation time. With the default values the analysis usually works well to about 10 kHz.

ABEC Project Setting

The utility can create complete ABEC project for you, including the mesh file. These items set the details.Once the ABEC project is created you can modify it freely. Only the very basic parameters are set here.

Output

In this section more global behaviour of the tool is set. Basically you tell it what it should generate during theexecution and where. After it is done, you should find all the files requested under a destination directory youspecified (beware, it must already exist!). Typically you set this directory only once and it will be common toall your horn projects. For each script you execute with the tool, separate directory with the same name willbe created.

2 Freeware available at https://notepad-plus-plus.org/

3

Page 4: Ath4 · ABEC.NumFrequencies i Number of frequencies (within the limits specifed) for which tha calculation will be made. ABEC.MeshFrequency r Sets the mesh frequency as documented

Horn Geometry

Identifier Value

ThroatDiameter r Throat diameter: 5 – 100 mm

ThroatAngle r Throat entry angle: 0 – 60 degSets the angle between horn walls at the throat entrance. It should match compression driver output. During the BEM analysis it is best tokeep it zero.

Coverage_Horizontal r Nominal horizontal coverage: 30 – 120 degSets the asymptotic opening angle of the walls.

Coverage_Vertical r Nominal vertical coverage: 30 – 120 degSets the asymptotic opening angle of the walls.

Depth i Sets the total depth of the horn [mm].It will be rounded to the nearest integer number. This is the basic parameter of the horn size.

Depth.ConicSectionPart r Conic section depth as a portion of the total depth: 0.1 – 0.9Sets the division between the two horn parts: the (hyperbola) conic section and the (clothoid) termination. Good value is 0.5.

Shape s raw | raw2rect

raw = Keeps the overall shape as given by the s-curve (see appendix A), i.e. the horn will resemble a superellipse.

raw2rect = Transforms the horn to a rounded rectangle as the final stepof the algorithm.

Shape.FixedPart r Sets the portion of the horn from the throat that will be kept fixed during the transformation to a rectangulat mouth (for Shape = raw2rect). It is defined as the portion of the total depth.Default: 0.2

Shape.StretchExp r The exponent for the b-curve stretching (see appendix A). You really don't need to change this.Default: 3

Shape.CornerRadius r For Shape=raw2rect it sets the corner radius [mm].

SEExp r Superellipse exponent for the shapecurve: 2 - 20Value of 2 gives pure ellipse (or a circle). Increas the value to get morerectangular shape.

Termination s baffle | free-air

baffle = Horn will be terminated into a baffle.free-air = Horn will be given a roundover lip and is supposed to be kept unbaffled.

Termination.Angle r For Termination = baffle it sets the angle at which the horn walls meet the baffle. The angle is measured from the axis and the default value is 90 deg, i.e. smooth transition without an egde.

Termination.Scale r For Termination=free-air it sets the size of the roundover lip. Value of 1 means the lip is made as a natural continuation of the terminating clothoid. It can be scaled from the point the wall turns backward. Usually you will want it to be a bit smaller.

4

Page 5: Ath4 · ABEC.NumFrequencies i Number of frequencies (within the limits specifed) for which tha calculation will be made. ABEC.MeshFrequency r Sets the mesh frequency as documented

Mesh Setting

Identifier Value

Mesh.AngularSegments i Sets the number of angular segments. Must be divisible by four as the exact quarter of the horn may be needed. Use this parameter to set the coarseness of the mesh for the BEM analysis.

Mesh.DepthSegments i Sets the number of cross-sectional slices in the final mesh. Slices are not made equidistant but get closer to each other where a wall curvature increases.

Mesh.LipSegments i For Termination=free-air it sets the number of segments for the lip roundover.

Mesh.CornerSegments i For Shape=raw2rect it sets the number of corner segments.

Mesh.ThroatResolution r Sets the nominal size of the mesh elements for the throat surface[mm]Default: 5

Mesh.WallResolution r Sets the nominal size of the mesh elements for the horn walls [mm]. However, this resolution is better controlled by the items Mesh.AngularSegments and Mesh.DepthSegments, which should be set small enough. Default: 25

Mesh.InterfaceResolution r Sets the nominal size of the mesh elements for the subdomain interface surface [mm]. For explanation of interfaces, see ABECdocumentation. Default: 10

Mesh.IBInterfaceRadiusRatio r Sets the ratio of iterface spherical cap radius to horn mouthradius. Used for ABEC meshing with an infitite baffle.Default: 2; Range: 1.1 - 5

Mesh.IBInterfaceStrip r Sets the minimim gap between the horn's mouth edge and the interface surface [mm]. Used for ABEC meshing with an infitite baffle.Default: 10

5

Page 6: Ath4 · ABEC.NumFrequencies i Number of frequencies (within the limits specifed) for which tha calculation will be made. ABEC.MeshFrequency r Sets the mesh frequency as documented

ABEC Project Setting

Identifier Value

ABEC.RadiationConditions s IB

IB = infinite baffle (for now the only option)

ABEC.f1 r Low frequency limit [Hz]Default: 600

ABEC.f2 r High frequency limit [Hz]Default: 12000

ABEC.NumFrequencies i Number of frequencies (within the limits specifed) for which tha calculation will be made.

ABEC.MeshFrequency r Sets the mesh frequency as documented in ABEC [Hz]. The best practice seems to be to make the mesh fine enough that ABEC won't need (and won't do) further meshing. If this value is increased, ABEC may perform some additional meshing just by subdividing the existing one. Default: 1000

ABEC.Polars.Horizontal b Set to yes if you want to do horizontal SPL polars.Default: no

ABEC.Polars.Vertical b Set to yes if you want to do vertical SPL polars.Default: no

ABEC.Polars.Diagonal b Set to yes if you want to do diagonal SPL polars.(See also ABEC.Polars.DiagonalInclination)Default: no

ABEC.Polars.DiagonalInclination r Sets the angle for diagonal polars [deg].If set to zero, the diagonals will be made for the largest dimension of the horn (you will see the corresponding angle in the created ABEC observation script).Default: 0

ABEC.Polars.Distance r Sets the distance for SPL polar points [m]

ABEC.Polars.Step r Sets the angular step between the polars [deg]

ABEC.Polars.Points i Sets the number of polars in each set. The set begin on-axis and continue outwards.

6

Page 7: Ath4 · ABEC.NumFrequencies i Number of frequencies (within the limits specifed) for which tha calculation will be made. ABEC.MeshFrequency r Sets the mesh frequency as documented

3. Working example

Together with the utility come several examples. There is a script file called small.cfg - let's take this oneand show how it works.

! A prerequisite for running ath4 if the Gmsh SDK library. Please download the SDK from

http://gmsh.info and extract a file gmsh-4.3.dll to the same directory as ath4.exe.

Suppose you have the ath4 archive you downloaded unzipped in some directory on your disk. Open astandard command line window (cmd.exe) and go into that directory. The most convenient way is to create anew shortcut to cmd.exe and set this directory as the working directory - you then just double-click it and itwill open right there.

The examples are in a subdirectory called "examples". To run aht4 with this script, just type the followingcommand and press Enter (see the picture below, you can omit the ".exe" part):

> ath4.exe examples\small.cfg

This is really all you need to run the tool. Now you see the final dimensions of the horn. Shouldn't you besatisfied with these numbers, modify the script and run again.

If you look into the script itself, in the output section we read:

Out.DestDir = "D:\Horns" Out.Write_STL = yes Out.Write_MSH = no Out.Write_ABECProject = yes

Based on that we should now find the output files (STL and ABEC project) in the directory "D:\Horns\small" (as the utility already printed out) - they are there:

7

Page 8: Ath4 · ABEC.NumFrequencies i Number of frequencies (within the limits specifed) for which tha calculation will be made. ABEC.MeshFrequency r Sets the mesh frequency as documented

Let's open the ABEC project, just double-click on the file Project.abec:

(If the click does not work - an association for the file type is missing, simply run ABEC and open it there.)

ABEC starts, loads the project and everything is ready:

First you need to run the Boundary Element Solver. Either from the menu or via this icon:

Project this small should be calculated within a minute on a decent machine. After it is done, nothing reallyhappens, which is fine, the results are there - it should say "Solved".

8

Page 9: Ath4 · ABEC.NumFrequencies i Number of frequencies (within the limits specifed) for which tha calculation will be made. ABEC.MeshFrequency r Sets the mesh frequency as documented

The second step is to run the observation stage - The Spectra:

This is much quicker task and after a while the VACS viewer is started with the data transfered -

There you have it - polar maps, SPL charts, radiation impedance...

Feel free to experiment youself. Beware that with a free version of ABEC, once you close it, you will have torun the solver again next time.

9

Page 10: Ath4 · ABEC.NumFrequencies i Number of frequencies (within the limits specifed) for which tha calculation will be made. ABEC.MeshFrequency r Sets the mesh frequency as documented

4. Disclaimer

The autor of this tool takes no responsibility of a potentional hearing loss or damage caused by any of thedevices built based on instructions presented in this document or elsewhere. These horns are so good that theplayback level can easily become dangerously loud. Take care! :-)

5. To-Do List

This is really the first release of the tool with still somewhat limited functionality. Please be lenient with it.Much more can be done, especially on the ABEC part. This is also an area where anybody can contribute. Iwill add functionalities as my time resources let me. As I make a living at completely different area, I do thissolely for fun.

The next important thing to do it to find some way of exporting the coordinates of the horn for people to beactually able to build it. Again, anybody can contribute at least with ideas.

5. References

[1] Geddes, E. R. (1989), Acoustic Waveguide Theory, Journal Audio Eng. Soc. 37-7

[2] Geddes, E. R. (1993), Acoustic Waveguide Theory Revisited, Journal Audio Eng. Soc. 41-6

[3] Geddes, E. R. (2002), Audio Transducers, Gedlee.

10

Page 11: Ath4 · ABEC.NumFrequencies i Number of frequencies (within the limits specifed) for which tha calculation will be made. ABEC.MeshFrequency r Sets the mesh frequency as documented

Appendix A - The Maths

In the following text a horn is considered in the cartesian coordinate system with axes x, y, z, with center ofthe throat placed at (0, 0, 0), facing in the z-axis, i.e. the z-axis is also the axis of the horn.

Any point (x, y, z) on the surface of the horn can also be expressed in polar coordinates in the x-y plane ofthe respective cross-sectional cut:

(x , y , z)=(r ,θ )|z

r radius, i.e. the distance from the horn axis

θ angle from the x-axis

Oblate spheroid waveguide (OSWG) wall contour in is then given by the following equation (a hyperbola):

r (z)=√r02+ tan2(β )z2

(1)

New parameters introduced:

r0 throat radius

β nominal coverage angle (asymptotic angle between horn axis and the wall)

The equation (1) doesn't yet account for throat entry angle, it assumes it zero. To incorporate the throat entryangle as a parameter the equation can be easily extended (still a hyperbola):

r (z)=√r02+2r 0 tan (α 0) z+ tan2(β )z2

(2)

α 0 throat entry angle (one-sided value)

As OSWG is an axi-symmetric device, there is no dependency on θ. What we want now is to introduce some.Here comes in the term "s-curve". It is just an arbitrary function of θ:

rS(θ ) the s-curve

Once we have the s-curve, we place it in some distance from the throat and want the horn walls to go throughit. More than that, we want the wall contour to still be a hyperbola with the right throat angle everywhere.This is not hard to do and a somewhat more extended equation that do just that has the following form:

r (z ,θ )=√r02+2 r0 tan(α 0)z+ 1

H 2 [r S2 (θ )−r0

2−2 Hr0 tan(α 0)] z2 (3)

H z-coordinate of the s-curve (i.e. it's distance from the throat)

Now we have quite a nice horn that goes from the throat up to the s-curve (well, it could pass the s-curve andcontinue to infinity but we choose to stop at z = H as we have to stop somewhere). Also note that theparameter β (i.e. the nominal coverage) disappeared from the formula. The coverage is now governed by thes-curve and its distance from the throat. To get pure OSWG again the s-curve would be just a constantfunction.

11

Page 12: Ath4 · ABEC.NumFrequencies i Number of frequencies (within the limits specifed) for which tha calculation will be made. ABEC.MeshFrequency r Sets the mesh frequency as documented

To simplify things a bit lets re-arrange the last equation:

k1=ro2

k2=2 r0 tan (α 0)

k3(θ )= 1

H2(r S

2 (θ )−k1−k2 H )

r (z ,θ )=√k1+k 2 z+k3(θ )z2(4)

Now the horn needs to be terminated (nothing to do with Schwarzenegger). What we want is a smoothgradual change in the wall curvature to mitigate diffraction as much as possible. Simple option would be justa circular arc. Could it be good enough? Maybe, if large enough. Are there any potentially more effectiveshapes? Probably. One of them could be the Euler spiral (also known as clothoid). It has the property oflineraly increasing curvature along its length. Thus it can be very smoothly connected to a straigt linesegment, which our hyperbola (sufficiently far from the throat) actually almost is.

And here comes the tricky part - the clothoid is not very easy to work with. You can look up the equationsand try but I can tell you that much easier is to just process it by some dumb algorithm, point by point, onceyou have it. This is the way how it is done in ath4 but I will not disclose it here - nothing interesting to seereally.

I will only show what is the angle at which the terminating curve must be connected to the horn wall - it issimply the tangent to the surface and could be used for any other termination shape as well -

α (z ,θ )=arctan(∂r (z ,θ )∂ z )=arctan(1

2k 2+2k 3(θ ) z

√k1+k2 z+k3(θ )z2) (5)

When you put z=0 into this equation, you get α0 (the throat entry angle), so you see that everything works.

When using clothoid, for each θ the curve is scaled so that it is just tangent to a x-y plane at the horn depth.This is also the reason why the total horn depth is specified as the master parameter. The other way aroundwould be a bit tricky, although possible.

So far we haven't talked about any specific s-curve. It can be anything. For the purpose of the tool asuperellipse was chosen. It gives quite a lot of freedom and stays fairly simple to use:

rS(θ )= abn√(a sinθ )n+(bcosθ )n

a superellipse semi-major axis

b superellipse semi-minor axis

n superellipse exponent

12

Page 13: Ath4 · ABEC.NumFrequencies i Number of frequencies (within the limits specifed) for which tha calculation will be made. ABEC.MeshFrequency r Sets the mesh frequency as documented

What about a rectangle?

Superellipse can approach rectangular shape but never actually reach it. Moreover, for high exponents thearea near the throat is also quickly shaped to the corresponding s-curve. That might not allways be what youwould want. For rectangular mouths a different approach was chosen and a second stage of the algorithmdevised.

Once the regular horn shape is calculated with some lower superellipse exponent, the entire horn is morphed(or better said stretched) into a new mouth shape. In this case it can be a real rectangle, possibly rounded, oranything else. We can call this a bounding curve, b-curve, usually larger than the original outline - yetanother function of θ. How to stretch? We don't want to touch the throat but instead gradually change theoveral shape so it just fits the b-curve at the mouth.

A simple formula that gives us just that looks like this:

r '(z ,θ )=r (z ,θ ) for z ≤ zT

r '(z ,θ )=r (z ,θ )+( z−zT

zmax−zT)

γ

(rB (θ )−r (zmax ,θ )) for zT < z ≤ zmax

zT fixed part of the original shape - just to be sure we don't touch the throat at all

zmax total horn depth

rB (θ ) b-curve (a target mouth shape)

γ just some exponent

A good value for zT seems to be around 0.2*zmax and for γ around 3. You are free to experiment - these valuesare set be the items Shape.FixedPart and Shape.StretchExp.

13