2
$\begingroup$

There is a wealth of data for various chemicals available through Mathematica. For instance:

ChemicalData["Water", "Density"]
(* 1000. kg/(m)^3 *)

Module[{formula = ChemicalData["Water", "Formula"],
plot = ChemicalData["Water", "MoleculePlot"]}, Labeled[plot, formula, Bottom, Frame -> True]]

enter image description here

How does one ask for property data at specific conditions (i.e., temperature, pressure, phase, etc.)? I've been looking through the Wolfram help and tutorials, but I haven't run across this particular case.

It seems like this should be possible using queries to Wolfram Alpha as well, but I'd rather take advantage of native Mathematica functionality if it's available.

$\endgroup$
  • 1
    $\begingroup$ related: mathematica.stackexchange.com/questions/17653/… $\endgroup$ – george2079 Feb 11 '15 at 15:03
  • 2
    $\begingroup$ The ChemicalData help page states: If not otherwise specified, physical properties are given for standard temperature and pressure. This may imply that properties for other conditions are not available. $\endgroup$ – Sjoerd C. de Vries Feb 11 '15 at 15:31
  • $\begingroup$ You could try asking W|A and then convert to Mma code to see if it is possible. $\endgroup$ – Mike Honeychurch Feb 11 '15 at 21:48
3
$\begingroup$

What you want here is ThermodynamicData. The available properties are

ThermodynamicData["Properties"] 

(* {"CriticalDensity", "CriticalEnthalpy", "CriticalEntropy", 
"CriticalInternalEnergy", "CriticalPressure", "CriticalTemperature", 
"Density", "Enthalpy", "Entropy", "InternalEnergy", 
"IsobaricHeatCapacity", "IsochoricHeatCapacity", 
"LiquidVaporPhaseBoundary", "MolarDensity", "MolarEnthalpy", 
"MolarEntropy", "MolarInternalEnergy", "MolarIsobaricHeatCapacity", 
"MolarIsochoricHeatCapacity", "MolarSpecificVolume", "Name", "Phase", 
"SolidLiquidPhaseBoundary", "SolidVaporPhaseBoundary", "SoundSpeed", 
"SpecificVolume", "ThermalConductivity", "TriplePointGasDensity", 
"TriplePointLiquidDensity", "TriplePointPressure", 
"TriplePointSolidDensity", "TriplePointTemperature", "Viscosity"} *)

But not all of those are functions of temperature or pressure. There is a list of properties which depend on these parameters in the documentation, but below I just filter them out.

propertiesTP = 
  ThermodynamicData["Properties"] // 
   DeleteCases[_?(StringMatchQ[#, 
        "Critical*" | "Triple*" | "*Phase*" | "Name"] &)];

temps = Quantity[Range[0, 99], "DegreesCelsius"];
ListLinePlot[
   Thread[
    {temps,
     ThermodynamicData["Water", #, {"Temperature" -> temps}]}
    ], AxesLabel -> Automatic, PlotLabel -> #, 
   ImageSize -> 250] & /@ propertiesTP

Mathematica graphics

$\endgroup$
2
$\begingroup$
density = 
 Table[{i, 
   WolframAlpha[
    StringJoin["Water Density ", ToString[i], 
     " celsius"], {{"Result", 1}, "NumberData"}]}, {i, 1, 99}]

ListPlot[density, PlotTheme -> "Scientific", 
 FrameLabel -> {"Temperature (C)", "Density kg/m3"}, 
 PlotLabel -> "Water Density vs Temperature"]

enter image description here

$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.