Message Boards Message Boards

4
|
14243 Views
|
22 Replies
|
14 Total Likes
View groups...
Share
Share this post:

Error in ThermodynamicData - SoundSpeed (Mathematica 10)

Posted 10 years ago

ThermodynamicData["Water","SoundSpeed",{"Pressure"->Quantity[100,"MegaPascal"],"Temperature"->Quantity[300,"Kelvin"]}] returns 745.614 m/s.

WolframAlpha returns 1668 m/s.

NIST Chemical WebBook returns 1667.891 m/s.

POSTED BY: Glenn Carlson
22 Replies
Posted 10 years ago

Much better. Thanks

SoundSpeed_corrected.png

POSTED BY: Glenn Carlson

Its possible this result may be cached from earlier in your session (we do some saving of results from ThermodynamicData to speed up large repetitive calculations). I would try rerunning the calculation in a fresh session or kernel. You should see the correct results then.

POSTED BY: Jason Martinez
Posted 10 years ago

Yup. Answers are now correct (thanks for fixing), though incredibly slow. If I map over a list of several hundred temps it will timeout. Maybe your server is having issues? Maybe I should make a new topic or wait for the cobwebs to clear.

a[t_]:=UnitConvert[ThermodynamicData["Air","SoundSpeed",{"Pressure"->Quantity[15,"psi"],"Temperature"->Quantity[t,"DegreesRankine"]}],"ft/s"];

a/@Range[500,800,1]

ThermodynamicData::timeout: A network operation for ThermodynamicData timed out. Please try again later. >>
POSTED BY: Eric Meyers

Okay, I restarted the kernel and now it looks better apart from this message:

GeoPosition::invdtm: Unknown geodetic datum ___. Use GeodesyData["Datum"] for a list of available named datums. >>

Best wishes, Marco

POSTED BY: Marco Thiel

Marco,

Thank you for the reminder. This warning was in the ref/AirTemperatureData, Neat Examples, example since 10.0.0 was released.

A formal report to developers has been filed. An odd warning message does not have the Yipes! value that incorrect results do, so it might not be corrected as quickly.

Bruce

POSTED BY: Bruce Miller

Dear Bruce,

sure, that makes sense of course. I already mentioned in another thread that this ThermoDynamicData issue is an example of very swift bug fixing.

Thanks a lot, Marco

POSTED BY: Marco Thiel

As the Technical Engineer promised, we were able to correct this in our latest push to production. Which was this afternoon. This will resolve all of the incorrect SoundSpeed results. The documentation errors I'm told should be resolved in the next documentation update which is planned in the next week or so.

Sorry for the inconvenience and thank you for bringing this to our attention.

POSTED BY: Jason Martinez

Yes, this is much better. But what is wrong with Colorado Springs?

