JoeyDelp / JoSIM

Superconductor Circuit Simulator
MIT License
73 stars 33 forks source link

Add π-shifted ferromagnetic Josephson junctions (π-junction) #57

Closed tanetakumi closed 2 years ago

tanetakumi commented 2 years ago

Sorry for the pull request again. I've modified the code to be more concise.

I would like JoSIM to recognize π-shifted ferromagnetic Josephson junctions (π-junction), so I will make a pull request.

This is π-junction RCSJ model image

This is the test data. testdata The Charactor for recognizing the π-junction is tentatively set to ”Q”. This circuits is based on the 0-π SQUID, which is composed of conventional Josephson junctions (0-junction) and a π-junction. From this test netlist file, we can get the following results.

Y axis is ”Phase” image

JoeyDelp commented 2 years ago

The inclusion of the phi-junction (and therefore inherently pi by setting the phi value to pi) is included in the testing branch and will be available from JoSIM v2.6 when final testing has been done to verify all features for main branch merge.

Please go ahead and test the phi (pi) junction model available in the testing branch by adding the PHI=PI value to the JJ model card. It would be valuable feedback to ensure it operates as intended.

tanetakumi commented 2 years ago

Before sending this pull request, I set PHI = PI and simulated it, but I did not get the results I was expecting. Today, I simulated again with JoSIM and this is the result. simulation file result image

.model jjmod jj(Rtype=1, Vg=2.8mV, Cap=0.064pF, R0=100ohm, Rn=16ohm, Icrit=0.1mA)

.model pjjmod jj(Rtype=1, Vg=2.8mV, Cap=0.064pF, R0=100ohm, Rn=16ohm, Icrit=0.1mA,PHI=PI)
.subckt psquid        3  5 
L1                 3         1   1.75pH fcheck
L2                 3         4   1.75pH fcheck
B1                 1         5  jjmod area=0.5
R1                 1         5   15.88ohm
B2                 4         5  pjjmod area=0.5
R2                 4         5   15.88ohm
.ends

* Example JTL Basic
VIN        1          0          pwl(0 0 300p 0 301p 0.5175mV 302p 0.5175mV 303p 0  400p 0 401p 0.5175mV 402p 0.5175mV 403p 0  500p 0 501p 0.5175mV 502p 0.5175mV 503p 0)
X01        psquid       1       0
L1                      1       2       18pH
R1                      2       100     50ohm
L2                      2       3       18pH
X02        psquid       3       0      
L3                      3       4       18pH
R2                      4       100     50ohm
L4                      4       5       18pH
X03        psquid       5       0       

R3                      5       6       8.32ohm
L5                      6       0       2pH
Vb                      100     0       pwl(0ps 0mV 100ps 1.2mV)

.tran 0.25p 1000p 0 0.25p
.print PHASE B1|X02
.print PHASE B2|X02
.ends

Next, I simulated it using pjsim. pjsim was created in the Yamanashi Lab. Yamanahi Lab result image

.model jjmod jj(Rtype=1, Vg=2.8mV, Cap=0.064pF, R0=100ohm, Rn=16ohm, Icrit=0.1mA)

.subckt psquid        3  5 
L1                 3         1   1.75pH fcheck
L2                 3         4   1.75pH fcheck
B1                 1         5  jjmod area=0.5
R1                 1         5   15.88ohm
P2                 4         5  jjmod area=0.5
R2                 4         5   15.88ohm
.ends

* Example JTL Basic
VIN        1          0          pwl(0 0 300p 0 301p 0.5175mV 302p 0.5175mV 303p 0  400p 0 401p 0.5175mV 402p 0.5175mV 403p 0  500p 0 501p 0.5175mV 502p 0.5175mV 503p 0)
X01        psquid       1       0
L1                      1       2       18pH
R1                      2       100     50ohm
L2                      2       3       18pH
X02        psquid       3       0      
L3                      3       4       18pH
R2                      4       100     50ohm
L4                      4       5       18pH
X03        psquid       5       0       

R3                      5       6       8.32ohm
L5                      6       0       2pH
Vb                      100     0       pwl(0ps 0mV 100ps 1.2mV)

.tran 0.25p 1000p 0 0.25p
.print PHASE B1|X02
.print PHASE B2|X02
.ends

Please let me know if I have made any mistakes regarding the simulations.

JoeyDelp commented 2 years ago

Hi, I just simulated the file you provided using the latest version of JoSIM (on the testing branch https://github.com/JoeyDelp/JoSIM/tree/testing) and was able to produce the following result piJTL.csv piJTL.pdf

This coincides with the result produced by pjsim. Though the PHI command was available to the model in the current master branch release of JoSIM, it was not performing as intended.

When released, v2.6 will have the correct operation. For now that is only available on the testing branch.

tanetakumi commented 2 years ago

Thank you very much. I should have simulated it with a test branch. Sorry about that.