Quantitative models of trace element behavior in magmatic processes