Hornresp

I would suggest the best way would be to figure out the difference in end correction, and change the length of the port accordingly. I.e. if the rectangular port has an end correction of 3cm, and the equivalent circular port has an end correction of 4cm, shorten the port in the simulation by 1cm. I have some equations by Mechel (Formulas of Acoustics), I can scan them and post them here.

Many thanks Bjørn.

Kind regards,

David
 

Attachments

  • Endcorrection-calc_Mechel-Notes.JPG
    Endcorrection-calc_Mechel-Notes.JPG
    592.6 KB · Views: 244
Hello David,

I was trying to use Hornresp in emulation, namely Wine.

I can get most of the apps I want to run like WiniSd, etc, but with yours it opens the splash image of Hornresp, then opens a window stating: "Hornresp cannot find font Courier New".

I'm no programmer, but couldn't Hornresp just use the default font for the system instead of calling for a dedicated font?

It would prevent needing to turn off the Mac side, then run the Windows side, then restart again in the Mac.... ;)

Anyway, just commenting on this otherwise great piece of software that I am trying to learn!
 
Yes, I could go either with Fusion or CrossOver, but I am trying to keep my systems light and separate, if possible.

I like the footprint and ease of use from Wine. Also, Wine is free. I don't play games and only use Wine for a very few Windows apps, but no worries. I'll continue my little games with operating systems! :)
 
I'm no programmer, but couldn't Hornresp just use the default font for the system instead of calling for a dedicated font?

Hi perceval,

The "Courier New" font is specified in a number of places in the Hornresp source code because it is a fixed-width rather than a proportionally-spaced font. It is used to ensure that the chart axis values, the Help File text, printed hard copy results, etc, are all neatly formatted and presented. It must be possible to get around the problem because I know that there are people who successfully use Hornresp with Wine. Presumably they load the "Courier New" font onto their machines somehow.

Kind regards,

David
 
I successfully ran Hornresp recently on an old laptop using Xubuntu Linux and Wine.
I used Xubuntu to replace an out of date Windows XP installation.
I installed the Ubuntu restricted extras first. This includes the ttf-mscorefonts-installer
Mscorefonts installs the Courier New font. :)
 
Hi Kurt,

Thanks a lot for the answers. Kolbrek, thanks for the formulas. I seem to get a surprising result for a 1:10 I get a correction of 8.7, with -0.3 from the first part, so if I have a slot of 2 cm versus 20 cm, I should add more than 17 cm to the physical length, is that it?

It seems that for the end correction for the rectangular duct, you need to use the entire formula, and not just the first term. Otherwise it becomes negative. Sorry for the confusion, I had just assumed the other terms were higher order corrections for better accuracy, as it is for the circle.

I attach a plot of dl/a for aspect ratios of 1 to 20 (beta = 0.05 to 1). The green ring is the end correction for a circular opening, for a = 1. Remember that the 'a's are different in the two cases, for the circular duct it is the radius, for the rectuangular duct, HALF the length of the shortest side.

I just did some tests to check this out. So here's the algorithm:
aa = shortest side of rectangular duct
bb = longest side of rectangular duct
ac = sqrt(aa*ab/pi) (= radius of equivalent circular duct)
beta = aa/bb
dla = end correction factor of rect. duct from Mechel's formula
ec_r = dla*aa/2 (= end correction of rect. duct, will always be smaller than for the circular duct of equivalent area, but very close for aspect ratios close to 1:1)
ec_c = 8/(3*pi)*ac (= end correction of eq. circ. duct)
Lsim = Lphys+ec_r-ec_c (= equivalent length to use in simulation)

I tested this (in my own SW, which can simulate rectangular horns) with a 50cm long duct with S = 100cm2 and aspect ratio 10. Lsim turned out to be 48.76cm, which gave the same resonance frequency as the 50cm rectangular duct.

-Bjørn
 

Attachments

  • EndCorr.gif
    EndCorr.gif
    5 KB · Views: 208
  • rescomp.gif
    rescomp.gif
    14.2 KB · Views: 166
Hi perceval,

