Why do I get recursion depth exceeded error and not a list of numbers error

Hi! In the code attach I’m trying to model a GFET transistor. However I get a recursion depth exceeded error and not a list of numbers error. The first error is somewhat understandable but the second is not. All the variables are defined so it should be one number at the end, a list of numbers od dimension {1}. It would be very helpful if someone could help me make this code working.
P.S. I’m very sorry that the code is a bit long, it’s mainly constant and function definition.

The problem with your implementation is that you have circular dependencies:

RS[VBGS_,IDS_ ] depends on QBGSaccess[VBGS,IDS]

QBGSaccess[VBGS_,IDS_] depends on VBGSp[VBGS,IDS]

VBGSp[VBGS_,IDS_] depends on RS[VBGS,IDS]

and the cycle starts again and never gets to an ending. And that is why your recurrence happens.

Can you let me know how you solved this problem?, I would like to know what the stop conditions should be.

Oh, I see. Thank you. However, if I take the circular dependence out and make RD and RS constant, like in the attached code, it still says not a list of numbers of dimension 1. It should work this way, I just can’t figure out why it’s not.