def _lsqfun_Dickson1981(massAcid, h, massSample, concAcid, f, alk,
    totalCarbonate, concTotals, eqConstants):
    """D81 equation (16)."""
    return massSample * (alk - totalCarbonate * (1 / (1 + f * h /
        eqConstants['C1']) + 1 / (1 + f * h / eqConstants['C2'])) - 
        concTotals['B'] / (1 + f * h / eqConstants['B'])) + (massSample +
        massAcid) * (f * h - eqConstants['w'] / (f * h)) - massAcid * concAcid
