added unit conversion function
made smesolve take optional d1, d2 and rhs functions for customized sme