for each recognized symbol, associate that symbol with the ID in the PDG.
for each symbol ID in the PDG, determine the dimensions of that variable.
for each symbol, create a new "_dim" variable for the dimensions based on the lookup table in the PDG
F = sympy.physics.units.mass * sympy.physics.units.length / (sympy.physics.units.time**2) m = sympy.physics.units.mass a = sympy.physics.units.length / (sympy.physics.units.time**2)
I wanted to avoid manually entering the AST, sympy.physics.units.systems.si.dimsys_SI.equivalent_dims(F_dim, m_dim * a_dim) This conversation https://groups.google.com/d/msg/sympy/_RnbbOqhERM/dehog-xpAgAJ led to import sympy from sympy.physics.units import mass, length, time from sympy.physics.units.systems.si import dimsys_SI from sympy.parsing.latex import parse_latex convert the Latex string into SymPy expression eq = parse_latex("F = m a") specify the dimension of each symbol F = mass * length / time**2 m = mass a = length / time**2