Available potential energy and mixing in density-stratified fluids