Understanding absolute value circuit operation
The left op-amp is working in inverting mode. 







simulate this circuit &ndash; Schematic created using CircuitLab

Figure 1. Positive going input.


If the INPUT voltage goes positive then the - input will start to rise above the + input and the output will start to go negative.
D1 will then conduct pulling the - input back down to zero.
The voltage on R2/R4 junction will be -Vin.
The voltage on OA2 + input will be 0 V since it's tied to the virtual zero of OA1.
OA2 is then operating in inverting mode so the output will be -(-Vin) = Vin.








simulate this circuit

Figure 2. Negative going input.


When the INPUT voltage goes negative the cleverness of the circuit comes into play.
OA1 - input will be virtual zero so I1 = 0.1 mA.
If OA2 is in equilibrium both inputs will be at the same voltage. Therefore \$V_B = V_C\$.
Since there is 20k in the upper circuit and only 10k in the lower circuit \$i_3 = \frac{2}{3}I_1\$.
Therefore \$V_B = -\frac {2}{3}V_{IN}\$ as is \$V_C\$.
OA2 is then operating in non-inverting mode so the output 
$$ V_{D} = V_B (1 + \frac {R_f}{R_i}) = V_B (1 + \frac {10k}{20k}) = 1.5 \cdot V_B = 1.5\cdot\frac{2}{3}(-V_{IN}) = -V{IN} $$


It took me a while to see what was happening. I hope that helps.