* Magnetic model made with OpenMagnetics
* My_custom_magnetic

.subckt My_custom_magnetic P1+ P1- P2+ P2- P3+ P3-
Lladder1_0 P1+ Node_Lladder_1_0 0.00000044286965416607
Rladder1_0 Node_Lladder_1_0 Node_R_Lmag_1 7.18538503187492150204
Lladder1_2 P1+ Node_Lladder_1_2 0.69103838050273735938
Rladder1_2 Node_Lladder_1_2 Node_Lladder_1_0 7.20623790440508482646
Lladder1_4 P1+ Node_Lladder_1_4 0.71311188379117107505
Rladder1_4 Node_Lladder_1_4 Node_Lladder_1_2 7.20106752103035407941
Lladder1_6 P1+ Node_Lladder_1_6 0.62261277835029316119
Rladder1_6 Node_Lladder_1_6 Node_Lladder_1_4 7.17401798641782129096
Lladder1_8 P1+ Node_Lladder_1_8 0.00000000471930635758
Rladder1_8 Node_Lladder_1_8 Node_Lladder_1_6 0.25621019747340834094
Rdc1 P1+ Node_R_Lmag_1 {Rdc_1_Value}
Lmag_1 P1- Node_R_Lmag_1 {NumberTurns_1**2*Permeance}
Lladder2_0 P2+ Node_Lladder_2_0 0.97122895822658428244
Rladder2_0 Node_Lladder_2_0 Node_R_Lmag_2 -2.28919229515785715989
Lladder2_2 P2+ Node_Lladder_2_2 1.85137554136712623176
Rladder2_2 Node_Lladder_2_2 Node_Lladder_2_0 -3.47356156253973402670
Lladder2_4 P2+ Node_Lladder_2_4 1.91471991153135512320
Rladder2_4 Node_Lladder_2_4 Node_Lladder_2_2 -1.43386338614170938399
Lladder2_6 P2+ Node_Lladder_2_6 5.29693060561242479167
Rladder2_6 Node_Lladder_2_6 Node_Lladder_2_4 2.34627597374724494728
Lladder2_8 P2+ Node_Lladder_2_8 8.69104967031313790926
Rladder2_8 Node_Lladder_2_8 Node_Lladder_2_6 4.84126459776134865365
Rdc2 P2+ Node_R_Lmag_2 {Rdc_2_Value}
Lmag_2 P2- Node_R_Lmag_2 {NumberTurns_2**2*Permeance}
K Lmag_1 Lmag_2 {CouplingCoefficient_12_Value}
Lladder3_0 P3+ Node_Lladder_3_0 0.97122812370706945728
Rladder3_0 Node_Lladder_3_0 Node_R_Lmag_3 -2.28918907872464494346
Lladder3_2 P3+ Node_Lladder_3_2 1.85137467345817796627
Rladder3_2 Node_Lladder_3_2 Node_Lladder_3_0 -3.47356077970027499191
Lladder3_4 P3+ Node_Lladder_3_4 1.91471592787993394325
Rladder3_4 Node_Lladder_3_4 Node_Lladder_3_2 -1.43386461402979747959
Lladder3_6 P3+ Node_Lladder_3_6 5.29692655057462946644
Rladder3_6 Node_Lladder_3_6 Node_Lladder_3_4 2.34627642393589308512
Lladder3_8 P3+ Node_Lladder_3_8 8.69104819886462642842
Rladder3_8 Node_Lladder_3_8 Node_Lladder_3_6 4.84126750951934425871
Rdc3 P3+ Node_R_Lmag_3 {Rdc_3_Value}
Lmag_3 P3- Node_R_Lmag_3 {NumberTurns_3**2*Permeance}
K2 Lmag_1 Lmag_3 {CouplingCoefficient_13_Value}

.param MagnetizingInductance_Value=0.005382
.param Permeance=MagnetizingInductance_Value/NumberTurns_1**2
.param Rdc_1_Value=0.029266
.param NumberTurns_1=34
.param Rdc_2_Value=0.000327
.param NumberTurns_2=3
.param Llk_2_Value=0.000007
.param CouplingCoefficient_12_Value=0.999368
.param Rdc_3_Value=0.000390
.param NumberTurns_3=3
.param Llk_3_Value=0.000000
.param CouplingCoefficient_13_Value=1.000000
.ends My_custom_magnetic