In thermodynamics, repeating variables are typically found using the Buckingham Pi theorem. This theorem is used to determine the number and form of dimensionless quantities in a problem. You identify a set of fundamental dimensions, then select any variables until all fundamental dimensions are present.