Grid[SortBy[{#, 
     ThermodynamicData["Air", 
      "SoundSpeed", {"Temperature" -> AirTemperatureData[#], 
       "Pressure" -> AirPressureData[#]}]} & /@ 
   CityData[{Large, "Colorado", "UnitedStates"}], Last], Frame -> All]

enter image description here

Cheers, Marco

POSTED BY: Marco Thiel
Posted 10 years ago

Response from Wolfram to my followup email:

"The current plan is to have monthly release of Mathematica. The fix should hopefully be incorporated into the upcoming Mathematica 10.0.1. We don't have an explicit date yet, but that should happen in weeks."

POSTED BY: Glenn Carlson
Posted 10 years ago

Received an email this evening from a Wolfram Technology Engineer saying, "[the] development team... have found out the parsing error which is causing the issue. Since this issue is caused by our data server, the problem should be resolved by the upcoming production push."

Thanks for the prompt fix.

POSTED BY: Glenn Carlson
Posted 10 years ago

I thought it might be that Mathematica was missing the phase transition, but problem seems to be across entire (p,T) domain.

Compare output of ThermodynamicData with Diagram of the speed of sound of Water and Steam

enter image description here

c[p_, t_] :=  ThermodynamicData["Water",   "SoundSpeed", {"Pressure" -> Quantity[p, "Bar"],  "Temperature" -> Quantity[t, "DegreeCelsius"]}]; ContourPlot[Evaluate[c[p, t]][[1]], {t, 0, 800}, {p, 0, 1000},  Contours -> 30, Frame -> True,  FrameLabel -> {"T [\[Degree]C]", "P [bar]"},  PlotLabel -> "Sound Speed in Water [m/s]\[NewLine](ThermodynamicData, Mathematica 10.0)", PlotLegends -> Automatic, ColorFunction -> (ColorData["TemperatureMap"])]
POSTED BY: Glenn Carlson
Posted 10 years ago

Glenn, how long did it take of this plot to run on your machine? Mine's been working on it for over 10 minutes. I'm on OS X 10.7.5

POSTED BY: Eric Meyers
Posted 10 years ago

Run times vary widely for me (5 minutes - 55 minutes). My machine is very new and fast with lots of RAM. I think my bottleneck is my slow internet speed. Recreated or modified plots run much more quickly (data caching?)

POSTED BY: Glenn Carlson
Posted 10 years ago

I've been writing a package that calculates steam properties according to IAPWS-97 methodology. I expect I will continue with this work.

POSTED BY: Glenn Carlson

Gentlemen,

Thank you for pointing out this problem. I filed a report for developers.

p.s. If 10.0 customers find problems with other *Data functions, please start new threads.

POSTED BY: Bruce Miller
Posted 10 years ago

Thank you, Mr. Miller.

Can you describe the process for distributing a fix to this problem?

Also, I understand the devil is in the details, but what is the timeframe to get the fix? Should we be thinking weeks or months?

Thanks again.

POSTED BY: Glenn Carlson

Mr. Carlson,

About updating:
The data paclet servers will be updated. In the "old days" I would have recommended looking in the directories given by

$BaseDirectory

and

$UserBaseDirectory

for Paclet directories, and deleting them.

It appears that now the easy way to get data updates is to make sure the "Automatically check for data updates" line is checked in Preferences - Automatic Updates - Data Updates. (Experts feel free to correct me.)

enter image description here

POSTED BY: Bruce Miller

Also, there is an example in the documentation of the function AirTemperatureData:

Grid[SortBy[{#, 
     ThermodynamicData["Air", 
      "SoundSpeed", {"Temperature" -> AirTemperatureData[#], 
       "Pressure" -> AirPressureData[#]}]} & /@ 
   CityData[{Large, "Colorado", "UnitedStates"}], Last], Frame -> All]

It gives:

enter image description here

This suggests that there is a real problem.

M.

POSTED BY: Marco Thiel
Posted 10 years ago

I use Mathematica for consulting work in optics and applied physics. This looks like a REAL problem.

POSTED BY: David Keith
Posted 10 years ago

I don't think it's just water. Speed of sound appears wrong for other fluids. I spot checked air and oxygen and they are off by a factor of 2, just like your example ..

UnitConvert[ThermodynamicData["Air","SoundSpeed",{"Pressure"->Quantity[15,"psi"],"Temperature"->Quantity[519,"DegreesRankine"]}],"ft/s"]

Returns 499.488 ft/s. Answer should be ~ 1117 ft/s

POSTED BY: Eric Meyers

Mr. Meyers,

Please check your code. Did you actually have

"Temperature">Quantity
POSTED BY: Bruce Miller
Posted 10 years ago

No I didn't. I repaired.

The incorrect results remains unchanged though. It seems all speed of sounds are coming back incorrect. Might be worth looking into.

POSTED BY: Eric Meyers
Reply to this discussion
Community posts can be styled and formatted using the Markdown syntax.
Reply Preview
Attachments
Remove
or Discard

Group Abstract Group Abstract