population_density function

Nested functions for population density dependence.