Message Boards Message Boards

0
|
1238 Views
|
0 Replies
|
0 Total Likes
View groups...
Share
Share this post:

How to convert a unit to a combination of physical constants?

I am interested in the subject of natural units and dimensional analysis. I have created a Wolfram Function PlanckUnitConversion for converting physical quantities to planck units and submitted another function for Stoney units but I would like to create a generalized natural unit conversion that takes a unit as input, for example 5 Ω siemens and a list of physical constants used to define the natural unit system and outputs the unit as a combination of the physical constants.

For example, entering the diameter of an electron and the planck constant, the gravitational constant, the boltzmann constant, and the speed of light would be equivalent to using PlanckUnitConversion with the diameter of an electron. I can transform an equation with Nondimensional transform, which includes different unit systems including

  • DeSitterUnits
  • GaussianNaturalUnits
  • GaussianQuantumChromodynamicsUnits
  • HartreeAtomicUnits
  • LorentzHeavisideNaturalUnits
  • LorentzHeavisideQuantumChromodynamicsUnits
  • PlanckUnits -RydbergAtomicUnits
  • StoneyUnits

This function can only be used with QuantityVariable equations and I would like to create a similar function for Quantity functions. I would include a default SI unit conversion. I first find the dimensional combinations of the physical constants input. For example, if I type {plancksconstant, speedoflight, gravitationalconstant, electriccharge, boltzmannconstant) and 777 farads I need to find a combination of these constants that is dimensionally equal to the dimensions of electrical capacitance.

I would like to accept PhysicalConstants as set string arguments or Physical Constant entities or if the user misspells the string and has an Internet connection the interpreter for a physical constant. I am wondering how to find a dimensional combination of physical constants equal to a physical quantity.

DimensionalCombinations accepts strings, QuantityVariables, and PhysicalQuantity entities but not physical constants, and the strings accepted do not include "PlanckConstant", "ElectricConstant", "MagneticConstant", etc.

The second parameter for DimensionalCombinations dim cannot be a physical quantity.

I have tried using the technique of dimensional analysis and the examples on the Wikipedia page for this and the Buckingham Pi theorem. My approach involves taking a list of physical quantities or constants and generating a vector for the dimensions and then computing the kernel for the matrix of the vectors.

The problem I have encountered is that UnitDimensions returns something such as {{"LengthUnit",1},{"TimeUnit",-1}} for meters per second but sometimes I need something such as {{"LengthUnit",1},{"TimeUnit",-1},{"MassUnit",0}} all the way up to all seven quantiies of time, mass, length, electric current, absolute thermodynamic temperature, amount of substance, and luminous intensity.

I have created a function that will output a vector such as sorted in alphabetical order : {{"AmountUnit", 0}, {"ElectricCurrentUnit", 0}, {"LengthUnit", 1}, {"LuminousIntensityUnit", 0}, {"MassUnit", 0}, {"TemperatureUnit", 0}, {"TimeUnit", -1}} I would also like to create a function that lets you choose which dimensions to include, for example, if luminous intensity was not part of the problem, the function would output: {{"AmountUnit", 0}, {"ElectricCurrentUnit", 0}, {"LengthUnit", 1}, {"MassUnit", 0}, {"TemperatureUnit", 0}, {"TimeUnit", -1}}

I would like to generate a matrix with the physical quantities in columns and the dimensions as rows: I have created a function that outputs a dimensionally equivalent combination of constants and another that converts a physical quantity to a combination of constants. I still have work to do if the system is over or under determined. I am now working to resolve a problem with Listable. I have a function that I am working on

ClearAll[NaturalUnitsPhysicalConstantsCustomSystemConversion];
SetAttributes[NaturalUnitsPhysicalConstantsCustomSystemConversion,Listable];
NaturalUnitsPhysicalConstantsCustomSystemConversion[physicalquantity_?QuantityQ,physicalconstants_List]:=Module[{constantcombination},constantcombination=Inner[Power,physicalconstants,Most[First[NullSpace[Transpose[Values/@Values[Join[AssociationMap[Join[Association[(#1->0&)/@UnitDimensions[physicalquantity][[All,1]]],Association[Apply[Rule,UnitDimensions[#1],{1}]]]&,physicalconstants],Association[physicalquantity->Join[Association[(#1->0&)/@UnitDimensions[physicalquantity][[All,1]]],Association[Apply[Rule,UnitDimensions[physicalquantity],{1}]]]]]]]]]],Times];UnitConvert[physicalquantity,constantcombination^(1/(UnitDimensions[constantcombination][[1,2]]/UnitDimensions[physicalquantity][[1,2]]))]]

The Listable attribute is supposed to allow for threading, but causes errors when the function is evaluated: enter image description here

I have a StoneyUnitConversion function.

POSTED BY: Peter Burbery
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