Finding Physical Relationships via Dimensional Analysis

+- HP Forums (https://www.hpmuseum.org/forum)
+-- Forum: HP Software Libraries (https://www.hpmuseum.org/forum/forum-10.html)
+--- Forum: HP Prime Software Library (https://www.hpmuseum.org/forum/forum-15.html)
+--- Thread: Finding Physical Relationships via Dimensional Analysis (/thread-24697.html)



Finding Physical Relationships via Dimensional Analysis - chromos - 2026-02-13

Many physical laws can be expressed as a power-law dependence of individual physical variables, typically taking the form:
$$U^\alpha \cdot V^\beta \cdot W^\gamma$$
Dimensional analysis provides a rigorous mathematical method to derive these proportional relationships between different physical quantities.

The DimDiscover program automates this procedure. Based on a provided set of base physical quantities, it computes and displays all dimensionally consistent combinations.

Example 1:
Let us determine the formula for the period of a simple pendulum. We hypothesize that the period might depend on the pendulum's length, its mass, and the acceleration due to gravity.

Thus, we input the following sequence into the program: l [m], Add Another, m [kg], Add Another, g [m/s^2], DISCOVER!.

The program outputs all dimensionally valid combinations of these inputs. The very first line yields the correct proportionality for the pendulum's period: t ∝ √l * 1/√g [s]. Notice that the period is independent of the mass, a characteristic feature of kinematics in a uniform gravitational field.

Example 2:
We require the relationship for the phase speed of a surface wave in deep water. We hypothesize it depends on the wavelength, the density of the fluid, and the acceleration due to gravity.

We input: l [m], Add Another, ρ [kg/m^3], Add Another, g [m/s^2], DISCOVER!.

The program again outputs the valid dimensional combinations. The third line provides the correct relationship for the wave speed: v ∝ √l * √g [m/s]. We can observe that the wave speed is completely independent of the liquid's density.

Note: Dimensional analysis can exclusively determine proportionalities, not exact equalities. To obtain the complete physical equation, the resulting expression must always be multiplied by a dimensionless constant. This constant might be 1, 2π (as in the first example), 1/√(2π) (as in the second example), and so forth.

Note 2: The current iteration of DimDiscover evaluates relationships among 28 hardcoded physical quantities. However, it is a straightforward process to expand the program's database by defining additional physical variables directly within the source code.

Finally, I am attaching a screenshot demonstrating the output for Planck scale quantities.
   


RE: Finding Physical Relationships via Dimensional Analysis - chromos - 2026-02-14

Update: The new version of DimDiscover has been attached to the first post.


Changelog:
  • Fixed a bug where linearly dependent basis sets caused incorrect exponent parsing.
  • Redesigned the formula string builder. Negative exponents are now automatically routed and grouped into a unified denominator (e.g., rendering A / (B · C) instead of the previous A * 1/B * 1/C).
  • Slightly reworked the physical quantity database structure and expanded it to 38 definitions. It is now easier to add, insert, or remove entries.

   


RE: Finding Physical Relationships via Dimensional Analysis - chromos - 2026-02-16

Update: The new version of DimDiscover (now v.1.5) has been attached to the first post.

Changelog:
  • Introduced Dual Execution Modes (Composition vs. Decomposition):
  • Decomposition Mode (1 variable selected):
    Selecting a single variable now automatically triggers a decomposition analysis. The engine will scan the entire database to find any pair of independent variables that can dimensionally construct the selected target.
  • Composition Mode (>1 variables selected):
    Selecting multiple variables treats them as a basis set. The engine now evaluates all possible combinatorial subsets (via bitmasking) of your selected basis to discover which other physical quantities can be synthesized from them.
  • Extended Algebraic Formatting:
    Expanded the maximum depth for fractional exponents and roots from 9 to 15. The engine can now successfully format and display more complex dimensional relationships (e.g., using ¹⁰ ... ¹⁵ and corresponding roots).



RE: Finding Physical Relationships via Dimensional Analysis - cdmackay - 2026-02-16

Thank you!

I've not had time to play with this yet, but hope to soon.