For those interested, here's a way to to generate an absolute value/ideal rectifier function of a signal using the BV (voltage behavioral) model in LTspice: