ath · ib = infinite baffle (for now the only option) abec.f1 r low frequency limit [hz] default:...

16
Ath User Guide - 4.5.0

Upload: others

Post on 27-Jul-2020

8 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: Ath · 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

Ath

User Guide - 4.5.0

Page 2: Ath · 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

ATH 4

Advanced Transition Horn, version 4

Marcel Batík

All rights reserved, Copyright © 2020

www.at-horns.eu

2

Page 3: Ath · 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

1. Introduction

Ath4 is a freeware acoustic horn shape generator. State-of-the-art geometries are employed for a highperformace horns and waveguides.

Software Requirements

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

• Gmsh SDK version 4.3 (freeware)

Optional software tools

• STL viewer, 3D CAD

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

Setup procedure

1. Download zip file from http://www.at-horns.eu and extract its contents to an arbitrary destination onyour hard drive. This will be the directory from where you will run the ath program via a commandline.

2. Download Gmsh Software Development Kit (SDK) archive from http://gmsh.info. You may need tolook into the archive for older binary versions and find the one currently required (see SoftwareRequirements above). The only file really required is the gmsh-4.3.dll. Extract this file to the samedirectory as the ath4 program in the previous step.

3. To run the tool, first you need to start a command line window, i.e. to run a program cmd.exe(typically found in the directory C:\Windows\System32). A convenient way of starting the commandline for Ath4 is to create a shortcut icon to cmd.exe and set the "Start in" property to the Athdirectory. After this shortcut is launched it takes you right to the program directory and you are set torun the tool. If this reminds you the old MS-DOS times, you are right - this is still the way Ath4operates.

Workflow overview

1. To desing a new horn from scratch, first a horn definition file must be prepared. Most easily anexisting (demo) file can be adapted. This file will store the complete description of your horngeometry and all the related parameters - more on this in chapter 2.

2. The program ath.exe is executed from the command line with a horn definition file name as itsparameter. Output is stored in a dedicated directory speficied in the definition file, with all the filesrequested (STL, ABEC project, ASCII coordnate files, etc.).

3. Once satisfied with the basic geometry (after inspecting the shape in STL viewer or CAD), open thegenerated ABEC project and run a BEM simulation which will predict the acoustical behaviour ofthe device. Repeat steps 1 - 3 until fully satisfied with the results.

4. Make the physical horn based on the STL file or the coordinate files (for CAD) and enjoy.

3

Page 4: Ath · 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

2. Horn definition file

The definiton file is an ordinary ASCII text file created and edited with a plain text editor, such as the defaultNotepad or Notepad++1. The structure is simple and the only syntactical entity is an item. Items are specifiedone per line in the following format:

Item_Identifier = Item_Value

There are several types of item values that will be referenced further:

Value Type Description

r Floating point (a "real") number. Use dot "." as the decimal point.

r[] Vector of real numbers. Values are separated by commas "," or vertical bars "|".

i Integer number (i.e. a whole number, without a decimal part).

i[] Vector of integer numbers. Values separated by commas "," or vertical bars "|".

b Logical type, can be any one of these constants: yes, true, 1, no, false, 0

s Text string. Must be enclosed in quotes if containing spaces (e.g. "two words").

All the identifiers and keywords are case sensitive (i.e. "cone" is not the same as "Cone"). Comments can beused anywhere in the file - everything from a semicolon ";" to the end of the line is ignored. Empty lines arealso ignored.

The definition file is composed of several logical sections, although the order of individual items can becompletely arbitrary. All the available items are described in detail on the following pages. Some items canbe omitted - in that case the default values will be used (if any).

Horn Geometry Section

These are the items for the horn geometry - overal shape and size.

Mesh / STL Settings Section

The term "mesh" denotes a discretized horn surface description for the purpose of subsequent finite elementanalysis. Mesh setting strongly affects not only the output shape quality and resolution but also theperformance of a BEM analysis. In general, the finer the mesh the higher quality of the results to higerfrequencies, but be aware that a too fine mesh will greatly increase computation times. With the defaultvalues the BEM analysis works well to about 10 kHz in most situations.

ABEC Project Setting Section

The tool can generate a complete ABEC project, including the mesh file, ready for a BEM analysis. Once theBEM project is generated you can modify it freely on the level of the individual ABEC script files.

Output Section

