def specific_heat(mat):
    """Calculate specifc heat"""
    cw = 4183
    mr = mat['m_heat']
    mw = mat['m_w']
    Tr = mat['Tr']
    Tw = mat['Tw']
    Te = mat['Te']
    return (mw * cw * (Te - Tw)) / (mr * (Tr - Te))