Message Boards Message Boards

1
|
14217 Views
|
3 Replies
|
3 Total Likes
View groups...
Share
Share this post:

How to access Physical Constants in Mathematica 9.0?

Posted 11 years ago
I need some clarification on the documentation here as I'm missing something.

In version 9.0 of Mathematica the "physical constant functionality is built in"  to quote from the guide.  If I load the PhysicalConstants package I get a helpful warning telling me that it is now obsolete; if I don't load it  then none of the physical constants are defined.  

How do I access the built in Physical Constants capability of version 9.0?

The command:
<<PhysicalConstants`;
Produces the message:
General::obspkg: PhysicalConstants` is now obsolete. The legacy version being loaded may conflict with current Mathematica functionality. See the Compatibility Guide for updating information.
Reading the compatibility guide did not provide me with any insight.
3 Replies
With version 9 physical constants are included in the system with units as a "Quantity".  For instance, to input Planck's constant you type:
Quantity["PlanckConstant"]
This form can be discovered using an inline Wolfram Alpha query.  To get this you type ctrl+= and then input some free-form version of your query.

Note that I misspelled "Planck" and the Alpha query still worked.  Alpha is pretty good at determining your intention.  

I would prefer a palette for inputting these constants as well as for units.  I have written such a palette for units and described it in a recent post here, with a download link for that palette here
POSTED BY: Terrence Honan
Ahh... The light dawns. Thank you! It's so easy when you know how. My transition would have been easier had I found a comparison between using Constants in version 8 and Units in version 9 in the documentation. I had not made the link that a unit could be a constant or vice versa but it makes sense now.
You can still use the <<PhysicalConstants` package in Mathematica 9 if you would like. 

There is no new PhysicalConstants package, but instead the Quantity framework, which handles all kinds of different units and constants.  See the documentation on Quantity for more information. 
POSTED BY: Sean Clarke
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