This section specifies the output of the program - what types of files and where should be generated.

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

4

Page 5: Ath · 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

2.1 Overview on horn geometry

The basic principle employed in the tool is simple and powerfull at the same time - it uses a selected type ofprofile curve and connects a compression driver exit (or whatever is used as a horn driver) to a horn mouthby this particular type of curve around the horn. The mouth can be of virtually any shape. To achieve thatthere's the concept of a guiding curve, which is a 2D curve that the horn surface goes through at somedistance from the throat (see Fig.1). Shape of this curve thus defines the overal shape of the horn interiorsurface. Together with another parameter, the total length of the horn, the horn is defined completely. Ofcourse there are more parameters to be set but this is the basic principle.

Fig 1. - Horn geometry overview

At this point two different profile curve types can be used: OS+SE (oblate-spheroidal profile terminated bya superellipse additive) or cone+SE (straight wall terminated by a superellipse additive). More on the detailsof mathematics involved can be found in Appendix A.

Although the shape of a guiding curve in general could be completely arbitrary, two basic types areimplemented in the tool at the moment: superellipse2 or superformula3 (the later alone giving a huge numberof shapes possible).

For the mouth outline shape, there are also two possibilities implemented: 1) It can be determined by theactual shape of the guiding curve, or 2) specified independently to force it being a rectangle or a circle.

Of course a pure OS waveguide (as an example of a strictly axisymmetric device) can still be generated bythis machinery - just use a circle for the guiding curve (circle being a special case of superellipse).

In the following text the terms width, height and length (or depth interchangeably) of the horn geomtery willbe used in the intuitive sense if looking at the horn from the perspective of a listener.

2 https://en.wikipedia.org/wiki/Superellipse3 https://en.wikipedia.org/wiki/Superformula

5

Page 6: Ath · 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

2.2 Definiton file summary2.2.1 Horn Geometry

Identifier Value

Throat.Diameter r Throat diameter [mm].

Throat.Profile s OS | coneThe initial horn profile: oblate spheroidal or conical.Default: OS

Throat.Angle r Throat entry angle, measured from horn axis [deg].Sets the tangent angle for the horn walls at the throat entrance. This is mainly used with an OS profile to perfectly match the exit angle of a driver. For a conical profile this item has no meaning since the cone angle is determined by the guiding curve.Default: 0

Throat.Ext.Length r Length of an optional throat extension [mm].Default: 0 (i.e. no extension)

Throat.Ext.Profile s cone | b-cubicThroat extension profile: conical or cubic Bezier.For a conical extension, the item Throat.Angle defines the angle.Default: cone (the only available at the moment)

Length i The total length (depth) of the horn [mm].This is the basic parameter of the horn geometry.

GCurve s SE | SFShape of the guiding curve: SE=superellipse, SF=superformula

GCurve.Dist r Distance of the guiding curve from the throat:If set between 0 and 1, it is taken as a fractional part of the total horn length.If set > 1, it is taken as an absolute distance [mm].

GCurve.SE.Exp r Exponent of a superellipse for GCurve=SE.

GCurve.SF r[] Superformula definition for GCurve=SF.Array of six numbers corresponding to the common SF parameters: a, b, m, n1, n2, n3. The scale (size) of the curve si determined by GCurve.XDim (or GCurve.Angle) and GCurve.VertScale.

GCurve.XDim r Defines the size of the guiding curve. See Fig. XXX.Either .XDim or .Angle must be set for GCurve.

GCurve.Angle r Defines the size of the guiding curve. See Fig. XXX.Either .XDim or .Angle must be set for GCurve.

GCurve.VertScale r Vertical to horizontal ratio for the guiding curve. This is the basic parameter to control the overal shape. For GCurve=SE it simply sets the semi-axes ratio.Default: 1

GCurve.Rot r Optional rotation of the guiding curve in anti-clockwise direction [deg].Default: 0

Term.s r The "s" parameter of the termination additive - see Appendix A.Default: 0.7

Ter m.q r The "q" parameter of the termination additive - see Appendix A.Default: 0.995

6

Page 7: Ath · 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

Term.n r The "n" parameter of the termination additive - see Appendix A.Default: 5

