Electronic – Get rising edge using diode

diodesschematics

Here is circuit from Horowitz's "Art of electronics" book:
enter image description here

The problem is that I can't get expected signal from R2 resistor in OrCAD:
enter image description here
Here is diode pass both rising and falling edges.Why?

EDIT:
Here is correct settings of voltage source:
enter image description here

Best Answer

In short, parasitics.

A parasitic model of a diode unfortunately contains a capacitive component. The art of electronics was describing what would occur with ideal components. SPICE attempts to model actual components.

enter image description here

A 1n5817 has a total capacitance of 110pF

enter image description here

If the circuit is simulated with an IDEAL diode (with a 10V pulse with 1ns risetime) the resultant waveform is:

enter image description here

If a capacitor is placed in parallel with the diode:

enter image description here

The waveform that is produced is in line with your simulation

enter image description here