Message Boards Message Boards


How to find physical quantities with the most dimensions

Posted 1 month ago
8 Replies
0 Total Likes

I am wondering how to find physical quantities with multiple dimensions.
The farad is the most complicated unit I know and has dimensions of mass, length, time, and electric current.
I have found an example in the documentation for PhysicalQuantity that plots the physical quantities with the greatest sum of the powers of the dimensions
and there are some interesting physical quantities including the "WiedemannFranzLawRatio" which has five dimensions but I am wondering if there is a way to do something similar but with the total number of dimensions instead of the sum of the powers of the dimensions.

I am interested in dimensional analysis and am working on a resource function and finding a physical quantity that has five, six, or even seven dimensions would make testing my dimensional analysis function easier.

8 Replies


here is one simple way (counting is done in terms of SI-units):

constants = 
  EntityClass["PhysicalConstant", All][{EntityProperty["PhysicalConstant", "Name"], EntityProperty["PhysicalConstant", "Value"]}];
  With[{un = QuantityUnit@UnitConvert[#2]}, {#1, N@#2, un, 
      Length[Cases[un, _String, All] /. "DimensionlessUnit" -> Nothing]}] & @@@ constants, Last], Frame -> All]
POSTED BY: Henrik Schachner

How would I do it with Physical Quantities? I tried this, but it didn't work.

constants = 
    All][{EntityProperty["PhysicalQuantity", "Name"], 
    EntityProperty["PhysicalQuantity", "Value"]}];
  With[{un = QuantityUnit@UnitConvert[#2]}, {#1, #2, un, 
      Length[Cases[un, _String, All] /. 
        "DimensionlessUnit" -> Nothing]}] & @@@ constants, Last], 
 Frame -> All]
[@Henrik Schachner][at0] 

When I CopyAndPaste and run my code I just posted it works! Maybe try again with a fresh kernel. Or are you using an older version of Mathematica?

POSTED BY: Henrik Schachner

The output works but is not correct.


I have no idea what the problem with this specific piece of code could be (some invisible letter?). Anyway - please find attached my notebook with the respective code.

POSTED BY: Henrik Schachner

The code worked for physical constants I want to adapt the code for physical quantities, another entity type.

Ah, I see! Maybe so then:

units = DeleteMissing@
    EntityClass["PhysicalQuantity", All][
     EntityProperty["PhysicalQuantity", "NamedSIUnit"]];

  With[{un = QuantityUnit@UnitConvert[#]}, {#, N@#, un, 
      Length[Cases[un, _String, All]]}] & /@ units, Last], 
 Frame -> All]
POSTED BY: Henrik Schachner

@Henrik Schachner Is there a way to only query physical quantities with named SI units (the seven base units plus the 22 SI units with special names such as gauss and ohm) using something similar to "NamedSIUnit"?

Reply to this discussion
Community posts can be styled and formatted using the Markdown syntax.
Reply Preview
or Discard

Group Abstract Group Abstract