The timbre of the pipa, a traditional plucked Chinese music instrument, is characterized by nuanced inharmonicity resulting from peculiarities of regionally distinct string composition and construction. This paper investigates the relationship between string physical construction and the resulting inharmonicity in the sounds produced by the traditional silk and modern Beijing and Shanghai metallic strings. Inharmonicity occurs in string instruments primary due to stiffness of the strings, and is commonly analyzed using Fletcher's inharmonicity formulation based on the Euler-Bernoulli stiff-string physical model. While this formulation accurately predicts partial shifts observed in the solid-core steel Beijing strings throughout the audible frequency range, it fails to accurately predict the partial shifts observed in the stranded-core steel Shanghai and traditional silk strings beyond about 8 kHz. An alternate formulation of inharmonicity is developed based on the Timoshenko beam physical model, which accounts for not only stiffness, but also rotary inertia and shear deformation within the string. Inharmonic partials derived from this formulation are verified by comparing against spectra of pipa recordings, and it is found that the Timoshenko-based formulation is capable of predicting the observed inharmonicity across all pipa string types. The unusual inharmonicity of the silk and Shanghai strings above 8 kHz is explained by the shear deformation properties of the string materials and construction, which limit the phase velocities supported by the strings and hence limit the inharmonic frequency shifts of the upper partials. In the case of the solid-core steel Beijing string, the shear deformation limit is beyond the audible frequency range, so the Euler-Bernoulli based formulation is adequate to explain its inharmonicity. In the case of the stranded steel Shanghai and twisted silk strings, whose physical shear moduli are 1-2 orders of magnitude smaller than that of the solid-core steel Beijing string, the shear deformation influences inharmonicity within the audible frequency range. For these strings (and generally for strings with relatively lower shear moduli), the Timoshenko-based formulation of inharmonicity should be used.