Change the value of a resistor mid simulation

Greetings, I am simulating the following circuit:

It is a simple op amp comparator circuit and it is working perfectly fine. However, I would like to change the value of R2 during simulation, like I want it’s value to change from 1kΩ to 2kΩ 3 seconds after the beginning of the simulation, how can I accomplish this?

I would look along the lines of some real world equivalent.
For example, use 2 2k resistors in parallel and open a switch or MOSfet at your time of interest.

1 Like

@paulvdh’s answer is definitely the recommended way to do this.

You can also do it with a behavioral resistor, but it’s harder to set up and can cause more convergence problems.