Welcome Guest! To enable all features please Login. New Registrations are disabled.

Notification

Icon
Error

Login


2 Pages12>
Options
Go to last post Go to first unread
Offline ElSid  
#1 Posted : 10 April 2018 17:40:58(UTC)
ElSid


Rank: Advanced Member

Groups: Registered
Joined: 05/03/2009(UTC)
Posts: 433
Man
United States
Location: USA

Was thanked: 17 time(s) in 15 post(s)
I think I need a program loop to get the graph to show up correctly. Suggestions?
Quick Sound Loss.smz (133kb) downloaded 47 time(s).

Edited by user 13 April 2018 08:19:33(UTC)  | Reason: Not specified

Wanna join the discussion?! Login to your SMath Studio Forum forum account. New Registrations are disabled.

Offline Jean Giraud  
#2 Posted : 10 April 2018 17:56:29(UTC)
Jean Giraud

Rank: Guest

Groups: Registered
Joined: 04/07/2015(UTC)
Posts: 6,868
Canada

Was thanked: 980 time(s) in 808 post(s)
Originally Posted by: ElSid Go to Quoted Post
I think I need a program loop to get the graph to show up correctly.Suggestions?

"Why does log10 look different ?"
because you have two different formulas, thus two different results
Offline ElSid  
#3 Posted : 10 April 2018 18:39:19(UTC)
ElSid


Rank: Advanced Member

Groups: Registered
Joined: 05/03/2009(UTC)
Posts: 433
Man
United States
Location: USA

Was thanked: 17 time(s) in 15 post(s)
Jean,
The second equation is off/not evaluated. Graphically log to base x and log10 display differently. Question is about graph though
Offline Davide Carpi  
#4 Posted : 10 April 2018 20:31:49(UTC)
Davide Carpi


Rank: Advanced Member

Groups: Registered, Advanced Member
Joined: 13/01/2012(UTC)
Posts: 2,639
Man
Italy
Location: Italy

Was thanked: 1323 time(s) in 873 post(s)
Strict math seems correct to me; let's compare the values for different directivity factors at ssame distance.

we have:
Code:
log(a/b)=log(a)-log(b)

to simplify things we can get rid of the absolute value; in your example all numbers are above 1, plus logarithms' arguments are <= 8 in numerator and >= 12 in denominator (4*pi*distance_greater_than_1), thus:
Code:
|10*log10(a/b)| = 10*(log10(b)-log10(a)) = 10*(log10(f(x))-log10(Q)) = 10*log10(f(x))-10*log10(Q)

at same distance, log10(f(x)) is the same for every directivity factor Q
Code:
10*log10(f(x))-10*log10(Q) = const-10*log10(Q)
10*log10(2)=3, 10*log10(4)=6, 10*log10(8)=9 (approx)
Lp(Q,x)=Lw(Q,1.5)-|10*log10(a/b)|=Lw(Q,1.5)-const+10*log10(Q)

Lw(Q,1.5) loses -3dB when you double Q, but at the same time the absolute value term adds +3B -> so why values are so close (and functions overlapped in the plot)

In fact, if you go further, you can do the same for Lw:
Code:
Lw(Q,dist) = Ltot+|10*log10(Q/f(dist))| = Ltot+10*log10(f(dist))-10*log10(Q) = const2-10*log10(Q)
Lp(Q,x) = Lw(Q,1.5)-const1+10*log10(Q) = const2-10*log10(Q)-const1+10*log10(Q) = const2-const1 = constant

and decimal shown in the workshet are only because different decimal places shown in the results

Edited by user 10 April 2018 22:17:02(UTC)  | Reason: typo

If you like my plugins consider to support SMath Studio buying a plan; to offer me a coffee: paypal.me/dcprojects
Offline Davide Carpi  
#5 Posted : 10 April 2018 20:50:48(UTC)
Davide Carpi


Rank: Advanced Member

Groups: Registered, Advanced Member
Joined: 13/01/2012(UTC)
Posts: 2,639
Man
Italy
Location: Italy

Was thanked: 1323 time(s) in 873 post(s)
What might be wrong...

You have sound pressure measured by the vendor -> You have to calculate the power level for the distance and directivity condition of the vendor

Then you have the sound power level of your source... it's a constant! Use this value to estimate the sound power at various distances for various directivity conditions!

2018-04-10 19_52_02-Sound.png
Quick Sound Loss - rev.1.sm (135kb) downloaded 41 time(s).

Edited by user 10 April 2018 20:53:37(UTC)  | Reason: Not specified

If you like my plugins consider to support SMath Studio buying a plan; to offer me a coffee: paypal.me/dcprojects
Offline ElSid  
#6 Posted : 10 April 2018 21:19:57(UTC)
ElSid


Rank: Advanced Member

Groups: Registered
Joined: 05/03/2009(UTC)
Posts: 433
Man
United States
Location: USA

Was thanked: 17 time(s) in 15 post(s)
Davide,
I did the same thing, where I assumed directivity is b=2 on Lw. I'll just document that and move on as the rest of the math appears to work out
Offline Jean Giraud  
#7 Posted : 10 April 2018 22:42:50(UTC)
Jean Giraud

