While phototransistors are often used in this common turbidity sensor application (at least in part) because of their gain, their response is not linear since the gain will depend on the intensity of the light.
I'd like to learn to model circuits here with CircuitLab, and while this one is a little challenging for a beginner, it's has everything I'd like to understand. My first problem is that I don't find a phototransistor in the library.
So I would like to ask if there is a way I could approximate the response of a phototransistor by connecting a photodiode to the base in order to inject a photocurrent. I understand it would not be correct, but at least it gets me started on my way.
Also I've assumed that there is a way to "shine" the LED into the photodiode with some fraction, like 1E-03 or 1E-06 of the light producing a photocurrent, but haven't figured out exactly how to do that. If it's not possible, should I just connect a variable current source to the base in place of the photodiode? (In that case I might leave the LED in place for more advanced tests like low-quality voltage regulation, ripple, etc.)