Acoustic Horn Design – The Easy Way (Ath4)

It seems as if CircSym (see 6.10 in the User Guide)is no longer supported in ATH 4.9 221115.

The ATH script gets stuck at the gmsh stage. There's a truckload of errors in gmsh, most of them of this type, with some more compex models I've had gmsh crash altogether:

1685540063982.png


When I put a semicolon in front of:
Code:
ABEC.SimProfile = 0
the script runs fine, but I'm back to long solving times in ABEC. Has the CircSym command been replaced by a new one?
 
I just tried it with 4.9.0 pre 230518, still the same result. Here's the script, it still runs without issue if I remove, or put a semicolon in front of "ABEC.SimProfile = 0".

Code:
Throat.Profile = 1
Throat.Diameter = 25.4         ; [mm]
Throat.Angle = 0             ; [deg]
Coverage.Angle = 50            ; [deg]
Length = 70                    ; [mm]

Term.s = 2
Term.n = 3.6
Term.q = 1

; -------------------------------------------------------

Mesh.AngularSegments = 64
Mesh.LengthSegments = 40

;Mesh.ThroatResolution = 4.0     ; [mm]
;Mesh.InterfaceResolution = 8.0  ; [mm]
;Mesh.InterfaceOffset = 5.0      ; [mm]

; -------------------------------------------------------

ABEC.SimProfile = 0
ABEC.SimType = 1
ABEC.f1 = 250 ; [Hz]
ABEC.f2 = 20000 ; [Hz]
ABEC.NumFrequencies = 100
ABEC.MeshFrequency = 40000 ; [Hz]

ABEC.Polars:SPL = {
  MapAngleRange = 0, 90, 19
  NormAngle = 0    ; [deg]
  Distance = 3      ; [m]
  Offset = 0       ; [mm]
}

; -------------------------------------------------------

GridExport: = {
  ExportSlices=1
  ExportProfiles=1
}


Output.SubDir = "demos"
Output.STL = 1
Output.ABECProject = 1


Report = {
 Title = "Demo"
 NormAngle = 10
 Width = 1024
 Height = 768
 SPL_Range = 50
 MaxRadius = 90
 PolarData = "SPL"
}
 
Member
Joined 2004
Paid Member
Set Output.STL = 0.
There must be some bug in the STL output. You don't need that...

I also recommend to delete/comment out the Offset in ABEC.Polars (zero will lead behind the baffle):
Code:
ABEC.Polars:SPL = {
  MapAngleRange = 0,90,19
  NormAngle = 0    ; [deg]
  Distance = 3      ; [m]
  ; Offset = 0       ; [mm]  <-- must be set properly or removed altogether (it's set automatically now)
}

BTW, this is the result I get:

1685548758528.png
 
Last edited:
Member
Joined 2004
Paid Member
I've updated the latest build on my website.

It's now possible to
1) Plot the FRs with increasing SPL offset to better visualize the individual polars
2) Use NormAngle = 1000 to normalize to a listening window average (<=20 deg off-axis)

Report = {
Title = "Demo"
NormAngle = 10 ; <-- set to 1000 for LW normalization
Width = 1400
Height = 900
SPL_Range = 50
MaxRadius = 90
PolarData = "SPL"
OffsetFR = 1 ; [dB]
}

1685551798999.png
 
  • Like
Reactions: 2 users
Use this one instead
@fluid,

Sorry - quick related question. When I specify the script below in ATH input, I get a waveguide generated with an overall diameter of 186.49mm.
1685585526419.png

Output:
1685585556906.png


However, when I specify the same input in the desmos calculator linked above, I get an overall radius of 91.838 (or diameter of, 183.676):
1685585878230.png


Now, the delta between the ATH output of 186mm vs Desmos ouput of roughly 183mm is awfully small (spliting hair almost) - but just to confirm I'm not doing anything wrong - should they be exact?
 
@maiky76 I've found someone who's already tried what I'm looking for! It's hard to get much information from what you've written. Can you share more about your project?
Here is an outline of what my optimizer is doing. I can use both Matlab or Octave.

I use Matlab / Octave to
1. generate a cfg file, fprintf.m
2. call ATH to generate the ABEC project code here
3. call ABEC to solve the project, similar code but you'll need light GUI automation to execute the commands and export to TXT
4. read the results, importdata.m
5. cook a metric that where the fun is. Some code to help for post-processing can be found here

It is all made within a GA algorithm to guide the optimization over hours (at night) or days (over the WE).
Typical outpout:
https://www.diyaudio.com/community/...he-easy-way-ath4.338806/page-575#post-7237263

With Matlab I use custom ga but the built-in function works perfectly fine.
GA also work in Octave but the syntax is different and it far less advanced.
If you have access to Matlab I would suggest to stick with as it will save you a lot a trouble/time.
I have done it with both sw but proceeded the hard way with Octave but it was part of my fun...
 
Last edited:
  • Like
Reactions: 1 user
Member
Joined 2004
Paid Member
Now, the delta between the ATH output of 186mm vs Desmos ouput of roughly 183mm is awfully small (spliting hair almost)
That would be an awfully large delta if everything else was the same :)
The results should be the same to many decimal places...

Speaking of this, I should probably implement a diameter rounding to the nearest mm, e.g. by an automatic adjustment of q.
 
Last edited:
First as I tried in AKABAK, I need to set up somethings more, but in ABEC it was really smooth workflow. Even now I could find nice graphs I'd seen in this thread. However, I got some error that DI doesn't appear. I just used ATH-DOME-Template cfg by Fluid and Just F5, ctrl+F7 in ABEC3, cfg -r in ATH.
How could I solve this?
KakaoTalk_Photo_2023-06-01-15-31-12.png
KakaoTalk_Photo_2023-06-01-15-31-20.png
 
Member
Joined 2004
Paid Member
For these graphs to work properly I think it's necessary to have the polars 0-180/5 like this:

ABEC.Polars:SPL = {
MapAngleRange = 0,180,37
; ...
}

(With the ATH-DOME template I switched to -120->120 temporarily, but that was only because Purifi presented the data in that format. I also presented the data directly from VACS for that purpose...)
 
Last edited:
  • Like
Reactions: 1 user