Rank: Guest

Groups: Registered
Joined: 04/07/2015(UTC)
Posts: 6,868
Canada

Was thanked: 980 time(s) in 808 post(s)
Originally Posted by: ElSid Go to Quoted Post
Jean,
The second equation is off/not evaluated.Graphically log to base x and log10 display differently.Question is about graph though

Few more things you can do as real project.
Line style "splines" is a bit smoother in the low region.

SoundPressure.PNG

Quick Sound Loss - rev.2.sm (135kb) downloaded 35 time(s).

Offline ElSid  
#8 Posted : 10 April 2018 23:41:23(UTC)
ElSid


Rank: Advanced Member

Groups: Registered
Joined: 05/03/2009(UTC)
Posts: 433
Man
United States
Location: USA

Was thanked: 17 time(s) in 15 post(s)
Funny ...
OK, here I am as I had done most of the items that Davide and Jean added. Now I would like to add a "dot" or a vertical line where the dB.final is. Please use this sheet
Quick Sound Loss.smz (136kb) downloaded 34 time(s).

Jean, I did not see where you used a spline

All should I be using "cinterp" to place the "dot?

Edited by user 10 April 2018 23:45:56(UTC)  | Reason: Added question

Offline CBG  
#9 Posted : 11 April 2018 01:30:35(UTC)
CBG


Rank: Advanced Member

Groups: Registered
Joined: 14/10/2015(UTC)
Posts: 308

Was thanked: 77 time(s) in 58 post(s)
Something like this?


Sound.png

Quick Sound Loss - rev.1.sm (135kb) downloaded 35 time(s).


Best Regards

Carlos
Offline Jean Giraud  
#10 Posted : 11 April 2018 01:43:06(UTC)
Jean Giraud

Rank: Guest

Groups: Registered
Joined: 04/07/2015(UTC)
Posts: 6,868
Canada

Was thanked: 980 time(s) in 808 post(s)
Originally Posted by: ElSid Go to Quoted Post
Jean, I did not see where you used a spline

All should I be using "cinterp" to place the "dot?

1. spline is for line style ... line/spline.
2. what that gyzma #,#,#,,,does in maths ?
3. X_Y plot does not support " in your plot suggestion
4. X_Y is for final/final/final ... project
once done, if you rework something above=> it will freak the plot
X_Y plot has slightly pregnant memory. Doctored in red .

Quick Sound Loss (3).sm (141kb) downloaded 42 time(s).

Offline ElSid  
#11 Posted : 11 April 2018 02:45:59(UTC)
ElSid


Rank: Advanced Member

Groups: Registered
Joined: 05/03/2009(UTC)
Posts: 433
Man
United States
Location: USA

Was thanked: 17 time(s) in 15 post(s)
Originally Posted by: CBG Go to Quoted Post
Something like this?
Sound.png

Carlos,
I think you attached the wrong file. Yes, that is what I was looking for.

Jean,
When I double click the graph on your latest file, my computer locks up. I'm on version 0.99.6671.

NOW my file is locking up!!! ARRG

Edited by user 11 April 2018 03:26:26(UTC)  | Reason: Jean file locks up

Offline CBG  
#12 Posted : 11 April 2018 03:18:04(UTC)
CBG


Rank: Advanced Member

Groups: Registered
Joined: 14/10/2015(UTC)
Posts: 308

Was thanked: 77 time(s) in 58 post(s)
Ok, This is the right file


Quick Sound Loss (1)_r1.sm (141kb) downloaded 46 time(s).


Best Regards

Carlos
Offline Jean Giraud  
#13 Posted : 11 April 2018 04:38:04(UTC)
Jean Giraud

Rank: Guest

Groups: Registered
Joined: 04/07/2015(UTC)
Posts: 6,868
Canada

Was thanked: 980 time(s) in 808 post(s)
Originally Posted by: ElSid Go to Quoted Post
Jean,
When I double click the graph on your latest file, my computer locks up.I'm on version 0.99.6671.


My 6179 opens your 6671 ... your 6671 freezes opening 6179
Is it a bug ?
BTW, attach an image of the polynomials that fail [as you reported].

Sound3.PNG
Offline Jean Giraud  
#14 Posted : 11 April 2018 15:58:39(UTC)
Jean Giraud

Rank: Guest

Groups: Registered
Joined: 04/07/2015(UTC)
Posts: 6,868
Canada

Was thanked: 980 time(s) in 808 post(s)
Originally Posted by: Jean Giraud Go to Quoted Post
Few more things you can do as real project.

Thanks Elsid,
Nice project, saved for myself, you can have it as is.

Jean

SoundProject.PNG

Inst_dB Sound.sm (143kb) downloaded 33 time(s).
Offline ElSid  
#15 Posted : 13 April 2018 08:23:09(UTC)
ElSid


Rank: Advanced Member

Groups: Registered
Joined: 05/03/2009(UTC)
Posts: 433
Man
United States
Location: USA

