Hey guys,
Im an engineering student and i am using Spice to model a single solar cell, but i am having some problems with it, i was wondering if someone can help me make this work, my problem is that the plot at the output is just a flat line i dont know why, i cant figure out what i am doing wrong.
Here is my code:
**cell_2.cir
.include cell_2.lib
xcell2 0 31 32 cell_2 params:area=126.6 j0=1e-11 j02=1e-9 jsc=0.0343 rs={RS} rsh=10000
.param RS=1
vbias 31 0 dc 0
virrad 32 0 dc 1000
.plot dc i(vbias)
.dc vbias -0.1 0.6 0.01
.step param RS list 0.0001 0.001 0.01 0.1 1
.probe
.end
and this is the subcircuit that i used
***** Cell_2.lib
.subckt cell_2 300 303 302 params:area=1, j0=1, jsc=1, j02=0, rs=1, rsh=1
girrad 300 301 value={(jsc/1000)*v(302)*area}
d1 301 300 diode
.model diode d(is={j0*area})
**d2 301 300 diode2
**.model diode2 d(is={j02*area},n=2)
.ends cell_2
Any help is appriciated.