def maxAmpP2P(RPM):
    """based on RPM this will give the maximum amplitude based on 5g's acceleration
    This function is used to calculate minimum clearance (in) with moving parts
    
    Derivation
    F=m*a=m*omega^2*r-->a=omega**2*r=5*g-->r=5*g/omega^2
    omega=RPM*2*pi/60#convert from radial velocity to RPM
    combining we get
    r=5*g/(RPM*2*pi/60)**2
    """
    from math import pi
    g = 386.09
    P2P = 2 * (5 * g) / (RPM * 2 * pi / 60) ** 2
    return P2P
