All scaling in OpenMDAO results in the following linear transformation:
Variabledriver = m * Variablemodel + b
The computed values for m and b depend on how you specify the scaling, and whether or not you specify units that the driver sees which are different from the units in the model.
If your model variable is in units of m and you choose to use cm for the driver value then you have a unit_factor of 100. This conversion is done before anything else. All other scaling is done relative to the driver unit values. If your model value was 5.2 meters, then the driver value is 520 centimeters. You would then give ref and ref0 or scaler and adder relative to that.
In general, unit conversions can include both a multiplicative factor and an offset (thank you, Celsius to Fahrenheit).
Given a variable from the model (xmodel), the unit converted value (xdriver) is computed by
xdriver = unit_factor * (xmodel + offset)
The ref and ref0 values represent the model values that will get scaled to 1 and 0 respectively.
1 = m * (ref + b)
0 = m * (ref0 + b)
This gives the following for m and b:
b = -ref0
m = 1/(ref - ref0)
You are specifying the slope and offset for the scaling directly.
b = adder
m = scaler
All of the scaling combined gives a linear map between the driver scaled value (xdriver), the unit scaled value, and the actual model value (xmodel).
xdriver = m * (unit_factor * (xmodel + offset) + b)
xdriver = (m * unit_factor) * (xmodel + offset + b/unit_factor)
So the overall scaler is (m * unit_factor) and the overall adder is (offset + b/unit_factor).