add_lagr function

Generic function for adding a Lagrangian model