There is a space between the value and the unit - I think a nbsp should do.
I'm not sure about the "Ah" case. It's A times h, so it should be written with space "A h" (or with dot, "A·h") according to the text below; but "Ah" feels ok to me. For combining a unit with a prefix, there is no space between them - it is "2 km" for metres with the prefix kilo.
One would ask scientists how to write physical units, of course. And scientists use TeX/LaTeX for this, so it's a good idea to look there:
There is a TeX package describing how to render units in all detail.
LaTeX package "siunits" – International System of Units.
See for example "2.4.1 Space between numerical value and unit symbol" on page 15.
It documents various special cases too, like that the temparature "10 °C" has a space, but the angle "10°" does not.