def cshock_dissipation_time(shock_vel,initial_dens):
    """A simple function used to calculate the dissipation time of a C-type shock.
    Use to obtain a useful timescale for your C-shock model runs. Velocity of
    ions and neutrals equalizes at dissipation time and full cooling takes a few dissipation times.

    Args:
        shock_vel (float): Velocity of the shock in km/s
        initial_dens (float): Preshock density of the gas in cm$^{-3}$

    Returns:
        float: The dissipation time of the shock in years
    """
    pc=3.086e18 #parsec in cgs
    SECONDS_PER_YEAR=3.15569e7
    dlength=12.0*pc*shock_vel/initial_dens
    return (dlength*1.0e-5/shock_vel)/SECONDS_PER_YEAR