code for linear concentrations