The "Courier New" font is specified in a number of places in the Hornresp source code because it is a fixed-width rather than a proportionally-spaced font. It is used to ensure that the chart axis values, the Help File text, printed hard copy results, etc, are all neatly formatted and presented. It must be possible to get around the problem because I know that there are people who successfully use Hornresp with Wine. Presumably they load the "Courier New" font onto their machines somehow.

Kind regards,

David

David, thanks a lot.

I figured out how to load fonts in Wine. That app has a bunch of dedicated folder tucked inside its own directory. In there was the folder "Font". I just had to copy the Courier New font from my Mac and presto! Got Hornresp going in Wine.

Back to learning and numbers crunching!
 
Hi Bjørn, just what I needed, many thanks

Hi Kurt,



It seems that for the end correction for the rectangular duct, you need to use the entire formula, and not just the first term. Otherwise it becomes negative. Sorry for the confusion, I had just assumed the other terms were higher order corrections for better accuracy, as it is for the circle.

I attach a plot of dl/a for aspect ratios of 1 to 20 (beta = 0.05 to 1). The green ring is the end correction for a circular opening, for a = 1. Remember that the 'a's are different in the two cases, for the circular duct it is the radius, for the rectuangular duct, HALF the length of the shortest side.

I just did some tests to check this out. So here's the algorithm:
aa = shortest side of rectangular duct
bb = longest side of rectangular duct
ac = sqrt(aa*ab/pi) (= radius of equivalent circular duct)
beta = aa/bb
dla = end correction factor of rect. duct from Mechel's formula
ec_r = dla*aa/2 (= end correction of rect. duct, will always be smaller than for the circular duct of equivalent area, but very close for aspect ratios close to 1:1)
ec_c = 8/(3*pi)*ac (= end correction of eq. circ. duct)
Lsim = Lphys+ec_r-ec_c (= equivalent length to use in simulation)

I tested this (in my own SW, which can simulate rectangular horns) with a 50cm long duct with S = 100cm2 and aspect ratio 10. Lsim turned out to be 48.76cm, which gave the same resonance frequency as the 50cm rectangular duct.

-Bjørn

In the last sentence, did you "as the 50cm qudratic duct (1:1)"? Can I contact you directly perhaps?

-- Kurt
 
Possible error?

Hi David,

There may be an error in the Loudspeker Wizard pertaining to filling.

When I open the Filling window in the wizard, and enter 1 under Fr1 Segment 1 I get "Fr1 too large" (see: attached). This happens in the attached simulation, and in a number of others. The same error comes up while changing the filling in different stages, not just with the first entry under Fr1. Sometimes this error also comes up while in the Horn S1-S4 window changing segment length.

Thought I'll let you know.

Regards,
 

Attachments

  • Error_1.txt
    979 bytes · Views: 49
  • Wizard_01.jpg
    Wizard_01.jpg
    14.4 KB · Views: 157
There may be an error in the Loudspeaker Wizard pertaining to filling.

Hi Oliver,

Thanks for the feedback - it has prompted to me to think about things a little more :).

One of the techniques that I use to trap and mask invalid absorbent filling material results * is to assume that where the maximum SPL minus the minimum SPL (with filling material included) exceeds 60 dB across the 2000 hertz frequency range, then the result must be erroneous. While this works well for most cases, with a few design configurations (some tapped horns in particular) it is possible that the 60 dB limit can be exceeded even when the results are completely valid, which is what has happened in this case.

For your design example, note that if the Fr1 Segment 1 slider value is increased from 1 to 15, the SPL difference becomes less than 60 dB and a valid result is then displayed.

As a result of your post I am starting to think that rather than attempting to detect and mask invalid results it may be better to allow them to be displayed, thus avoiding the possibility of valid results also being masked under certain circumstances, as you have found. Genuine invalid results are usually quite obvious, and only occur when relatively high values of Fr1 are specified, so that this relaxation of conditions should not pose a problem in practice.

I will do some more testing with the error detection disabled to see if any other unforeseen problems arise, before committing to making changes. Perhaps I could show all results, but display a cautionary message whenever MaxSPL - MinSPL exceeds 60 dB?

* See Post #3924 for information on the limitations of the absorbent material model.

Kind regards,

David