model_rhs function

Extract the right hand side of a model