Was thanked: 17 time(s) in 15 post(s)
Well, Here we go again ...
I found a quirk. Depending on values dB initial values, neither solve nor FindRoot is functional. I was plugging in values by hand without seeing an issue. I tried a "higher" dB set of values (86 vs 75) for equipment and the calculation *zap*
Quick Sound Loss.smz (169kb) downloaded 32 time(s).
Also, the X-Y plot legend information *ZAP*

Edited by user 13 April 2018 09:45:39(UTC)  | Reason: Not specified

Offline Jean Giraud  
#16 Posted : 13 April 2018 14:55:34(UTC)
Jean Giraud

Rank: Guest

Groups: Registered
Joined: 04/07/2015(UTC)
Posts: 6,868
Canada

Was thanked: 980 time(s) in 808 post(s)
Originally Posted by: ElSid Go to Quoted Post
Well, Here we go again ...
I found a quirk.Depending on values dB initial values, neither solve nor FindRoot is functional.I was plugging in values by hand without seeing an issue.I tried a "higher" dB set of values (86 vs 75) for equipment and the calculation *zap*

That one was Doctored and you don't use the Doctored version.
Explained before, if above X_Y something is Doctored, zap.

Quick Sound Loss (4) Doctored 20180413.sm (168kb) downloaded 38 time(s).



Offline ElSid  
#17 Posted : 13 April 2018 16:33:23(UTC)
ElSid


Rank: Advanced Member

Groups: Registered
Joined: 05/03/2009(UTC)
Posts: 433
Man
United States
Location: USA

Was thanked: 17 time(s) in 15 post(s)
Found the issue(s). See revamped file. Still having issues in that X-Y plot Labels for the legend *zap* Quick Sound Loss.smz (143kb) downloaded 61 time(s).
Edit: Two bugs
  1. X-Y Plot. If functions crash, *Zap* to the legend titles. All other titles OK. Legend is empty due to laziness after last 5 crashes
  2. solve(4) did not like trying to cancel units in the denominator of the final function (#dist). As I was adding units to x:0-100 FT and dividing the units meters in the function, the function crashed in the solve block (Just the function, with all values plugged in except for x = vector, so it's a solve(4) issue).
This is one of those sheets where UNITS are huge! The equations are all based off of SI/metric references. Major issue

There is additional documentation and function definition updates. Sanity check the graph x scale (adjusted for feet since I'm in the US). Should be good now

Edited by user 13 April 2018 20:37:55(UTC)  | Reason: Not specified

Offline Jean Giraud  
#18 Posted : 13 April 2018 17:38:07(UTC)
Jean Giraud

Rank: Guest

Groups: Registered
Joined: 04/07/2015(UTC)
Posts: 6,868
Canada

Was thanked: 980 time(s) in 808 post(s)
Originally Posted by: ElSid Go to Quoted Post
Found the issue.I'll post revamp file.Still having issues in that X-Y plot Labels for the legend *zap*

Clik on "list", edit "series name".

Offline ElSid  
#19 Posted : 26 January 2021 02:16:25(UTC)
ElSid


Rank: Advanced Member

Groups: Registered
Joined: 05/03/2009(UTC)
Posts: 433
Man
United States
Location: USA

Was thanked: 17 time(s) in 15 post(s)
Revisiting this old calc with SMath newer features and some function definitions.
  1. No longer works if I redefine the logarithmic sum with vectorize
  2. I cannot get the "heat capacity function" to work for ploting

Sound Loss (Quick).sm (477kb) downloaded 15 time(s).
Thanks for the help.

Edited by user 26 January 2021 02:55:57(UTC)  | Reason: Added attachement

Offline Razonar  
#20 Posted : 26 January 2021 03:34:45(UTC)
Razonar


Rank: Advanced Member

Groups: Registered
Joined: 28/08/2014(UTC)
Posts: 1,356
Uruguay

Was thanked: 815 time(s) in 516 post(s)
Hi. Some notes, but I'm not sure if this solve all of the issues:
1. Use count inside rangeindividual, but not outside. You use it in f(x, b ), and guess that could be problematic.
2. After that, you divide x by 'm in f and x by feet in rangeindividual, choose only one.
3. Maybe here don't affect, but if rangeindividual have not f(#,#) as parameter, define f before rangeindividual, you know, just in case.

Clipboard01.jpg

Best regards.
Alvaro.
thanks 1 user thanked Razonar for this useful post.
on 26/01/2021(UTC)
Users browsing this topic
Similar Topics
Calculating the speed of sound in wet steam (Questions)
by GerardLardner 25/03/2024 15:12:31(UTC)
Sound dB (Samples)
by ElSid 13/04/2018 20:40:30(UTC)
Sound dB again (Samples)
by Jean Giraud 12/04/2018 07:26:44(UTC)
2 Pages12>
Forum Jump  
You cannot post new topics in this forum.
You cannot reply to topics in this forum.
You cannot delete your posts in this forum.
You cannot edit your posts in this forum.
You cannot create polls in this forum.
You cannot vote in polls in this forum.