def calculate_beta(diffusivity,node_spacing,time_interval):
    """
    Calculate beta, a substitution term based on diffusivity, the spacing
    of nodes within the modeled grain, and the timestep. After Ketcham, 2005.

    Parameters
    ----------
    diffusivity : float
        Diffusivity.
    node_spacing : float
        Spacing of nodes in the modeled crystal (um)
    time_interval : float
        Timestep in the thermal model (yr)

    Returns
    -------
    beta : float
        Beta, after Ketcham, 2005.

    """
    beta = (2*(node_spacing**2))/(diffusivity*time_interval)
    return(beta)