9

I teach an undergraduate course in Thermodynamics and I would love to use Mathematica to demonstrate the various engineering processes that involve the expansions and compressions of steam and common refrigerants such as R134a.

I know that wolfram alpha does provide steam data but I'd rather have this from Mathematica. I also do know that in the Mathematica guide (guide/ScientificAndTechnicalData), some data is available but it is generally viscosities, molecular formulae etc.

Is there any way I could get steam table data into/from Mathematica? Students generally use steam tables available in their textbooks and that is a fantastic starting point as I would never want to do away with that. However, using Mathematica would be a fantastic way of introducing my students to this wonderful tool that has helped me in my research.

This would be very transformative to the way steam tables are particularly viewed as (with general disdain among sophomores and junior level students)!

J. M.'s missing motivation
  • 124,525
  • 11
  • 401
  • 574
dearN
  • 5,341
  • 3
  • 35
  • 74
  • 1
    Not sure what data you want, but if you do a wolfram alpha query with Mathematica (just type == in a new input cell) click the + symbol of the data you want and select Computable data it gives a Mathematica expression to import that data. – ssch Jan 12 '13 at 03:11
  • So, your students are wanna be engineers wanting to use Mathematica. Please confirm. – Dr. belisarius Jan 12 '13 at 04:07
  • @belisarius ? You say that like its a bad thing... :P... They are not "wannabe" engineers as that is rather derogatory. They are budding engineers. I would like to familiarize them with mathematica. – dearN Jan 12 '13 at 13:26
  • 1
    @drN It was a joke. I forgot the :) - :D – Dr. belisarius Jan 12 '13 at 14:36
  • @belisarius OmG! the perils of forgetting smileys. It could start a war really!!!!! :P – dearN Jan 12 '13 at 14:37
  • @drN Yup. Most people around here know enough of my rather stupid sense of humor that sometimes I forget not everyone has already insulted me for such comments. – Dr. belisarius Jan 12 '13 at 14:42
  • @belisarius Sense of humor isn't stupid!!!! It's just dangerous....... boo! :P I think we should stop this back and forth stuff.... just for the greater good.. – dearN Jan 12 '13 at 14:47
  • @ssch To be specific steam table data - enthalpies, entropies, internal energies, saturation pressures/temperature. – dearN Jan 12 '13 at 16:02

2 Answers2

11

Wolfram|Alpha is integrated in Mathematica. Integration based on function WolframAlpha. To learn basic interactive and programmatic usage see this question. In your case you can get formatted objects in Mathematica like:

WolframAlpha["steam 135C", {{"PhaseDiagramTPPlot:ChemicalData", 1}, "Content"}, 
 PodStates ->{"PhaseComputedThermodynamicProperties:ChemicalData__More"}]

enter image description here

or get commutable data

data = WolframAlpha["steam 135C", 
  {{"PhaseComputedThermodynamicProperties:ChemicalData", 1}, "ComputableData"}, 
   PodStates -> {"PhaseComputedThermodynamicProperties:ChemicalData__More"}];

and compute with them:

Grid[data, Frame -> All, Alignment -> Left]

enter image description here

Units are integrated too - so quantities can be computed with units - for example

enter image description here

You have to have internet to be able to do this.

Vitaliy Kaurov
  • 73,078
  • 9
  • 204
  • 355
  • 1
    For years I have wondered why Wolfram hasn't included each steam table as an InterpolatingFunction. – Ted Ersek Jan 12 '13 at 11:45
  • This is a nice answer! I'll give this question another day or so at least though... thanks! – dearN Jan 12 '13 at 13:26
  • @VitliyKaurov Do you think I could get $P-v$ and $T-s$ diagrams instead of $P-T$ phase diagrams? I hope I am not asking for too much! :P – dearN Jan 12 '13 at 13:28
  • @VitaliyKaurov May I give credit to your important contribution to this answer (by linking this answer in my course webpage) when I discuss this with my students? – dearN Jan 13 '13 at 15:02
  • @drN Sure, use the answer as you wish. Btw, T-S, P-T digrams need to be in W|A - if they are not there you can request on W|A site to add that info via feedback form. Another way would be to extract points from P-V diagrams and do something with that - but I am sure how to go around with this. – Vitaliy Kaurov Jan 13 '13 at 20:31
  • @VitaliyKaurov Yes. I was thinking that. It would be quite an exercise extracting points though. Something I'll put my mind to on leaner days! Thanks! – dearN Jan 13 '13 at 21:21
  • @VitaliyKaurov How did you find the documentation on WolframAlpha? I couldn't find PhaseComputedThermodynamicProperties in the regular mathematica 9 help manual... – dearN Jan 16 '13 at 20:39
  • @drN You do not have to know that or find it anywhere. You get that code automatically from W|A interface in Mathematica. This is why I sent you 1st to another question on finance where it is explained. Please see that question. – Vitaliy Kaurov Jan 17 '13 at 00:59
  • Do you know if there is any way to change the language of the phase diagram labels? – Arturo García Flores Sep 28 '21 at 03:17
0

Without invoking Wolfram Alpha, you could use ThermodynamicData. In this case, for the water properties (steam tables) you would use ThermodynamicData["Water",...] You would need to read the documentation, as there are many properties. You can run ThermodynamicData["Properties"] to see the list of available properties. Worth pointing out that you can specify conditions (like specific enthalpy at such pressure and temperature. There are properties for other substances too, so it is not limited to steam tables.