The phenomenon you are seeing is called reverse recovery time. Look that up and you will see it is due to carriers in the junction still being there when the voltage reverses. Until those carriers are "used up", the diode will continue to conduct.
Modeling is all about knowing which characteristics actually matter and ignoring the rest. If you didn't do that, it would be reality instead of a model, but then it would also be too complex to implement.
At first approximation, just assume the diode will conduct in reverse for a fixed amount of time. Diodes meant for applications where this matters will have the maximum reverse recovery time listed in the datasheet. If the purpose of the model is to want to make sure your circuit still works, this is a good model because it represents the worst case conditions.
More accurate models take into account the current immediately before the voltage reversal and look at total charge leaked backwards. There are fancy equations for all that you will have to look them up in semiconductor physics texts if you want this level of detail.
As Spehro said, I would prefer combining the 2 sources and resistors into a single one. This can be done by noting that the two sources + resistances are in parallel branches.
The formula for equivalent Voltage in parallel branches is
V_eq = ( V1/R1 + V2/R2 + .....Vn/Rn) / ( 1/R1 + 1/R2 + .......1/Rn)
Be careful about the polarities of the batteries though. In your case the two batteries will have opposite polarities and so V2 will have negative sign.
The equivalent resistance is then given by
1/R_eq = (1/R1 + 1/R2 + .....1/Rn)
Using the above formulas, your circuit would be a single voltage + resistance branch and a diode.
Alternatively ,if I am correct, in your question r'd denotes the forward resistance of the diode and r'R denotes the reverse bias resistance. Then you can also use Superposition theorem taking one source at a time. In that case, when considering the 10V source, you would replace the diode with reverse bias resistance ( since it is reverse biased) and when considering the 20V source, you would replace the diode with a forward bias resistance ( since it is forward biased).
Best Answer
But you aren't modelling an ideal diode, you're modelling a physical diode to first order. An ideal diode has zero 'on' resistance and infinite 'off' resistance.
Your model should look like this:
simulate this circuit – Schematic created using CircuitLab