Op amp rectifier : transfer function and output impedance
With the diode shorted, this is just a ordinary non-inverting amplifier.  Note that R2 and R3 together form a single resistance, just that it's adjustable from 10 k&Omega; to 110 k&Omega;.  This provides variable voltage gain from 2x to 12x.

With the diode, everything will be normal as long as the opamp is trying to drive the output higher than it is.  The opamp output is actually the diode drop higher than the output at Vs.  Due to the feedback, the opamp tries to drive the left side of the diode to whatever it takes to get the desired Vs.

When the Ve input goes lower, the opamp will again try to do whatever it takes on the left side of D1 to make Vs be Ve times the gain.  However, in this case it won't succeed.  All it can do is slam the output as low as it goes.  Since the diode won't conduct, the output is effectively only tied to ground via R1, R2, and R3 in series.  If the low input voltage persists, that series resistance will discharge the cap.  The waveform will be a exponential decay towards ground with a time constant of (R1 + R2 + R3)*C.

The net effect is that the positive peaks of Ve are followed on Vs with some amplification.  In between the input peaks, Vs will decay towards 0.  This is sometimes called a "detector" circuit, and the amount of decay between the peaks is intended to be small compared to the value of the peaks themselves.  When the input signal is AC coupled, the net result is a voltage proportional to the input amplitude.

You could make a basic detector with just a diode biased properly, but the input and output would be off from each other by the diode drop.  This circuit uses the opamp to compensate for the diode drop.