Morph.TargetShape s raw | rect | circThe desired final outline of the mouth:raw = keep it as it is, determined by the guiding curverect = morph to a (circumscribed) rectangle - see also Morph.CornerRadius and Mesh.CornerSegmentscirc = morph to a circleDefault: raw

Morph.CornerRadius r Corner arcs radiuses for Morph.TargetShape=rect [mm].Default: 35

Morph.AddRectWidth r Optional increase of the final width for Morph.TargetShape=rect [mm].Default: 0

Morph.AddRectHeight r Optional increase of the final height for Morph.TargetShape=rect [mm].Default: 0

Morph.FixedPart r Portion (a fraction) of the horn length from the throat that will be kept fixed during the final morphing transformation. Default: 0

Morph.StretchExp r Exponent for the final morphing (see appendix A). It controls how gradual it is, i.e. how quickly the shape is changed going towards the mouth.Default: 3

2.2.2 Mesh / STL Settings

Identifier Value

Mesh.AngularSegments i Number of angular segments around the waveguide.

Mesh.LengthSegments i Number of slices along the length. Note: These are not equidistant but get closer to each other where the surface curvature increases.

Mesh.CornerSegments i Number of corner angular segments for Morph.TargetShape=rect.

Mesh.ThroatSegments i Number of slices for the throat extension (see Throat.Ext.*). The total number of slices is splitted between throat segments and the rest.

Mesh.ThroatResolution r Nominal size of the driving elements [mm].Default: 5

Mesh.InterfaceResolution r Nominal size of the elements for the subdomain interface [mm]. For explanation of interfaces, see ABEC documentation.

Note: The sizes for surface elements between the throat and the interface are linearly interpolated between ThroatResolution and InterfaceResolution.Default: 5

7

Page 8: Ath · 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

2.2.3 ABEC Project Settings

Identifier Value

ABEC.RadiationConditions s IBIB = 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 frequency points for which the BEM analysis will be performed.

ABEC.MeshFrequency r The mesh frequency as documented in ABEC manual. Try to make the mesh fine enough by setting Mesh.*Resolution to low enough values so that ABEC won't need (and won't do) further re-meshing. If this value is increased, ABEC may perform some additional meshing just by subdividing the existing one.Default: 1000 [Hz]

ABEC.Source.Shape s spherical | flatDriving wavefront shape at the throat: spherical or a flat (plane) wave.Default: spherical

ABEC.Source.Radius r Radius of the driving wavefront in case of a spherical wave [mm].If set to -1, the radius will be determined automatically to match the throat angle.Default: -1

ABEC.Source.Curv i 1 | -1 | 0Curvature of the wavefront: 1=convex, -1=concave. If set to zero, the curvature will correspond to the throat angle (positive => convex, negative => concave).Default: 0

ABEC.Source.Velocity s radial | axialVelocity direction for the driving elements. Use "radial" for a shperical wave, "axial" for a vibrating dome. It makes no difference for a plane wave.Default: radial

ABEC.Polars.Horizontal b Controls whether horizontal SPL polars will be calculated.Default: true

ABEC.Polars.Vertical b Controls whether vertical SPL polars will be calculated.Default: false

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

ABEC.Polars.DiagonalInclination r The angle for diagonal polars [deg].If set to zero, diagonals will be calculated for the largest mouth radius (you will see the corresponding angle in the created ABEC observation script).Default: 0

8

Page 9: Ath · 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

ABEC.Polars.Dist r Distance for SPL polar points [m].Default: 3

ABEC.Polars.Step r Angular step between polars [deg].Default: 7.5

ABEC.Polars.Points i Number of polar points.Default: 11

2.2.3 Output Settings

Identifier Value

Output.DestDir s Sets a target directory for the project.All output files will be saved under this directory.

Output.STL b Controls whether a STL file will get generated.Default: yes

Output.MSH b Controls whether a MSH (Gmsh) file will get generated.Default: no

Output.ABECProject b Controls whether an ABEC project will get generated.Default: no

Output.Coords b Controls whether ASCII file with surface points coordintes will get generated.

Output.Coords.Scale r Sets the scale for the output coordinates.Default: 0.1 (because of the Fusion 360 handling)

Output.Coords.NumProfiles i Sets the number of profiles to be written in the coordinate file.

Output.Coords.Delimiter s Delimiter of the coordinate numbers.Default: ";"

Output.Coords.SeparateFiles b Controls whether a separate file will be created for each curve.Default: no

Output.Coords.FileExt s Sets the extension of the coordinate file.Default: "csv"

9

Page 10: Ath · 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

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. 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: Ath · 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

Appendix A - The Maths

In the following text a cartesian coordinate system with axes x, y, z is considered, with a horn throat centeredat origin, facing in the direction of the z-axis.

Any point [x, y, z] on the surface of the horn can be expressed in polar coordinates in the xy plane of therespective cross section:

[x , y , z ]=[r ,ϕ ]|z

r horn "radius", i.e the distance of the surface point from the z axis

ϕ angle <0, 2π> around the cross section (zero angle corresponds to a direction of the x axis)

There is a general waveguide profile formula used throughout the tool of the following form:

r (z)=rWG(z )+rTERM (z)

The first general term rWG represents the basic profile, often of an infinite nature. The second term

rTERM adds a real-world mouth flare termination (more on that later).

Two options for the basic profile are implemented at the moment:

a) rCONE(z)=r0+z tan(α ) Straight conical horn

b) rOS(z )=√r02+2r 0 tan(α 0)+z2 tan2(α ) Oblate shperoidal waveguide

r0 throat radius

α nominal coverage angle (measured between the z axis and the horn wall)

α 0 throat angle

Since the horn must be of a finite length and a termination of the basic profile in an abrupt manner wouldresult in a poor acoustic performance, a second term is incorporated in the formula for the purpose of agradual termination. After some experimentation it was found out that an additive superelliptical arc worksvery well. The advantage of this approach is that it gives a simple analytic expression for the whole hornsurface, as long as it is terminated to a flat baffle.

A superellipse with a, b being a semi-major and semi-minor axis respectively is a set of all points satisfyingthe following equation (for x, y ≥ 0 in our case; n ≥ 2):

( za)

n

+( rb)

n

=1

11

Page 12: Ath · 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

To get an additive expression for our purposes it takes the following form:

r=b−b(1− zn

an)1n=b[1−(1− zn

an)1n]

With the semi-major axis equal to horn length (L) and the semi-minor axis to its arbitrary fraction (sL) itbecomes

r=s L[1−(1− zn

Ln )1n]

This form would already be usable but one minor helpful modification is still possible - typically it will bemore convenient to not include the whole quadrant of an arc since the very last portion would add nothingmore that a little bit of more o less straight line segment. For this purpose, to use a little bit less than thewhole quadrant, the parameter q (truncation coefficient) is introduced. This gives the final additivetermination term:

rTERM (z)= s Lq [1−(1−(q z

L )n)

1n ]

L length of the horn

s arc semi-minor to semi-major axes ratio, i.e. the amount of mouth flare

q truncation coefficient (typically ranging 0.99 - 1.00)

n superellipse exponent

The so far not examinated parameter n (superellipse exponent) mainly affects how far from the throat theterminating term becomes effective. Generally the higher the value, the more of the basic profile is conservedin the final shape.

To sum up, a smoothly terminated OS waveguide profile is described be the following formula

r (z)=rOS(z)+r TERM( z)=√r02+2 r0 tan (α 0)+z2 tan2(α )+ s L

q [1−(1−(q zL )

n)1n]

The following figures show the influence of the individial parameters on the resulting profile.

12

Page 13: Ath · 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

13

Page 14: Ath · 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

14

Page 15: Ath · 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

15

Page 16: Ath · 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

Morphing

There is a possibility of morphing the resulting surface defined by the guiding curve into another shape as amouth outline. It takes the existing surface and gradually morphs it for increasing z so that it reaches thetarget mouth outline at the full length.

At the moment two target outlines are supported -

a) rounded rectangle

b) circle

The morphing algorithm uses the following transformations:

rm(z ,ϕ )=r (z ,ϕ ) for z from <0, zf )

rm(z ,ϕ )=r (z ,ϕ )+( z−zf

L−z f)

p

(r M (ϕ )−r (L ,ϕ )) for z from <zf , L>

zf fixed part of the original shape that won't be modified be the transformation

r M (ϕ ) radius of the target mouth outline

p transformation progress exponent

As obvious from the above expressions the transformed profile has the following property:

rm(0 ,ϕ )=r (0 ,ϕ )=r0

rm(L ,ϕ )=rM (ϕ )

16