I am trying to write the equation Partsolmolsolv := Vm-x2(thedVmdx2) but it keeps telling me x2 must be a function but has the form: unitless. I would appreciate any help. Thanks!

See the attached, In addition to using units consistently, as per the previous comment, you also need to follow though with the indexes, or just vectorize the equations.