vk3cpu/transformer.html

2648 wiersze
169 KiB
HTML

This file contains ambiguous Unicode characters!

This file contains ambiguous Unicode characters that may be confused with others in your current locale. If your use case is intentional and legitimate, you can safely ignore this warning. Use the Escape button to highlight these characters.

<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>VK3CPU RF Transformer Calculator</title>
<link rel="stylesheet" href="toroid.css">
</head>
<body>
<header><a href="mailto:vk3cpu@gmail.com">VK3CPU</a> - RF Transformer Calc v0.1<br></header>
<section class="gridLayoutClass">
<div id="chart-container" class="chart-container">
<canvas id="chartCanvas" class="chartCanvasClass">
2D Chart Canvas
</canvas>
</div>
<div id="inductor-container" class="inductor-container">
<canvas id="inductor2D" class="inductorClass" width="350" height="350">
</canvas>
</div>
<div class="slider_container">
<div>
<select name="toroids" id="toroid-select" onchange="setToroid()">
<!--option value="FT240">FT240</option>
<option value="FT140">FT140</option>
<option value="FT37">FT37</option-->
</select>
<select name="materials" id="material-select" onchange="setMaterial()">
<!--option value="75">75 [&#956;i=5000]</option>
<option value="79">79 [&#956;i=1400]</option>
<option value="43" selected='true'>43 [&#956;i=800]</option>
<option value="80">80 [&#956;i=600]</option>
<option value="67">67 [&#956;i=40]</option-->
</select>
<select name="leakage" id="leakage-select" onchange="setLeakage()">
<option value="Model_0">No Leakage</option>
<option value="Model_1">Model 1</option>
<option value="Model_2">Model 2</option>
<option value="Manual">Manual</option>
</select>
</div>
<div class="sliders">
<label for="conductor_diameter_slider">AWG:</label>
<input type="range" id="conductor_diameter_slider" min="2" max="38" value="20" step="1">
</div>
<div class="sliders">
<label for="primary_turns_slider">N<sub>P</sub>:</label>
<input type="range" id="primary_turns_slider" min="0.0" max="1.0" value="0.020" step="0.005">
</div>
<div class="sliders">
<label for="secondary_turns_slider">N<sub>S</sub>:</label>
<input type="range" id="secondary_turns_slider" min="0.0" max="1.0" value="0.20" step="0.005">
</div>
<div class="sliders">
<label for="power_slider">P<sub>in</sub>:</label>
<input type="range" id="power_slider" min="0.698" max="3.176" value="2.0" step="0.004">
</div>
<div class="sliders">
<label for="load_impedance_slider">Z<sub>L</sub>:</label>
<input type="range" id="load_impedance_slider" min="0.0" max="3.0" value="2.7" step="0.04166666">
</div>
<div class="sliders">
<label for="primary_capacitance_slider">C<sub>in</sub>:</label>
<input type="range" id="primary_capacitance_slider" min="0.0" max="200.0" value="100.0" step="5.0">
</div>
<div class="sliders">
<label for="primary_winding_inductance_slider">Lp<sub>in</sub>:</label>
<input type="range" id="primary_winding_inductance_slider" min="-1.0" max="1.0" value="0.0" step="0.01">
</div>
<div class="sliders">
<label for="primary_winding_capacitance_slider">Cp<sub>in</sub>:</label>
<input type="range" id="primary_winding_capacitance_slider" min="-1.0" max="1.0" value="0.0" step="0.01">
</div>
<div class="sliders">
<label for="secondary_winding_capacitance_slider">Cs<sub>in</sub>:</label>
<input type="range" id="secondary_winding_capacitance_slider" min="-1.0" max="1.0" value="0.0" step="0.01">
</div>
<div class="sliders">
<label for="secondary_winding_inductance_slider">Ls<sub>in</sub>:</label>
<input type="range" id="secondary_winding_inductance_slider" min="-1.0" max="1.0" value="0.0" step="0.01">
</div>
</div>
<div id="notes" class="notes">
<b><u>UNDER DEVELOPMENT - DO NOT USE</u></b><br>
<br> <br>
<b><u>Notes:</u></b><br>
The VK3CPU RF Transformer Calculator was developed to help users predict the characteristics of a ferrite toroid wound as a transformer.
It uses the manufacturer's (Fair-Rite) published data including the toroid's dimensions and complex permeability characteristics
to predict the transformer's characteristics. It uses the lumped-equivalent circuit model as found on Fair-Rite's 17th Ed catalogue on page 141, Figure 2. <br>
The calculator has 3 separate display areas. At the top is the chart display for showing frequency-dependent characteristics. Next is the
schematic display, where a scaled image of the toroid and windings is presented to help with intuitive design. Next is the control panel
section, where the user can select the wire size, toroid material, toroid size, number of primary and secondary windings, input power and load impedance.<br><br>
<b><u>Inputs via the select widgets:</u></b>
<ul>
<li>Size : Selects the size of the toroid. FT240 is 2.4" in diameter. FT80 is 0.8", etc...</li>
<li>Material : Manufacturers material mix code. Select this first. Initial permeability [&#956;i] is displayed in square brackets. (Pick lower &#956;i for higher frequency applications.) </li>
<li>Leakage and Parasitic Model : Select the model used to estimate the primary and secondary leakage inductance and parasitic capacitance.</li>
</ul>
<b><u>Inputs via the slider widgets:</u></b>
<ul>
<li>AWG : Select the wire gauge. Sliding L-R changes AWG from 40-0. (Defaults to 20 AWG)</li>
<li>Np : Number of turns for the primary Winding. (Defaults to 20 turns.)</li>
<li>Ns : Number of turns for the secondary Winding. (Defaults to 20 turns.) </li>
<li>P : The input power in watts. (Defaults to 100 W)</li>
<li>Zl : Load impedance in ohms. (Defaults to 2550 ohms.) </li>
<li>Cin : Additional primary capacitance 0 - 200 pF. (Defaults to 0 pF.) </li>
</ul>
<i>Note: Manufacturers recommend keeping the number of turns (N) to a minimum.</i><br><br>
<b><u>Chart display:</u></b>
The chart title contains manufacturer, size, material and part number of the device. <br>
Calculated parameters are displayed against frequency (log scale). Each parameter may be displayed or hidden
by tapping on the legend key. Tapping on a data point will display the parameters for a single frequency.
<ul>
<li>L(&#956;H) : Inductance in microhenries. </li>
<li>|Z|(&#937;) : Impedance magnitude in Ohms. </li>
<li> IL(dB) : Insertion loss in dB. </li>
<li> X(&#937;) : Reactance in Ohms. </li>
<li> R(&#937;) : (F) - Resistance due to core losses in Ohms. </li>
<li> Rc(&#937;) : (PI) - Resistance due to core losses in Ohms. </li>
<li> Rw(&#937;) : (PI) - Resistance due to wire losses in Ohms. </li>
<li> Q : Quality factor. (X/R) </li>
<li> I(mA) : RMS current in milliamps. </li>
<li> &#956;' : (F) Complex permeability - reactive part. (Hidden by default.) </li>
<li> &#956;'' : (F) Complex permeability - resistive part. (Hidden by default.) </li>
<li> &#956; : (PI) Permeability (Hidden by default.) </li>
<li> H(Oe) : Core field intensity in Oersted. (Hidden by default.) </li>
<li> B(G) : Core flux density in Gauss. (Hidden by default.) </li>
<li> Pd(mW) : Sum of the power dissipation in the core, in milliwatts. For PI, it includes power dissipated in the wire also. </li>
</ul>
<br>
<b><u>Schematic display:</u></b>
Scaled representation of the toroid and the windings. Wire gauge and toroid dimensions are provided.<br>
On the left of the display are the following:
<ul>
<li>L&#7522; : Initial inductance in microhenries. This is based on the initial permeability figure found in data sheets. For accuracy, use the frequency-dependent inductance displayed in the chart.</li>
<li>Vrms : Excitation RMS voltage selected.</li>
<li>Rdc : Wire resistance in ohms.</li>
<li>Ceff : Experimental effective-capacitance calculation to determine SRF. (Under development so greyed-out. Based on David Knight's G3YNH
work on the self-capacitance of toroidal inductors detailed <a href="https://www.g3ynh.info/zdocs/magnetics/appendix/Toroid_selfC.html">HERE</a>).</li>
<li>SRF : Experimental self-resonant frequency prediction in MHz. (Under development so greyed-out. From the same paper detailed above.)</li>
</ul>
In the middle of the display are the following:
<ul>
<li>nn AWG : The wire gauge selected, based on the American Wire Gauge Standard.</li>
<li>&#8960; : Conductor diameter in mm and (inches).</li>
<li>Nd : The selected winding density in percent.</li>
<li>N : The number of turns, based on the selected Nd.</li>
<li>wire : Wire conductor length in centimeters and (feet).</li>
</ul>
<br>
<u><b>Other VK3CPU calculators:</b>
<ul>
<li><a href="https://miguelvaca.github.io/vk3cpu/magloop.html">Magloop - STL Antenna Calculator</a></li>
<li><a href="https://miguelvaca.github.io/vk3cpu/short_dipole.html">Coil-loaded Dipole Calculator</a></li>
<li><a href="https://miguelvaca.github.io/vk3cpu/inductor_imp.html">RF Inductor Calculator</a></li>
<li><a href="https://miguelvaca.github.io/vk3cpu/toroid.html">RF Toroid Calculator</a></li>
</ul>
</u>
<br>
<b><u>TODO:</u></b><br>
<ul>
<li> Selectable winding types.</li>
</ul>
<br>
<b><u>Change history:</u></b><br>
<b>[29-May-23] - v0.1</b> <br>
* Under development. Refactoring from toroid.html codebase. Removed Powdered-Iron code. <br>
</div>
</section>
<!--script src="https://cdnjs.cloudflare.com/ajax/libs/Chart.js/3.5.1/Chart.min.js"></script-->
<script src="https://cdn.jsdelivr.net/npm/chart.js@3.5.1/dist/chart.min.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/mathjs/7.5.1/math.min.js"></script>
<script src="inductor.js"></script>
<script>
function awgToMm(awg) {
// AWG to diameter in mm:
switch (awg) {
case 40: return [0.0787, 0.10414];
case 39: return [0.0889, 0.1143];
case 38: return [0.102, 0.12954];
case 37: return [0.114, 0.14478];
case 36: return [0.127, 0.16002];
case 35: return [0.142, 0.1778];
case 34: return [0.160, 0.19812];
case 33: return [0.180, 0.22098];
case 32: return [0.203, 0.24638];
case 31: return [0.226, 0.27432];
case 30: return [0.255, 0.30734];
case 29: return [0.287, 0.33782];
case 28: return [0.320, 0.37338];
case 27: return [0.361, 0.4191];
case 26: return [0.404, 0.46228];
case 25: return [0.455, 0.51562];
case 24: return [0.511, 0.57658];
case 23: return [0.574, 0.64262];
case 22: return [0.645, 0.71374];
case 21: return [0.724, 0.8001];
case 20: return [0.813, 0.89154];
case 19: return [0.912, 0.99314];
case 18: return [1.024, 1.10998];
case 17: return [1.150, 1.23952];
case 16: return [1.290, 1.3843];
case 15: return [1.450, 1.5494];
case 14: return [1.628, 1.73228];
case 13: return [1.829, 1.93548];
case 12: return [2.053, 2.16154];
case 11: return [2.304, 2.41808];
case 10: return [2.588, 2.70256];
case 9: return [2.906, 3.0226];
case 8: return [3.264, 3.38328];
case 7: return [3.665, 3.78968];
case 6: return [4.115, 4.24688];
case 5: return [4.621, 4.75742];
case 4: return [5.189, 5.32892];
case 3: return [5.827, 5.97154];
case 2: return [6.544, 6.69036];
case 1: return [7.348, 7.54888];
case 0: return [8.251, 8.45];
default: return [0.0, 0.0];
}
}
function Ferrite() {
// Current selected material type:
this.material = '43';
// Current leakage model:
this.leakage = 'Model_0';
// Current selected ferrite size:
this.size = 'FT240';
// User-selected variables:
this.cond_diameter_meters = 0.0;
this.Np = 0;
this.Ns = 0;
this.Pin = 0.0;
this.Vrms = 0.0;
this.Zl = 0.0;
this.Cin = 0.0;
// Minimum primary and secondary-side parasitic inductance and capacitance:
this.Cp = 1e-15;
this.L1 = 1e-12;
this.L2 = 1e-12;
this.Cs = 1e-15;
// Calculated frequency-independent variables:
this.cond_length_meters = 0.0;
this.Rdc = 0.0;
this.N_max = 0;
this.L = 0.0;
this.M = 0.0;
// Calculated and charted frequency-dependent variables:
this.M_vs_f = [];
this.SWR_vs_f = [];
this.eff_vs_f = [];
this.IL_vs_f = [];
this.P0_vs_f = [];
this.Pl_vs_f = [];
this.Ploss_vs_f = [];
this.S11_real_vs_f = [];
this.S11_imag_vs_f = [];
this.V1_vs_f = [];
this.V2_vs_f = [];
this.V3_vs_f = [];
this.L_vs_f = [];
this.Z_vs_f = [];
this.R_vs_f = [];
this.X_vs_f = [];
this.Q_vs_f = [];
this.i_vs_f = [];
this.P_vs_f = [];
this.mu1_vs_f = [];
this.mu2_vs_f = [];
this.H_vs_f = [];
this.B_vs_f = [];
this.cores = {
'80' : {
size : {
'FT114' : { PN:'5980001001', A:29.00, B:19.00, C:7.50, W:21.0, CC:19.80, le:7.32, Ae:0.37, Ve:2.70, Al:350.0 },
'FT87' : { PN:'5980001801', A:22.10, B:13.7, C:6.35, W:5.2, CC:20.70, le:5.42, Ae:0.26, Ve:0.142, Al:330.0 },
'FT37' : { PN:'5980000201', A:9.50, B:4.70, C:3.30, W:0.83, CC:28.50, le:2.07, Ae:0.073, Ve:0.15, Al:245.0 },
},
manufacturer : "Fair-Rite",
mat : "MnZn",
mu_i : 600,
B : 4700,
H : 5,
Br : 500,
Hc : 0.4,
Tc : 300,
R : 200,
complex_mu : {
freq: [10000.0, 100000.0, 300000.0, 500000.0, 667000.0, 800000.0, 1000000.0, 2000000.0, 2040000.0, 2090000.0, 2140000.0, 2190000.0, 2240000.0, 2290000.0, 2340000.0, 2400000.0, 2450000.0, 2510000.0, 2570000.0, 2630000.0, 2690000.0, 2750000.0, 2820000.0, 2880000.0, 2950000.0, 3020000.0, 3090000.0, 3160000.0, 3240000.0, 3310000.0, 3390000.0, 3470000.0, 3550000.0, 3630000.0, 3720000.0, 3800000.0, 3890000.0, 3980000.0, 4070000.0, 4170000.0, 4270000.0, 4370000.0, 4470000.0, 4570000.0, 4680000.0, 4790000.0, 4900000.0, 5010000.0, 5130000.0, 5250000.0, 5370000.0, 5500000.0, 5620000.0, 5750000.0, 5890000.0, 6030000.0, 6170000.0, 6310000.0, 6460000.0, 6610000.0, 6760000.0, 6920000.0, 7080000.0, 7240000.0, 7410000.0, 7590000.0, 7760000.0, 7940000.0, 8130000.0, 8320000.0, 8510000.0, 8710000.0, 8910000.0, 9120000.0, 9330000.0, 9550000.0, 9770000.0, 10000000.0, 10200000.0, 10500000.0, 10700000.0, 11000000.0, 11200000.0, 11500000.0, 11700000.0, 12000000.0, 12300000.0, 12600000.0, 12900000.0, 13200000.0, 13500000.0, 13800000.0, 14100000.0, 14500000.0, 14800000.0, 15100000.0, 15500000.0, 15800000.0, 16200000.0, 16600000.0, 17000000.0, 17400000.0, 17800000.0, 18200000.0, 18600000.0, 19100000.0, 19500000.0, 20000000.0, 20400000.0, 20900000.0, 21400000.0, 21900000.0, 22400000.0, 22900000.0, 23400000.0, 24000000.0, 24500000.0, 25100000.0, 25700000.0, 26300000.0, 26900000.0, 27500000.0, 28200000.0, 28800000.0, 29500000.0, 30200000.0, 30900000.0, 31600000.0, 32400000.0, 33100000.0, 33900000.0, 34700000.0, 35500000.0, 36300000.0, 37200000.0, 38000000.0, 38900000.0, 39800000.0, 40700000.0, 41700000.0, 42700000.0, 43700000.0, 44700000.0, 45700000.0, 46800000.0, 47900000.0, 49000000.0, 50100000.0, 51300000.0, 52500000.0, 53700000.0, 55000000.0, 56200000.0, 57500000.0, 58900000.0, 60300000.0, 61700000.0, 63100000.0, 64600000.0, 66100000.0, 67600000.0, 69200000.0, 70800000.0, 72400000.0, 74100000.0, 75900000.0, 77600000.0, 79400000.0, 81300000.0, 83200000.0, 85100000.0, 87100000.0, 89100000.0, 91200000.0, 93300000.0, 95500000.0, 97700000.0, 100000000.0] ,
mu_1: [552.5293373, 551.8353641, 551.7485492, 552.0082962, 552.8058814, 553.7193461, 552.7320041, 576.7065362, 578.16449, 579.6701607, 581.5634164, 583.3458896, 585.0316149, 586.864943, 589.0517811, 591.3347543, 593.120218, 595.3244732, 598.0256692, 600.4115685, 603.3914119, 606.4104715, 609.8122818, 613.3152321, 616.5004721, 620.3318893, 624.1874715, 628.1742612, 632.5550661, 637.3831485, 642.5114883, 647.7452009, 653.4235474, 659.5336823, 665.5433373, 672.7322003, 680.0993878, 688.0287583, 696.7352717, 706.0786223, 716.0689848, 726.5971847, 738.313893, 751.0129395, 764.8528686, 780.0733218, 796.4494587, 815.2404354, 834.8191246, 857.1206399, 882.0265771, 909.5173001, 940.3735841, 975.2661628, 1014.208789, 1059.063472, 1109.457948, 1167.162839, 1231.477696, 1302.602502, 1377.261326, 1445.496059, 1483.453054, 1441.572532, 1240.027627, 821.7123464, 280.0900126, -161.463971, -390.8270107, -452.3839303, -427.6338039, -368.8547616, -302.9694255, -241.3342552, -188.797456, -146.2660319, -113.5257068, -89.99241895, -74.29580358, -64.82477402, -59.81840292, -57.51010963, -56.76088184, -56.814224, -57.07040608, -57.42930609, -57.69547751, -57.74114269, -57.63837375, -57.40317876, -57.08823262, -56.68194973, -56.12916674, -55.51845246, -54.92332085, -54.20308253, -53.55237176, -52.84884535, -52.16993532, -51.48197934, -50.79025884, -50.09636006, -49.41869705, -48.69815414, -48.0752398, -47.43951487, -46.75561328, -46.11600183, -45.48493928, -44.8242942, -44.15447071, -43.54241343, -42.91292566, -42.28501298, -41.67530798, -41.02323705, -40.35247164, -39.6830753, -39.0184742, -38.32086167, -37.63258308, -36.92659005, -36.20447829, -35.50320056, -34.80637331, -34.10891596, -33.39995308, -32.70081648, -32.02218646, -31.34638472, -30.65456216, -29.98124368, -29.30336613, -28.67020496, -27.97301266, -27.32804174, -26.68851346, -26.03242315, -25.43234441, -24.78897718, -24.20805315, -23.63346464, -23.04328355, -22.43387581, -21.84967174, -21.30547567, -20.79749682, -20.24914529, -19.7045426, -19.19789941, -18.67802475, -18.17486627, -17.70084037, -17.20974228, -16.73414233, -16.26328553, -15.8057269, -15.37093672, -14.94312753, -14.50479774, -14.10080607, -13.69800883, -13.29768805, -12.90728014, -12.52724757, -12.14616373, -11.80040727, -11.43534958, -11.07737208, -10.75082832, -10.41957072, -10.09505637, -9.790459248, -9.480485647, -9.179966322, -8.897451637, -8.612714327, -8.338432873] ,
mu_2: [0.289303711, 0.385253824, 0.481491564, 0.867093317, 1.350762274, 1.739566353, 2.416427681, 7.721430072, 7.973516404, 8.211915795, 9.000578471, 9.525294184, 9.539358131, 9.985647983, 10.21317352, 10.9124654, 11.41459574, 11.92915091, 12.13222424, 12.97789753, 13.72904158, 14.26065941, 15.13724059, 16.09541422, 16.7102912, 17.71820085, 18.71122023, 19.49525004, 20.48658071, 21.74524484, 23.0640455, 24.7848944, 26.22850221, 27.97594052, 29.64695631, 31.90680981, 33.92890232, 36.59644102, 39.10737708, 41.86787182, 45.0658211, 48.77541547, 53.0750689, 57.45015629, 62.50272585, 68.15373893, 74.65275341, 81.90826162, 90.60225492, 100.8423824, 112.8009168, 126.9124574, 143.517934, 164.1092076, 189.6556519, 221.4211477, 261.2887724, 313.7025431, 382.2620274, 475.1209197, 602.2959658, 779.4137144, 1023.757354, 1345.612776, 1712.239766, 1995.009455, 2022.30722, 1783.651735, 1443.317974, 1137.490938, 907.7645787, 746.8613168, 638.0172567, 565.6402706, 517.8546566, 486.8367069, 466.763034, 453.2343538, 443.1904295, 434.2851329, 425.0558182, 415.0165515, 404.0869149, 392.4422242, 380.4012255, 368.3075283, 356.3459607, 344.4424301, 333.0438673, 321.8701137, 311.1108071, 300.7642878, 290.866019, 281.3240811, 272.2112127, 263.5413384, 255.1024179, 246.966844, 239.2042748, 231.7671826, 224.5464818, 217.5984796, 210.8794141, 204.3913395, 198.1026505, 192.1025947, 186.2302496, 180.6029462, 175.107119, 169.7837129, 164.6736254, 159.6346219, 154.7587518, 150.0331907, 145.4429647, 140.9625123, 136.6289636, 132.4415757, 128.3512765, 124.3878016, 120.5875242, 116.8721149, 113.293722, 109.7936776, 106.4169012, 103.148636, 99.97602469, 96.91757718, 93.92363002, 91.02253316, 88.21426803, 85.50721438, 82.86032447, 80.30070665, 77.83305378, 75.4422733, 73.13055534, 70.8844903, 68.72594029, 66.62088877, 64.58785225, 62.62626735, 60.70113617, 58.83188685, 57.02023332, 55.27327546, 53.58530131, 51.95356572, 50.36046931, 48.84091232, 47.33233133, 45.90476705, 44.49727149, 43.14865806, 41.8184313, 40.54886853, 39.31478716, 38.13533338, 36.97706789, 35.84327965, 34.75466551, 33.72000889, 32.69012875, 31.69350444, 30.75346018, 29.81618266, 28.92020338, 28.04094115, 27.21403855, 26.39507763, 25.60676388, 24.83984183, 24.1003866, 23.39371118, 22.69978386, 22.02932947, 21.37550228, 20.7479763] ,
},
color : 'grey',
},
'79' : {
size : {
'FT114' : { PN:'5979001001', A:29.00, B:19.00, C:7.50, W:21.0, CC:19.80, le:7.32, Ae:0.37, Ve:2.70, Al:860.0 },
'FT87' : { PN:'5979001801', A:22.10, B:13.7, C:6.35, W:5.2, CC:20.70, le:5.41, Ae:0.26, Ve:0.150, Al:840.0 },
'FT37' : { PN:'5979000201', A:9.50, B:4.70, C:3.20, W:0.83, CC:28.50, le:2.07, Ae:0.072, Ve:0.15, Al:600.0 },
},
manufacturer : "Fair-Rite",
mat : "MnZn",
mu_i : 1400,
B : 4600,
H : 5,
Br : 1500,
Hc : 0.34,
Tc : 225,
R : 200,
complex_mu : {
freq: [10000.0, 50000.0, 100000.0, 300000.0, 500000.0, 666000.0, 1000000.0, 1170000.0, 1360000.0, 1580000.0, 1840000.0, 2150000.0, 2500000.0, 2920000.0, 3400000.0, 3960000.0, 4620000.0, 5380000.0, 6270000.0, 7310000.0, 8510000.0, 9920000.0, 11600000.0, 13500000.0, 15700000.0, 18300000.0, 21300000.0, 24800000.0, 28900000.0, 33700000.0, 39300000.0, 45800000.0, 53400000.0, 62200000.0, 72500000.0, 84400000.0, 98400000.0, 115000000.0, 134000000.0, 156000000.0, 181000000.0, 211000000.0, 246000000.0, 287000000.0, 335000000.0, 390000000.0, 454000000.0, 529000000.0, 617000000.0, 719000000.0, 838000000.0, 976000000.0, 1140000000.0, 1330000000.0, 1540000000.0, 1800000000.0] ,
mu_1: [1382.4, 1379.2, 1377.5, 1382.7, 1396.5, 1417.2, 1500.0, 1560.0, 1630.0, 1710.0, 1740.0, 1710.0, 1620.0, 1490.0, 1310.0, 1080.0, 814.0, 532.0, 270.0, 67.4, -58.1, -116.0, -130.0, -123.0, -107.0, -90.3, -75.5, -63.1, -53.0, -44.7, -37.5, -31.3, -25.9, -21.2, -17.3, -14.1, -11.4, -9.2, -7.4, -5.9, -4.7, -3.7, -2.9, -2.3, -1.8, -1.4, -1.1, -0.8, -0.6, -0.4, -0.2, 0.0, 0.2, 0.6, 1.1, 1.8] ,
mu_2: [1.1, 2.4, 2.8, 5.2, 8.4, 11.9, 30.8, 50.9, 100.0, 207.0, 375.0, 565.0, 752.0, 925.0, 1080.0, 1200.0, 1270.0, 1250.0, 1160.0, 996.0, 809.0, 635.0, 492.0, 382.0, 300.0, 239.0, 192.0, 156.0, 127.0, 104.0, 84.1, 68.3, 55.5, 45.1, 36.8, 30.0, 24.6, 20.1, 16.6, 13.6, 11.3, 9.4, 7.8, 6.6, 5.5, 4.7, 4.0, 3.5, 3.0, 2.6, 2.3, 2.1, 2.0, 1.9, 1.9, 2.0] ,
},
color : 'grey',
},
'78' : {
size : {
'FT240' : { PN:'5978003801', A:61.0, B:35.55, C:12.70, W:106.0, CC:9.20, le:14.5, Ae:1.58, Ve:22.8, Al:3155.0 },
'FT140' : { PN:'5978002701', A:35.55, B:23.00, C:12.70, W:33.00, CC:11.20, le:8.90, Ae:0.79, Ve:7.00, Al:2545.0 },
'FT114' : { PN:'5978001201', A:29.00, B:19.00, C:13.85, W:26.00, CC:10.70, le:7.30, Ae:0.68, Ve:5.00, Al:2695.0 },
'FT90' : { PN:'5978007621', A:23.00, B:12.90, C:13.65, W:15.00, CC:10.30, le:5.40, Ae:0.52, Ve:2.83, Al:2795.0 },
'FT87' : { PN:'5978007601', A:22.10, B:13.70, C:12.70, W:15.00, CC:10.30, le:5.40, Ae:0.52, Ve:2.83, Al:2795.0 },
'FT19' : { PN:'5978002101', A:4.95, B:2.20, C:1.400, W:0.09, CC:69.20, le:1.04, Ae:0.015, Ve:0.157, Al:440.0 },
},
manufacturer : "Fair-Rite",
mat : "MnZn",
mu_i : 2300,
B : 4800,
H : 5,
Br : 1500,
Hc : 0.20,
Tc : 200,
R : 200,
complex_mu : {
freq: [10000.0, 100000.0, 300000.0, 500000.0, 700000.0, 900000.0, 1000000.0, 1170000.0, 1360000.0, 1580000.0, 1840000.0, 2150000.0, 2500000.0, 2920000.0, 3400000.0, 3960000.0, 4620000.0, 5380000.0, 6270000.0, 7310000.0, 8510000.0, 9920000.0, 11600000.0, 13500000.0, 15700000.0, 18300000.0, 21300000.0, 24800000.0, 28900000.0, 33700000.0, 39300000.0, 45800000.0, 53400000.0, 62200000.0, 72500000.0, 84400000.0, 98400000.0, 115000000.0, 134000000.0, 156000000.0, 181000000.0, 211000000.0, 246000000.0, 287000000.0, 335000000.0, 390000000.0, 454000000.0, 529000000.0, 617000000.0, 719000000.0, 838000000.0, 976000000.0, 1140000000.0, 1330000000.0, 1540000000.0, 1800000000.0] ,
mu_1: [2099.0, 2102.0, 2175.0, 2323.0, 2504.0, 2539.0, 2510.0, 2377.0, 2204.0, 1969.0, 1684.0, 1373.0, 1062.0, 769.0, 500.0, 266.0, 82.0, -43.0, -112.0, -138.0, -135.0, -118.0, -99.0, -81.0, -68.0, -58.0, -50.0, -43.0, -36.0, -30.0, -24.0, -20.0, -16.0, -13.0, -10.0, -8.0, -7.0, -5.0, -4.0, -3.0, -3.0, -2.0, -2.0, -1.0, -1.0, -1.0, -1.0, -1.0, 0.0, 0.0, 0.0, 0.0, 1.0, 1.0, 2.0, 3.0] ,
mu_2: [13.0, 14.0, 33.0, 91.0, 314.0, 666.0, 900.0, 1109.0, 1310.0, 1493.0, 1623.0, 1683.0, 1678.0, 1618.0, 1511.0, 1361.0, 1176.0, 977.0, 787.0, 622.0, 488.0, 385.0, 309.0, 252.0, 208.0, 172.0, 141.0, 115.0, 94.0, 77.0, 63.0, 52.0, 43.0, 35.0, 29.0, 24.0, 20.0, 17.0, 14.0, 12.0, 10.0, 9.0, 7.0, 6.0, 5.0, 5.0, 4.0, 3.0, 3.0, 3.0, 2.0, 2.0, 2.0, 2.0, 2.0, 2.0] ,
},
color : 'grey',
},
'77' : {
size : {
'FT240' : { PN:'5977003801', A:61.0, B:35.55, C:12.7, W:106.0, CC:9.20, le:14.5, Ae:1.58, Ve:22.8, Al:3155.0 },
'FT140' : { PN:'5977002701', A:35.55, B:23.00, C:12.7, W:33.00, CC:11.20, le:8.90, Ae:0.79, Ve:7.00, Al:2545.0 },
'FT114' : { PN:'5977001001', A:29.00, B:19.00, C:7.5, W:13.0, CC:19.80, le:7.30, Ae:0.37, Ve:2.70, Al:1365.0 },
'FT100' : { PN:'5977006401', A:25.40, B:15.50, C:12.7, W:19.0, CC:10.00, le:6.20, Ae:0.62, Ve:3.80, Al:2700.0 },
'FT50' : { PN:'5977000301', A:12.70, B:7.15, C:4.90, W:2.00, CC:22.90, le:2.95, Ae:0.129, Ve:0.38, Al:1180.0 },
'FT37' : { PN:'5977000201', A:9.50, B:4.75, C:3.30, W:0.83, CC:28.60, le:2.07, Ae:0.072, Ve:0.15, Al:945.0 },
},
manufacturer : "Fair-Rite",
mat : "MnZn",
mu_i : 2000,
B : 4900,
H : 5,
Br : 1800,
Hc : 0.30,
Tc : 200,
R : 100,
complex_mu : {
freq: [10000.0, 100000.0, 300000.0, 500000.0, 700000.0, 900000.0, 1000000.0, 1170000.0, 1360000.0, 1580000.0, 1840000.0, 2150000.0, 2500000.0, 2920000.0, 3400000.0, 3960000.0, 4620000.0, 5380000.0, 6270000.0, 7310000.0, 8510000.0, 9920000.0, 11600000.0, 13500000.0, 15700000.0, 18300000.0, 21300000.0, 24800000.0, 28900000.0, 33700000.0, 39300000.0, 45800000.0, 53400000.0, 62200000.0, 72500000.0, 84400000.0, 98400000.0, 115000000.0, 134000000.0, 156000000.0, 181000000.0, 211000000.0, 246000000.0, 287000000.0, 335000000.0, 390000000.0, 454000000.0, 529000000.0, 617000000.0, 719000000.0, 838000000.0, 976000000.0, 1140000000.0, 1330000000.0, 1540000000.0, 1800000000.0] ,
mu_1: [1989.0, 2001.0, 2045.0, 2142.0, 2193.0, 2097.0, 2074.0, 1892.0, 1668.0, 1423.0, 1174.0, 944.0, 738.0, 560.0, 407.0, 278.0, 171.0, 88.0, 27.0, -11.0, -31.0, -40.0, -41.0, -41.0, -39.0, -36.0, -33.0, -29.0, -26.0, -22.0, -19.0, -16.0, -13.0, -11.0, -9.0, -8.0, -6.0, -5.0, -4.0, -3.0, -3.0, -2.0, -2.0, -1.0, -1.0, -1.0, -1.0, -1.0, 0.0, 0.0, 0.0, 0.0, 1.0, 1.0, 2.0, 3.0] ,
mu_2: [14.0, 37.0, 109.0, 250.0, 519.0, 791.0, 946.0, 1099.0, 1212.0, 1275.0, 1286.0, 1254.0, 1193.0, 1113.0, 1020.0, 920.0, 815.0, 708.0, 603.0, 506.0, 419.0, 346.0, 286.0, 237.0, 197.0, 163.0, 135.0, 111.0, 92.0, 76.0, 62.0, 51.0, 42.0, 35.0, 29.0, 24.0, 20.0, 17.0, 14.0, 12.0, 10.0, 8.0, 7.0, 6.0, 5.0, 4.0, 4.0, 3.0, 3.0, 2.0, 2.0, 2.0, 2.0, 2.0, 2.0, 2.0] ,
},
color : 'grey',
},
'75' : {
size : {
'FT240' : { PN:'5975003801', A:61.0, B:35.35, C:12.7, W:106.0, CC:9.20, le:14.5, Ae:1.58, Ve:22.8, Al:6850.0 },
'FT140' : { PN:'5975002701', A:35.55, B:23.00, C:12.7, W:33.00, CC:11.20, le:8.90, Ae:0.79, Ve:7.00, Al:5500.0 },
'FT100' : { PN:'5975006401', A:25.40, B:15.50, C:12.7, W:19.0, CC:10.00, le:6.20, Ae:0.62, Ve:3.80, Al:6250.0 },
'FT50' : { PN:'5975000301', A:12.70, B:7.15, C:4.90, W:2.00, CC:22.90, le:2.95, Ae:0.129, Ve:0.38, Al:2725.0 },
'FT37' : { PN:'5975000201', A:9.50, B:4.75, C:3.30, W:0.83, CC:28.60, le:2.06, Ae:0.072, Ve:0.15, Al:2200.0 },
},
manufacturer : "Fair-Rite",
mat : "MnZn",
mu_i : 5000,
B : 4800,
H : 5,
Br : 1000,
Hc : 0.11,
Tc : 140,
R : 300,
complex_mu : {
freq: [10000.0, 30000.0, 50000.0, 100000.0, 300000.0, 500000.0, 667000.0, 800000.0, 1000000.0, 1070000.0, 1150000.0, 1230000.0, 1320000.0, 1420000.0, 1520000.0, 1630000.0, 1750000.0, 1870000.0, 2010000.0, 2150000.0, 2310000.0, 2480000.0, 2660000.0, 2850000.0, 3050000.0, 3270000.0, 3510000.0, 3760000.0, 4040000.0, 4330000.0, 4640000.0, 4980000.0, 5340000.0, 5720000.0, 6140000.0, 6580000.0, 7050000.0, 7560000.0, 8110000.0, 8700000.0, 9330000.0, 10000000.0, 10700000.0, 11500000.0, 12300000.0, 13200000.0, 14200000.0, 15200000.0, 16300000.0, 17500000.0, 18700000.0, 20100000.0, 21500000.0, 23100000.0, 24800000.0, 26600000.0, 28500000.0, 30500000.0, 32700000.0, 35100000.0, 37600000.0, 40400000.0, 43300000.0, 46400000.0, 49800000.0, 53400000.0, 57200000.0, 61400000.0, 65800000.0, 70500000.0, 75600000.0, 81100000.0, 87000000.0, 93300000.0, 100000000.0, 107000000.0, 115000000.0, 123000000.0, 132000000.0, 142000000.0, 152000000.0, 163000000.0, 175000000.0, 187000000.0, 201000000.0, 215000000.0, 231000000.0, 248000000.0, 266000000.0, 285000000.0, 305000000.0, 327000000.0, 351000000.0, 376000000.0, 404000000.0, 433000000.0, 464000000.0, 498000000.0, 534000000.0, 572000000.0, 614000000.0, 658000000.0, 705000000.0, 756000000.0, 811000000.0, 870000000.0, 933000000.0, 1000000000.0],
mu_1: [4957.4, 4960.8, 4964.3, 5024.6, 5352.6, 5276.2, 4805.8, 4304.1, 3520.6, 3279.0, 3038.6, 2799.4, 2564.8, 2329.6, 2088.9, 1845.8, 1604.1, 1354.9, 1108.0, 864.5, 633.2, 420.2, 233.0, 77.9, -45.5, -135.8, -196.8, -234.1, -254.8, -262.2, -259.7, -253.8, -244.4, -232.8, -221.2, -209.1, -197.4, -185.8, -174.2, -163.5, -152.8, -142.6, -132.7, -123.3, -114.2, -105.6, -97.5, -89.9, -82.7, -76.0, -69.7, -63.9, -58.5, -53.4, -48.8, -44.5, -40.5, -36.9, -33.6, -30.5, -27.7, -25.1, -22.8, -20.6, -18.7, -16.9, -15.2, -13.7, -12.4, -11.1, -10.0, -9.0, -8.1, -7.3, -6.5, -5.8, -5.2, -4.7, -4.2, -3.7, -3.4, -3.0, -2.7, -2.4, -2.2, -1.9, -1.7, -1.6, -1.4, -1.3, -1.2, -1.0, -1.0, -0.9, -0.8, -0.7, -0.7, -0.6, -0.6, -0.6, -0.6, -0.5, -0.5, -0.5, -0.5, -0.5, -0.6, -0.6],
mu_2: [23.3, 29.0, 37.5, 77.6, 739.8, 1695.5, 2424.0, 2820.0, 3087.4, 3137.4, 3170.0, 3191.1, 3201.6, 3204.9, 3192.9, 3165.4, 3133.1, 3074.0, 2996.8, 2894.4, 2766.3, 2614.6, 2440.2, 2252.9, 2060.9, 1868.9, 1687.2, 1518.0, 1365.0, 1227.4, 1106.0, 999.0, 903.2, 819.2, 743.3, 675.8, 614.4, 559.3, 509.1, 463.5, 421.8, 383.9, 349.6, 318.3, 289.9, 264.2, 240.6, 219.2, 199.8, 182.2, 166.2, 151.6, 138.3, 126.2, 115.3, 105.3, 96.2, 88.0, 80.4, 73.6, 67.4, 61.6, 56.5, 51.7, 47.4, 43.5, 39.9, 36.6, 33.6, 30.9, 28.4, 26.1, 24.1, 22.2, 20.4, 18.8, 17.4, 16.0, 14.8, 13.7, 12.7, 11.7, 10.9, 10.1, 9.3, 8.7, 8.1, 7.5, 7.0, 6.5, 6.0, 5.6, 5.2, 4.9, 4.6, 4.3, 4.0, 3.7, 3.5, 3.3, 3.1, 2.9, 2.8, 2.6, 2.5, 2.4, 2.3, 2.2],
},
color : 'grey',
},
'67' : {
size : {
'FT240' : { PN:'5967003801', A:61.0, B:35.55, C:12.7, W:106.0, CC:9.20, le:14.5, Ae:1.58, Ve:22.8, Al:55.0 },
'FT140' : { PN:'5967002701', A:35.55, B:23.00, C:12.7, W:33.00, CC:11.20, le:8.90, Ae:0.79, Ve:7.00, Al:45.0 },
'FT114A': { PN:'5967001201', A:29.00, B:19.00, C:13.85, W:26.0, CC:10.70, le:7.30, Ae:0.68, Ve:5.0, Al:47.0 },
'FT114' : { PN:'5967001001', A:29.00, B:19.00, C:7.50, W:13.0, CC:19.80, le:7.30, Ae:0.37, Ve:2.70, Al:25.0 },
'FT82' : { PN:'5967000601', A:21.00, B:13.20, C:6.35, W:6.40, CC:21.30, le:5.20, Ae:0.243, Ve:1.26, Al:24.0 },
'FT50' : { PN:'5967000301', A:12.70, B:7.15, C:4.90, W:2.00, CC:22.90, le:2.95, Ae:0.129, Ve:0.38, Al:22 },
'FT37' : { PN:'5967000201', A:9.50, B:4.75, C:3.30, W:0.83, CC:28.60, le:2.07, Ae:0.072, Ve:0.15, Al:18.0 },
},
manufacturer : "Fair-Rite",
mat : "NiZn",
mu_i : 40,
B : 2300,
H : 20,
Br : 800,
Hc : 3.5,
Tc : 475,
R : 1.0e7,
complex_mu : {
freq: [1000000.0, 1040000.0, 1080000.0, 1130000.0, 1170000.0, 1220000.0, 1270000.0, 1320000.0, 1380000.0, 1430000.0, 1490000.0, 1550000.0, 1620000.0, 1680000.0, 1750000.0, 1820000.0, 1900000.0, 1970000.0, 2060000.0, 2140000.0, 2230000.0, 2320000.0, 2410000.0, 2510000.0, 2610000.0, 2720000.0, 2830000.0, 2950000.0, 3070000.0, 3190000.0, 3320000.0, 3460000.0, 3600000.0, 3750000.0, 3900000.0, 4060000.0, 4230000.0, 4400000.0, 4580000.0, 4760000.0, 4960000.0, 5160000.0, 5370000.0, 5590000.0, 5820000.0, 6060000.0, 6310000.0, 6560000.0, 6830000.0, 7110000.0, 7400000.0, 7700000.0, 8020000.0, 8350000.0, 8690000.0, 9040000.0, 9410000.0, 9790000.0, 10200000.0, 10600000.0, 11000000.0, 11500000.0, 12000000.0, 12500000.0, 13000000.0, 13500000.0, 14000000.0, 14600000.0, 15200000.0, 15800000.0, 16500000.0, 17200000.0, 17900000.0, 18600000.0, 19300000.0, 20100000.0, 21000000.0, 21800000.0, 22700000.0, 23600000.0, 24600000.0, 25600000.0, 26600000.0, 27700000.0, 28900000.0, 30000000.0, 31300000.0, 32500000.0, 33900000.0, 35300000.0, 36700000.0, 38200000.0, 39800000.0, 41100000.0, 42700000.0, 44300000.0, 45900000.0, 47500000.0, 49300000.0, 51400000.0, 53500000.0, 55600000.0, 57700000.0, 59800000.0, 62000000.0, 64100000.0, 66500000.0, 69300000.0, 72100000.0, 74900000.0, 77700000.0, 80500000.0, 83300000.0, 86500000.0, 90100000.0, 93700000.0, 97400000.0, 101000000.0, 105000000.0, 108000000.0, 112000000.0, 117000000.0, 122000000.0, 127000000.0, 132000000.0, 137000000.0, 141000000.0, 146000000.0, 152000000.0, 158000000.0, 164000000.0, 171000000.0, 177000000.0, 184000000.0, 190000000.0, 197000000.0, 206000000.0, 214000000.0, 223000000.0, 231000000.0, 239000000.0, 248000000.0, 256000000.0, 266000000.0, 277000000.0, 289000000.0, 300000000.0, 311000000.0, 322000000.0, 333000000.0, 346000000.0, 361000000.0, 375000000.0, 390000000.0, 404000000.0, 419000000.0, 433000000.0, 450000000.0, 469000000.0, 488000000.0, 508000000.0, 527000000.0, 546000000.0, 565000000.0, 585000000.0, 607000000.0, 633000000.0, 658000000.0, 684000000.0, 709000000.0, 735000000.0, 760000000.0, 789000000.0, 823000000.0, 857000000.0, 891000000.0, 924000000.0, 958000000.0, 992000000.0, 1030000000.0, 1070000000.0, 1110000000.0, 1150000000.0, 1200000000.0, 1240000000.0, 1290000000.0, 1330000000.0, 1380000000.0, 1440000000.0, 1500000000.0, 1560000000.0, 1620000000.0, 1680000000.0, 1740000000.0, 1800000000.0, 1740000000.0, 1800000000.0, 1800000000.0] ,
mu_1: [38.16, 38.14, 38.13, 38.16, 38.13, 38.14, 38.12, 38.12, 38.12, 38.13, 38.12, 38.11, 38.12, 38.11, 38.09, 38.09, 38.08, 38.08, 38.08, 38.08, 38.07, 38.07, 38.07, 38.07, 38.07, 38.06, 38.06, 38.05, 38.05, 38.06, 38.04, 38.04, 38.04, 38.03, 38.03, 38.02, 38.02, 38.01, 38.02, 38.01, 38.02, 38.03, 38.01, 38.01, 38.02, 38.02, 38.02, 38.02, 38.01, 38.03, 38.04, 38.03, 38.04, 38.05, 38.05, 38.06, 38.07, 38.09, 38.11, 38.12, 38.14, 38.16, 38.18, 38.2, 38.21, 38.23, 38.27, 38.31, 38.35, 38.38, 38.42, 38.48, 38.52, 38.57, 38.63, 38.7, 38.78, 38.86, 38.94, 39.03, 39.13, 39.25, 39.37, 39.51, 39.67, 39.83, 39.99, 40.19, 40.41, 40.63, 40.89, 41.19, 41.51, 41.15, 41.35, 41.56, 41.77, 42.01, 42.31, 42.66, 43.06, 43.5, 43.99, 44.5, 45.09, 45.75, 46.59, 47.72, 49.06, 50.65, 52.53, 54.61, 56.67, 58.48, 59.11, 58.06, 55.77, 53.06, 50.24, 47.54, 44.77, 41.98, 39.59, 37.55, 35.77, 34.19, 32.77, 31.5, 30.27, 28.92, 27.71, 26.64, 25.65, 24.75, 23.9, 23.01, 22.04, 21.16, 20.35, 19.6, 18.85, 18.15, 17.5, 16.77, 15.99, 15.23, 14.53, 13.85, 13.19, 12.57, 11.88, 11.15, 10.46, 9.78, 9.18, 8.6, 8.05, 7.49, 6.79, 6.23, 5.7, 5.19, 4.68, 4.21, 3.81, 3.37, 2.85, 2.38, 1.94, 1.53, 1.17, 0.83, 0.46, 0.06, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0] ,
mu_2: [0.47, 0.47, 0.46, 0.46, 0.45, 0.45, 0.43, 0.42, 0.42, 0.4, 0.39, 0.38, 0.38, 0.37, 0.36, 0.36, 0.35, 0.34, 0.34, 0.33, 0.33, 0.33, 0.32, 0.31, 0.31, 0.3, 0.3, 0.29, 0.29, 0.29, 0.28, 0.28, 0.28, 0.28, 0.27, 0.27, 0.27, 0.26, 0.26, 0.26, 0.26, 0.26, 0.26, 0.25, 0.25, 0.24, 0.24, 0.24, 0.23, 0.23, 0.23, 0.22, 0.22, 0.22, 0.22, 0.21, 0.21, 0.21, 0.21, 0.21, 0.21, 0.2, 0.2, 0.2, 0.2, 0.2, 0.2, 0.2, 0.19, 0.19, 0.19, 0.19, 0.2, 0.2, 0.2, 0.2, 0.2, 0.2, 0.21, 0.21, 0.21, 0.21, 0.22, 0.22, 0.23, 0.23, 0.23, 0.24, 0.24, 0.24, 0.25, 0.25, 0.26, 0.27, 0.3, 0.31, 0.32, 0.35, 0.36, 0.37, 0.41, 0.44, 0.48, 0.54, 0.6, 0.67, 0.8, 1.0, 1.3, 1.83, 2.68, 4.09, 6.28, 9.77, 14.58, 19.26, 23.05, 25.77, 27.63, 28.81, 29.59, 30.01, 30.13, 30.07, 29.94, 29.73, 29.48, 29.22, 28.93, 28.61, 28.29, 27.98, 27.68, 27.39, 27.12, 26.82, 26.51, 26.21, 25.92, 25.64, 25.39, 25.17, 24.93, 24.7, 24.41, 24.14, 23.89, 23.63, 23.38, 23.13, 22.85, 22.53, 22.2, 21.92, 21.56, 21.25, 20.93, 20.57, 20.26, 19.77, 19.41, 19.07, 18.73, 18.38, 18.02, 17.68, 17.28, 16.89, 16.54, 16.16, 15.82, 15.51, 15.19, 14.75, 14.43, 14.08, 13.78, 13.47, 13.19, 12.92, 12.61, 12.27, 12.01, 11.72, 11.47, 11.22, 11.03, 10.84, 10.65, 10.49, 10.31, 10.16, 10.02, 9.89, 9.78, 11.49, 11.45, 8.88] ,
},
color : 'grey',
},
'61' : {
size : {
'FT240x3' : { PN:'5961003801', A:61.0, B:35.55, C:38.1, W:318.0, CC:3.07, le:14.5, Ae:4.74, Ve:68.4, Al:510.0 },
'FT240x2' : { PN:'5961003801', A:61.0, B:35.55, C:25.4, W:212.0, CC:4.60, le:14.5, Ae:3.16, Ve:45.6, Al:340.0 },
'FT240' : { PN:'5961003801', A:61.0, B:35.55, C:12.7, W:106.0, CC:9.20, le:14.5, Ae:1.58, Ve:22.8, Al:170.0 },
'FT140' : { PN:'5961002701', A:35.55, B:23.00, C:12.7, W:33.00, CC:11.20, le:8.90, Ae:0.79, Ve:7.00, Al:140.0 },
'FT114A': { PN:'5961001201', A:29.00, B:19.00, C:13.85, W:26.0, CC:10.70, le:7.30, Ae:0.68, Ve:5.0, Al:145.0 },
'FT114' : { PN:'5961001001', A:29.00, B:19.00, C:7.50, W:13.0, CC:19.80, le:7.30, Ae:0.37, Ve:2.70, Al:80.0 },
'FT102B' : { PN:'2661102002', A:25.90, B:12.80, C:28.60, W:55.0, CC:3.11, le:5.60, Ae:1.80, Ve:10.07, Al:476.0 },
'FT82' : { PN:'5961000601', A:21.00, B:13.20, C:6.35, W:6.40, CC:21.30, le:5.20, Ae:0.243, Ve:1.26, Al:75.0 },
'FT50' : { PN:'5961000301', A:12.70, B:7.15, C:4.90, W:2.00, CC:22.90, le:2.95, Ae:0.129, Ve:0.38, Al:69 },
'FT37' : { PN:'5961000201', A:9.50, B:4.75, C:3.30, W:0.83, CC:28.60, le:2.07, Ae:0.072, Ve:0.15, Al:55.0 },
},
manufacturer : "Fair-Rite",
mat : "NiZn",
mu_i : 125,
B : 2350,
H : 15,
Br : 1200,
Hc : 1.8,
Tc : 300,
R : 1.0e8,
complex_mu : {
freq: [10000.0, 50000.0, 100000.0, 300000.0, 500000.0, 700000.0, 1000000.0, 1080000.0, 1160000.0, 1240000.0, 1320000.0, 1420000.0, 1530000.0, 1640000.0, 1750000.0, 1870000.0, 2020000.0, 2160000.0, 2310000.0, 2480000.0, 2670000.0, 2860000.0, 3050000.0, 3270000.0, 3530000.0, 3780000.0, 4040000.0, 4330000.0, 4660000.0, 5000000.0, 5340000.0, 5720000.0, 6170000.0, 6610000.0, 7050000.0, 7560000.0, 8170000.0, 8780000.0, 9390000.0, 10000000.0, 10700000.0, 11600000.0, 12400000.0, 13200000.0, 14200000.0, 15300000.0, 16400000.0, 17500000.0, 18700000.0, 20200000.0, 21600000.0, 23100000.0, 24800000.0, 26700000.0, 28600000.0, 30500000.0, 32700000.0, 35300000.0, 37800000.0, 40400000.0, 43300000.0, 46600000.0, 50000000.0, 53400000.0, 57200000.0, 61700000.0, 66100000.0, 70500000.0, 75600000.0, 81700000.0, 87800000.0, 93900000.0, 100000000.0, 107000000.0, 116000000.0, 124000000.0, 132000000.0, 142000000.0, 153000000.0, 164000000.0, 175000000.0, 187000000.0, 202000000.0, 216000000.0, 231000000.0, 248000000.0, 267000000.0, 286000000.0, 305000000.0, 327000000.0, 353000000.0, 378000000.0, 404000000.0, 433000000.0, 466000000.0, 500000000.0, 534000000.0, 572000000.0, 617000000.0, 661000000.0, 705000000.0, 756000000.0, 817000000.0, 878000000.0, 939000000.0, 1000000000.0] ,
mu_1: [118.03, 117.55, 117.59, 117.89, 117.95, 117.85, 118.57, 118.5, 118.51, 118.53, 118.52, 118.49, 118.47, 118.5, 118.53, 118.53, 118.54, 118.54, 118.59, 118.58, 118.65, 118.71, 118.76, 118.84, 118.94, 119.04, 119.15, 119.29, 119.47, 119.69, 119.92, 120.19, 120.57, 120.98, 121.42, 121.97, 122.72, 123.54, 124.47, 125.48, 126.84, 128.58, 130.59, 132.86, 135.72, 139.39, 143.28, 147.07, 150.66, 152.75, 151.8, 147.86, 140.88, 131.6, 122.17, 113.86, 105.12, 96.33, 88.56, 82.07, 75.64, 69.45, 64.33, 60.03, 55.88, 51.86, 48.4, 45.5, 42.6, 39.66, 37.13, 34.87, 32.9, 30.8, 28.6, 26.66, 24.92, 23.03, 21.2, 19.46, 17.9, 16.32, 14.68, 13.23, 11.97, 10.62, 9.32, 8.16, 7.2, 6.24, 5.3, 4.54, 3.87, 3.21, 2.57, 2.05, 1.63, 1.15, 0.74, 0.37, 0.05, -0.22, -0.49, -0.69, -0.87, -1.05] ,
mu_2: [0.45, 0.45, 0.45, 0.46, 0.48, 0.58, 0.62, 0.62, 0.62, 0.63, 0.65, 0.66, 0.7, 0.72, 0.75, 0.75, 0.76, 0.76, 0.74, 0.77, 0.76, 0.77, 0.78, 0.78, 0.8, 0.81, 0.84, 0.86, 0.87, 0.93, 0.95, 0.98, 1.07, 1.11, 1.17, 1.31, 1.42, 1.56, 1.78, 2.02, 2.35, 2.88, 3.54, 4.43, 5.91, 8.31, 11.73, 16.41, 23.49, 33.55, 44.49, 54.68, 64.11, 71.61, 76.41, 78.94, 80.56, 80.98, 80.56, 79.37, 77.69, 75.44, 73.15, 70.95, 68.5, 65.97, 63.62, 61.47, 59.3, 56.95, 54.88, 53.08, 51.43, 49.72, 47.92, 46.32, 44.89, 43.33, 41.76, 40.3, 38.91, 37.48, 35.95, 34.55, 33.22, 31.81, 30.3, 28.89, 27.62, 26.28, 24.89, 23.63, 22.49, 21.36, 20.25, 19.17, 18.27, 17.33, 16.4, 15.59, 14.87, 14.13, 13.41, 12.79, 12.3, 11.9] ,
},
color : 'grey',
},
'52' : {
size : {
'FT240x3' : { PN:'5952003801', A:60.0, B:35.35, C:38.1, W:400.32, CC:3.05, le:14.5, Ae:4.74, Ve:68.4, Al:975.0 },
'FT240x2' : { PN:'5952003801', A:60.0, B:35.35, C:25.4, W:266.88, CC:4.57, le:14.5, Ae:3.16, Ve:45.6, Al:650.0 },
'FT240' : { PN:'5952003801', A:60.0, B:35.35, C:12.7, W:133.44, CC:9.14, le:14.5, Ae:1.58, Ve:22.8, Al:325.0 },
'FT140' : { PN:'5952020801', A:35.25, B:22.60, C:12.7, W:38.26, CC:11.10, le:8.79, Ae:0.792, Ve:6.959, Al:283.0 },
'FT114' : { PN:'5952020701', A:28.8, B:18.70, C:7.50, W:14.81, CC:19.34, le:7.23, Ae:0.374, Ve:2.702, Al:162.0 },
'FT82' : { PN:'5952020601', A:21.70, B:13.50, C:6.35, W:7.54, CC:20.80, le:5.33, Ae:0.256, Ve:1.368, Al:151.0 },
'FT50A' : { PN:'5952020501', A:12.45, B:7.8, C:6.35, W:2.46, CC:21.24, le:3.06, Ae:0.144, Ve:0.442, Al:148.0 },
'FT50' : { PN:'5952020401', A:12.45, B:7.8, C:4.90, W:2.16, CC:22.31, le:2.90, Ae:0.13, Ve:0.378, Al:141.0 },
'FT37' : { PN:'5952020301', A:9.42, B:4.72, C:3.30, W:0.87, CC:28.66, le:2.06, Ae:0.072, Ve:0.147, Al:110.0 },
},
manufacturer : "Fair-Rite",
mat : "NiZn",
mu_i : 250,
B : 4200,
H : 10,
Br : 2900,
Hc : 0.60,
Tc : 250,
R : 1.0e9,
complex_mu : {
freq: [10000.0, 75000.0, 100000.0, 300000.0, 500000.0, 666000.0, 800000.0, 960000.0, 3000000.0, 5000000.0, 5290000.0, 5740000.0, 6190000.0, 6640000.0, 7160000.0, 7770000.0, 8380000.0, 8990000.0, 9690000.0, 10500000.0, 11300000.0, 12200000.0, 13200000.0, 14200000.0, 15300000.0, 16500000.0, 17900000.0, 19300000.0, 20700000.0, 22300000.0, 24100000.0, 25900000.0, 28000000.0, 30400000.0, 32700000.0, 35100000.0, 37900000.0, 41100000.0, 44300000.0, 47500000.0, 51300000.0, 55500000.0, 59600000.0, 64300000.0, 69800000.0, 75300000.0, 80700000.0, 87100000.0, 94500000.0, 102000000.0, 109000000.0, 118000000.0, 128000000.0, 137000000.0, 148000000.0, 161000000.0, 173000000.0, 186000000.0, 200000000.0, 217000000.0, 234000000.0, 251000000.0, 271000000.0, 293000000.0, 315000000.0, 340000000.0, 369000000.0, 398000000.0, 427000000.0, 461000000.0, 500000000.0, 539000000.0, 578000000.0, 624000000.0, 675000000.0, 726000000.0, 783000000.0, 849000000.0, 916000000.0, 982000000.0, 1060000000.0, 1150000000.0, 1240000000.0, 1330000000.0, 1430000000.0, 1560000000.0, 1680000000.0],
mu_1: [272.64, 267.78, 268.08, 266.51, 265.73, 265.54, 265.36, 265.25, 268.44, 293.51, 290.76, 295.23, 298.26, 299.66, 298.92, 295.43, 288.51, 278.83, 265.16, 249.12, 233.44, 217.14, 200.97, 186.96, 174.9, 162.89, 151.28, 141.63, 133.64, 126.05, 119.14, 113.54, 108.44, 103.41, 99.3, 95.63, 91.73, 87.85, 84.32, 81.03, 77.51, 73.9, 70.58, 67.17, 63.53, 60.2, 57.14, 53.85, 50.29, 47.02, 43.88, 40.44, 36.9, 33.72, 30.57, 27.43, 24.65, 22.18, 19.62, 16.99, 14.69, 12.6, 10.48, 8.42, 6.63, 4.9, 3.27, 1.87, 0.81, -0.15, -0.94, -1.5, -1.92, -2.25, -2.58, -2.88, -3.17, -3.55, -3.87, -4.2, -4.61, -5.12, -5.69, -6.37, -7.18, -8.22, -9.41],
mu_2: [1.43, 3.32, 3.14, 2.74, 2.74, 2.83, 2.87, 3.01, 5.62, 18.88, 24.42, 33.27, 43.8, 55.65, 70.27, 87.04, 103.16, 117.07, 129.99, 139.81, 145.57, 148.73, 149.32, 148.17, 145.94, 142.49, 137.95, 133.21, 128.53, 123.35, 118.07, 113.46, 108.87, 104.39, 100.66, 97.55, 94.55, 91.53, 89.01, 86.86, 84.65, 82.51, 80.63, 78.73, 76.75, 75.03, 73.49, 71.85, 70.17, 68.63, 67.13, 65.52, 63.64, 61.79, 59.64, 57.43, 55.34, 53.41, 51.33, 49.1, 47.04, 45.07, 42.97, 40.71, 38.63, 36.47, 34.07, 31.87, 29.84, 27.75, 25.57, 23.73, 22.14, 20.61, 19.22, 18.03, 16.99, 15.96, 15.08, 14.37, 13.67, 13.02, 12.44, 11.94, 11.39, 10.86, 10.41],
},
color : 'grey',
},
'46' : {
size : {
'FT240' : { PN:'2646803802', A:61.0, B:35.55, C:12.7, W:118.0, CC:9.16, le:14.5, Ae:1.58, Ve:22.8, Al:1371.0 },
'FT200' : { PN:'2646626202', A:50.80, B:25.40, C:38.1, W:285.0, CC:2.3791, le:11.1, Ae:4.65, Ve:51.432, Al:5282.0 },
'FT122' : { PN:'2646804502', A:31.10, B:19.05, C:16.3, W:36.0, CC:8.0495, le:7.57, Ae:0.941, Ve:7.12, Al:1561.0 },
'FT112A': { PN:'2646101902', A:28.50, B:13.80, C:28.60, W:67.0, CC:31.17, le:5.60, Ae:1.80, Ve:1.0072, Al:4032.0 },
},
manufacturer : "Fair-Rite",
mat : "MgZn",
mu_i : 500,
B : 2550,
H : 10,
Br : 1680,
Hc : 0.53,
Tc : 140,
R : 1.0e8,
complex_mu : {
freq: [10000.0, 100000.0, 200000.0, 300000.0, 400000.0, 500000.0, 600000.0, 800000.0, 1000000.0, 1170000.0, 1360000.0, 1580000.0, 1840000.0, 2150000.0, 2500000.0, 2920000.0, 3400000.0, 3960000.0, 4620000.0, 5380000.0, 6270000.0, 7310000.0, 8510000.0, 9920000.0, 11600000.0, 13500000.0, 15700000.0, 18300000.0, 21300000.0, 24800000.0, 28900000.0, 33700000.0, 39300000.0, 45800000.0, 53400000.0, 62200000.0, 72500000.0, 84400000.0, 98400000.0, 115000000.0, 134000000.0, 156000000.0, 181000000.0, 211000000.0, 246000000.0, 287000000.0, 335000000.0, 390000000.0, 454000000.0, 529000000.0, 617000000.0, 719000000.0, 838000000.0, 976000000.0, 1140000000.0, 1330000000.0, 1540000000.0, 1800000000.0] ,
mu_1: [524.7, 514.9, 513.6, 512.8, 512.7, 512.9, 513.5, 515.7, 519.2, 525.4, 534.5, 546.5, 559.4, 567.2, 562.0, 541.2, 504.8, 458.0, 406.6, 357.3, 313.0, 274.5, 241.1, 212.3, 187.0, 165.1, 146.1, 129.4, 114.7, 101.4, 89.2, 78.2, 67.6, 57.9, 48.9, 40.7, 33.3, 26.5, 20.6, 15.6, 11.5, 8.3, 5.8, 3.8, 2.4, 1.2, 0.4, -0.3, -0.7, -1.0, -1.3, -1.5, -1.7, -1.9, -2.2, -2.4, -2.8, -3.5] ,
mu_2: [7.0, 7.1, 7.5, 8.0, 8.9, 9.9, 10.9, 13.2, 18.2, 21.9, 28.3, 39.8, 62.0, 96.6, 142.3, 189.5, 231.3, 260.9, 276.0, 278.3, 272.3, 261.1, 247.6, 232.7, 217.3, 202.2, 187.4, 173.5, 160.6, 148.8, 138.0, 127.9, 118.3, 109.1, 100.4, 91.9, 83.8, 75.9, 68.2, 60.7, 53.6, 47.1, 41.1, 35.7, 31.0, 26.8, 23.2, 20.0, 17.2, 14.9, 12.9, 11.3, 9.8, 8.7, 7.7, 6.9, 6.4, 6.1] ,
},
color : 'grey',
},
'43' : {
size : {
'FT240x3' : { PN:'5943003801', A:61.0, B:35.55, C:38.1, W:318.0, CC:3.06, le:14.5, Ae:4.74, Ve:68.4, Al:3225.0 },
'FT240x2' : { PN:'5943003801', A:61.0, B:35.55, C:25.4, W:212.0, CC:4.59, le:14.5, Ae:3.16, Ve:45.6, Al:2150.0 },
'FT240' : { PN:'5943003801', A:61.0, B:35.55, C:12.7, W:106.0, CC:9.20, le:14.5, Ae:1.58, Ve:22.8, Al:1075.0 },
'FT154B' : { PN:'2643251002', A:39.10, B:16.75, C:22.2, W:104.0, CC:3.33, le:7.80, Ae:0.234, Ve:18.2, Al:3074.0 },
'FT140x2' : { PN:'5943002701', A:35.55, B:23.00, C:25.4, W:66.0, CC:5.60, le:8.90, Ae:1.58, Ve:14.00, Al:1770.0 },
'FT140' : { PN:'5943002701', A:35.55, B:23.00, C:12.7, W:33.0, CC:11.20, le:8.90, Ae:0.79, Ve:7.00, Al:885.0 },
'FT125' : { PN:'5943001701', A:31.75, B:19.05, C:9.50, W:23.0, CC:12.90, le:7.60, Ae:0.59, Ve:4.50, Al:775.0 },
'FT114x2' : { PN:'5943001001', A:29.00, B:19.00, C:15.0, W:26.0, CC:9.90, le:7.30, Ae:0.74, Ve:5.40, Al:1020.0 },
'FT114' : { PN:'5943001001', A:29.00, B:19.00, C:7.50, W:13.0, CC:19.80, le:7.30, Ae:0.37, Ve:2.70, Al:510.0 },
'FT102B' : { PN:'2643102002', A:25.90, B:12.80, C:28.60, W:55.0, CC:3.11, le:5.60, Ae:1.80, Ve:10.07, Al:3296.0 },
'FT82' : { PN:'5943000601', A:21.00, B:13.20, C:6.35, W:6.40, CC:21.30, le:5.20, Ae:0.243, Ve:1.26, Al:470.0 },
'FT50B' : { PN:'2643801902', A:12.70, B:7.9, C:12.70, W:4.70, CC:10.421, le:3.12, Ae:0.3, Ve:0.9325, Al:1206.0 },
'FT50' : { PN:'5943000301', A:12.70, B:7.15, C:4.90, W:2.00, CC:22.90, le:2.95, Ae:0.129, Ve:0.38, Al:440.0 },
'FT37' : { PN:'5943000201', A:9.50, B:4.75, C:3.30, W:0.83, CC:28.60, le:2.07, Ae:0.072, Ve:0.15, Al:350.0 },
},
manufacturer : "Fair-Rite",
mat : "NiZn",
mu_i : 800,
B : 3500,
H : 10,
Br : 2200,
Hc : 0.36,
Tc : 130,
R : 1.0e5,
complex_mu : {
freq: [10000.0, 100000.0, 300000.0, 500000.0, 700000.0, 900000.0, 1000000.0, 1040843.912, 1083356.049, 1127604.548, 1173660.329, 1221597.208, 1271492.016, 1323424.724, 1377478.567, 1433740.18, 1492299.738, 1553251.097, 1616691.948, 1682723.971, 1751453.001, 1822989.193, 1897447.203, 1974946.369, 2055610.905, 2139570.096, 2226958.508, 2317916.205, 2412588.97, 2511128.542, 2613692.855, 2720446.295, 2831559.964, 2947211.95, 3067587.615, 3192879.893, 3323289.598, 3459025.746, 3600305.888, 3747356.465, 3900413.162, 4059721.294, 4225536.192, 4398123.62, 4577760.194, 4764733.828, 4959344.196, 5161903.214, 5372735.534, 5592179.071, 5820585.54, 6058321.023, 6305766.553, 6563318.726, 6831390.338, 7110411.043, 7400828.045, 7703106.813, 8017731.829, 8345207.362, 8686058.276, 9040830.875, 9410093.774, 9794438.815, 10194482.01, 10610864.54, 11044253.75, 11495344.28, 11964859.11, 12453550.76, 12962202.49, 13491629.55, 14042680.47, 14616238.48, 15213222.83, 15834590.37, 16481336.98, 17154499.26, 17855156.11, 18584430.54, 19343491.38, 20133555.24, 20955888.39, 21811808.85, 22702688.45, 23629955.06, 24595094.86, 25599654.75, 26645244.79, 27733540.82, 28866287.12, 30045299.2, 31272466.76, 32549756.63, 33879216.03, 35262975.74, 36703253.61, 38202358.07, 39762691.82, 41386755.7, 43077152.7, 44836592.13, 46667893.95, 48573993.3, 50557945.2, 52622929.46, 54772255.75, 57009368.94, 59337854.58, 61761444.68, 64284023.69, 66909634.69, 69642485.91, 72486957.47, 75447608.37, 78529183.84, 81736622.91, 85075066.33, 88549864.84, 92166587.72, 95931031.71, 99849230.31, 103927463.5, 108172267.6, 112590446.2, 117189080.5, 121975540.9, 126957499.2, 132142940.1, 137540174.7, 143157853.5, 149004980.2, 155090926.5, 161425446.7, 168018693.4, 174881234.1, 182024067.8, 189458642.8, 197196874.9, 205251166.7, 213634427.2, 222360093.0, 231442149.0, 240895151.7, 250734252.1, 260975219.8, 271634468.7, 282729083.0, 294276844.7, 306296262.3, 318806599.8, 331827908.5, 345381058.3, 359487771.8, 374170658.7, 389453252.1, 405360046.4, 421916536.5, 439149258.3, 457085831.9, 475755005.4, 495186700.9, 515412062.8, 536463507.7, 558374776.0, 581180986.1, 604918691.1, 629625936.8, 655342323.1, 682109067.2, 709969069.8, 738966984.0, 769149286.3, 800564352.0, 833262531.9, 867296233.3, 902720004.2, 939590620.5, 977967177.1, 1017911182.0, 1059486657.0, 1102760237.0, 1147801278.0, 1194681973.0, 1243477458.0, 1294265942.0, 1347128826.0, 1402150837.0, 1459420162.0, 1519028591.0, 1581071660.0, 1645648812.0, 1712863547.0, 1782823595.0, 1855641085.0, 1931432726.0, 2010319994.0, 2092429326.0, 2177892326.0, 2266845968.0, 2359432825.0, 2455801291.0, 2556105823.0, 2660507184.0, 2769172705.0, 2882276551.0, 3000000000.0],
mu_1: [816.0434106, 809.4449846, 808.5477831, 812.4832301, 830.0, 840.0, 851.3550816, 855.3857072, 859.4280167, 863.329692, 868.8362314, 873.4029217, 878.6444097, 884.0783849, 889.0529029, 895.3839031, 899.4493574, 904.0126394, 907.5266357, 910.0203411, 910.9492314, 911.4432599, 910.0241714, 906.443633, 901.7612532, 894.7454962, 886.5318274, 876.4861149, 864.8268961, 851.8814883, 836.9656884, 820.9649591, 803.9201657, 786.4046357, 767.5437693, 748.078803, 728.1939222, 708.024764, 687.5199527, 667.2839247, 647.2975609, 627.2853647, 607.7149357, 588.2959163, 569.4661363, 551.1033373, 533.2520488, 515.834048, 498.6328191, 482.1858831, 466.3487294, 450.8418277, 435.856601, 421.3303978, 407.5182508, 393.9971741, 380.9413358, 368.4577648, 356.3852298, 344.7942781, 333.5853593, 322.7425848, 312.35968, 302.2204109, 292.5988049, 283.2869199, 274.2216373, 265.6180661, 257.2803026, 249.160291, 241.2841181, 233.775772, 226.2806641, 219.2852607, 212.3792322, 205.65458, 199.1326295, 192.8574158, 186.7017878, 180.6860621, 174.8067106, 169.0641159, 163.4172714, 157.8108122, 152.496357, 147.1781132, 141.9045894, 136.7576294, 131.6965718, 126.6982028, 121.9103193, 117.1243187, 112.4318844, 107.9118477, 103.3905232, 99.04778341, 94.80141586, 90.66367569, 86.61887717, 82.7360264, 78.92937687, 75.24423862, 71.61557489, 68.11114917, 64.70845403, 61.35970005, 58.16417106, 54.99950081, 51.98086999, 49.04606958, 46.21742756, 43.48953175, 40.86438026, 38.32897415, 35.9111902, 33.60366679, 31.36620548, 29.25810043, 27.26016277, 25.33436861, 23.52832203, 21.83230634, 20.20725259, 18.68336788, 17.24877159, 15.89862405, 14.65712437, 13.47214896, 12.35542792, 11.33991416, 10.36420209, 9.440788341, 8.612194737, 7.826606509, 7.078008771, 6.387697882, 5.752794218, 5.162377181, 4.592156449, 4.076342228, 3.586660745, 3.120234351, 2.695352478, 2.302422231, 1.929560777, 1.587058651, 1.261615037, 0.961547574, 0.671581848, 0.415344641, 0.167703835, -0.055788884, -0.266081108, -0.460160219, -0.6384921, -0.803665771, -0.95280532, -1.089612412, -1.218894539, -1.330816403, -1.433134834, -1.521798239, -1.61281749, -1.685171164, -1.748774697, -1.824947393, -1.869291211, -1.919426596, -1.962779073, -2.010004471, -2.056958278, -2.106915463, -2.137781096, -2.169012949, -2.208400104, -2.246651436, -2.271554896, -2.300684784, -2.321922889, -2.341299582, -2.367853582, -2.382587788, -2.397842195, -2.40574571, -2.41658175, -2.428523833, -2.429057786, -2.437691491, -2.447634592, -2.456583053, -2.466197302, -2.480427891, -2.503263931, -2.534327999, -2.56735631, -2.623242801, -2.697527559, -2.799488116, -2.941510933, -3.136445289, -3.407015884, -3.773734912, -4.274679156, -4.957240854, -5.84054521, -6.95245912, -8.229961109],
mu_2: [10.11279513, 7.770352725, 13.12514619, 18.86346319, 26.0, 39.7584741, 48.0, 52.24323758, 56.08474704, 60.66052028, 63.77378899, 68.79225981, 74.55092495, 82.10240562, 89.91580362, 99.86344223, 109.8854973, 122.0905173, 134.9205245, 150.1954341, 165.5561763, 182.6703335, 199.6600693, 217.9770489, 236.2656043, 254.5206731, 272.9632256, 290.6334221, 308.0098765, 324.8292976, 340.8766836, 355.442382, 368.9213716, 381.3955747, 392.885811, 402.6777229, 410.5907043, 417.6843355, 423.3470394, 427.9791561, 431.5502447, 433.8375244, 434.8004796, 435.3066996, 434.9828234, 433.4925342, 431.9292566, 429.3102906, 426.2907469, 423.1008996, 419.1481421, 414.7761543, 409.9786354, 405.0314957, 399.7558796, 394.3670598, 388.5238795, 382.7374037, 376.7736165, 370.7288147, 364.5412953, 358.5572719, 352.293695, 346.1714307, 340.0336128, 333.7435023, 327.7813875, 321.7860835, 315.8033369, 309.8798359, 304.1390618, 298.321386, 292.6251645, 287.063184, 281.6429841, 276.3156579, 271.0000261, 265.8900686, 260.7994498, 255.8300132, 250.9296943, 246.2315314, 241.5308595, 236.9549992, 232.489607, 228.0226635, 223.6806842, 219.3635523, 215.0323858, 210.832678, 206.6547215, 202.4945207, 198.3025938, 194.1682534, 190.0809625, 186.059191, 181.9879784, 178.0347824, 174.0459223, 170.1143112, 166.2235604, 162.4113316, 158.6054727, 154.8116149, 151.0441475, 147.3701595, 143.6761117, 140.0112141, 136.406703, 132.8270467, 129.2737356, 125.7777699, 122.3131771, 118.8394449, 115.4182493, 112.0540883, 108.7120941, 105.4466725, 102.2010201, 98.99834385, 95.86141645, 92.81023381, 89.77140325, 86.83106141, 83.92687516, 81.10449855, 78.33059554, 75.64825806, 73.04742107, 70.47486799, 68.01979237, 65.61151219, 63.29295152, 61.03288382, 58.84546545, 56.73133403, 54.67562862, 52.70152094, 50.78913283, 48.93524506, 47.14199955, 45.42751077, 43.74810579, 42.14543587, 40.58795409, 39.09008945, 37.64841345, 36.24304964, 34.90317234, 33.59938343, 32.34859618, 31.14511465, 29.97529319, 28.85230646, 27.7720412, 26.72586867, 25.72936557, 24.75833806, 23.83742534, 22.95090576, 22.09307736, 21.27675587, 20.49158785, 19.74229606, 19.02552627, 18.34444448, 17.68643739, 17.06591121, 16.46785679, 15.89743828, 15.35949916, 14.85061966, 14.35392972, 13.8833472, 13.44260977, 13.0110046, 12.60952872, 12.22325904, 11.85805387, 11.51208879, 11.18573273, 10.87660458, 10.59413026, 10.32674988, 10.0842746, 9.857029553, 9.658149541, 9.476343336, 9.322814549, 9.185113931, 9.07482699, 8.993569752, 8.940985197, 8.916090809, 8.922877831, 8.964492093, 9.045510866, 9.171683804, 9.343332921, 9.562863338, 9.833703433, 10.14060623, 10.47906645, 10.80237748, 11.05249316, 11.13324746, 10.91140156],
},
color : 'grey',
},
'43_old' : {
size : {
'FT240' : { PN:'5943003801', A:61.0, B:35.55, C:12.7, W:106.0, CC:9.20, le:14.5, Ae:1.58, Ve:22.8, Al:1075.0 },
'FT140' : { PN:'5943002701', A:35.55, B:23.00, C:12.7, W:33.0, CC:11.20, le:8.90, Ae:0.79, Ve:7.00, Al:885.0 },
'FT125' : { PN:'5943001701', A:31.75, B:19.05, C:9.50, W:23.0, CC:12.90, le:7.60, Ae:0.59, Ve:4.50, Al:775.0 },
'FT114' : { PN:'5943001001', A:29.00, B:19.00, C:7.50, W:13.0, CC:19.80, le:7.30, Ae:0.37, Ve:2.70, Al:510.0 },
'FT82' : { PN:'5943000601', A:21.00, B:13.20, C:6.35, W:6.40, CC:21.30, le:5.20, Ae:0.243, Ve:1.26, Al:470.0 },
'FT50B' : { PN:'2643801902', A:12.70, B:7.9, C:12.70, W:4.70, CC:10.421, le:3.12, Ae:0.3, Ve:0.9325, Al:1206.0 },
'FT50' : { PN:'5943000301', A:12.70, B:7.15, C:4.90, W:2.00, CC:22.90, le:2.95, Ae:0.129, Ve:0.38, Al:440.0 },
'FT37' : { PN:'5943000201', A:9.50, B:4.75, C:3.30, W:0.83, CC:28.60, le:2.07, Ae:0.072, Ve:0.15, Al:350.0 },
},
manufacturer : "Fair-Rite",
mat : "NiZn",
mu_i : 800,
B : 2900,
H : 10,
Br : 1300,
Hc : 0.45,
Tc : 130,
R : 1.0e5,
complex_mu : {
freq: [10000.0, 50000.0, 100000.0, 150000.0, 200000.0, 250000.0, 300000.0, 333000.0, 400000.0, 480000.0, 500000.0, 600000.0, 640000.0, 667000.0, 800000.0, 960000.0, 1000000.0, 2000000.0, 2330000.0, 2680000.0, 3090000.0, 3560000.0, 4090000.0, 4710000.0, 5430000.0, 6250000.0, 7200000.0, 8289999.999999999, 9540000.0, 11000000.0, 12600000.0, 14600000.0, 16800000.0, 19300000.0, 22200000.0, 25600000.0, 29500000.0, 33900000.0, 39100000.0, 45000000.0, 51800000.0, 59600000.0, 68700000.0, 75600000.0, 124000000.0, 216000000.0] ,
mu_1: [791.5, 789.1, 788.0, 788.1, 788.6, 789.4, 790.6, 791.5, 793.5, 795.1, 795.3, 793.8, 791.9, 790.2, 777.6, 754.1, 747.1, 589.1, 556.6, 531.1, 501.4, 470.5, 439.8, 409.3, 378.8, 349.8, 321.8, 294.7, 268.7, 243.5, 219.8, 194.2, 171.0, 149.3, 128.7, 109.7, 92.57, 78.12, 64.65, 53.21, 43.43, 35.07, 28.03, 23.99, 10.09, 2.919] ,
mu_2: [3.5, 3.9, 5.391, 7.078, 8.472, 9.701, 10.9, 11.73, 13.55, 15.86, 16.46, 19.56, 21.21, 22.65, 35.32, 57.44, 62.8, 167.3, 186.2, 201.5, 213.2, 222.2, 227.9, 230.9, 231.5, 230.3, 227.7, 224.2, 220.0, 214.9, 209.1, 201.7, 193.6, 184.6, 174.4, 163.3, 151.8, 140.4, 128.7, 117.4, 106.5, 96.01, 85.93, 79.54, 52.37, 31.52] ,
},
color : 'grey',
},
'31' : {
size : {
'FT400x2' : { PN:'2631814002', A:101.6, B:76.2, C:50.8, W:840.0, CC:4.2992, le:27.5, Ae:6.40, Ve:1765.0, Al:2922.0 },
'FT400' : { PN:'2631814002', A:101.6, B:76.2, C:25.4, W:420.0, CC:8.5985, le:27.5, Ae:3.20, Ve:882.5, Al:1461.0 },
'FT240x3' : { PN:'2631803802', A:61.0, B:35.55, C:38.1, W:354.0, CC:3.0542, le:14.5, Ae:4.74, Ve:68.4, Al:4113.0 },
'FT240x2' : { PN:'2631803802', A:61.0, B:35.55, C:25.4, W:236.0, CC:4.5813, le:14.5, Ae:3.16, Ve:45.6, Al:2742.0 },
'FT240' : { PN:'2631803802', A:61.0, B:35.55, C:12.7, W:118.0, CC:9.1627, le:14.5, Ae:1.58, Ve:22.8, Al:1371.0 },
'FT200' : { PN:'2631626202', A:50.80, B:25.40, C:38.1, W:278.0, CC:2.3791, le:11.1, Ae:4.65, Ve:51.432, Al:5282.0 },
'FT114' : { PN:'2631801202', A:29.00, B:19.00, C:13.85, W:25.0, CC:1.0795, le:7.33, Ae:0.679, Ve:4.977, Al:1164.0 },
'FT74' : { PN:'2631626302', A:18.70, B:10.15, C:14.65, W:13.3, CC:7.2188, le:4.26, Ae:0.59, Ve:2.513, Al:1741.0 },
},
manufacturer : "Fair-Rite",
mat : "MnZn",
mu_i : 1500,
B : 3600,
H : 5,
Br : 2600,
Hc : 0.34,
Tc : 130,
R : 3.0e3,
complex_mu : {
freq: [10000.0, 50000.0, 100000.0, 150000.0, 200000.0, 250000.0, 300000.0, 333000.0, 400000.0, 480000.0, 500000.0, 600000.0, 640000.0, 667000.0, 800000.0, 960000.0, 1000000.0, 2000000.0, 2330000.0, 2680000.0, 3090000.0, 3560000.0, 4090000.0, 4710000.0, 5430000.0, 6250000.0, 7200000.0, 8290000.0, 9540000.0, 11000000.0, 12600000.0, 14600000.0, 16800000.0, 19300000.0, 22200000.0, 25600000.0, 29500000.0, 33900000.0, 39100000.0, 45000000.0, 51800000.0, 59600000.0, 68700000.0, 75600000.0, 124000000.0, 216000000.0, 353000000.0, 617000000.0, 1000000000.0],
mu_1: [1423.52, 1406.98, 1401.93, 1379.45, 1386.57, 1385.58, 1387.5, 1388.08, 1388.37, 1391.6, 1390.55, 1396.46, 1392.65, 1390.14, 1463.65, 1409.68, 1400.65, 980.76, 854.67, 757.67, 668.67, 590.0, 520.67, 460.33, 409.0, 365.67, 329.0, 299.0, 272.0, 248.0, 227.0, 206.0, 187.0, 168.0, 149.6666667, 132.3333333, 115.6666667, 100.7, 86.2, 73.33333333, 61.8, 51.26666667, 43.0, 39.06, 14.7, 1.61, 0.0, 0.0, 0.0],
mu_2: [10.45, 27.02, 41.61, 57.82, 72.67, 89.6, 106.76, 119.0, 141.03, 173.33, 183.07, 228.68, 248.07, 260.16, 345.99, 444.47, 463.22, 734.77, 752.33, 728.33, 696.33, 657.67, 616.0, 571.33, 527.0, 484.33, 444.33, 408.33, 375.33, 346.67, 321.67, 299.0, 278.67, 260.0, 242.3333333, 226.3333333, 210.3333333, 195.0, 180.0, 165.3333333, 151.6666667, 138.6666667, 130.0, 125.0, 86.5, 52.1, 32.1, 18.7, 12.5],
},
color : 'grey',
},
};
this.mat = this.cores[this.material];
this.core = this.mat.size[this.size];
// Toroid datasheet info:
this.getMaterialDataStrings = function () {
retval = [];
retval.push(["Size", this.size]);
retval.push(["Material", this.material.toString()]);
retval.push(["Type", this.mat.mat]);
retval.push(["μi", this.mat.mu_i.toString()]);
retval.push(["B", this.mat.B.toString() + " G"]);
retval.push(["H", this.mat.H.toString() + " Oe"]);
retval.push(["Br", this.mat.Br.toString() + " G"]);
retval.push(["Hc", this.mat.Hc.toString() + " Oe"]);
retval.push(["Tc", this.mat.Tc.toString() + " C"]);
retval.push(["ρ", this.mat.R.toPrecision(2).toString() + " Ω cm"]);
retval.push(["P/N", this.core.PN]);
return retval;
};
this.setMaterial = function (material) {
this.material = material;
this.mat = this.cores[this.material];
this.core = this.mat.size[this.size];
};
this.setSize = function (size) {
this.size = size;
this.core = this.mat.size[this.size];
};
this.setPrimaryTurns = function (turns) {
this.Np = turns;
};
this.setSecondaryTurns = function (turns) {
this.Ns = turns;
};
this.getMaterialTypes = function () {
return ["75", "31", "78", "77", "79", "43", "43_old", "46", "80", "52", "61", "67"];
};
this.getSizesForMaterial = function (material) {
return Object.keys(this.cores[material].size);
};
// Returns the complex permeability for the given frequency. retval[0]:real/loss retval[1]:imag/inductive
this.getComplexPermeability = function (frequency) {
// Use the proximityResistance look-up table and interpolate values depending on the spacing ratio and the number of turns.
var mu_1 = 0.0;
var mu_2 = 0.0;
var i_before = 0;
var i_after = this.cores[this.material].complex_mu.freq.length-1;
var i = Math.floor((i_after + i_before)/2);
// Divide-and-conquer. Find the indices before and after the value. Use them for interpolation later.
while((i_before+1) < i_after) {
if(frequency >= this.cores[this.material].complex_mu.freq[i]) {
i_before = i;
} else {
i_after = i;
}
i = Math.floor((i_after + i_before)/2);
}
// Linear interpolation between empirical proximity resistance values:
mu_1 = (((frequency - this.cores[this.material].complex_mu.freq[i]) / (this.cores[this.material].complex_mu.freq[i+1] - this.cores[this.material].complex_mu.freq[i])
* (this.cores[this.material].complex_mu.mu_1[i+1] - this.cores[this.material].complex_mu.mu_1[i])) + this.cores[this.material].complex_mu.mu_1[i]);
mu_2 = (((frequency - this.cores[this.material].complex_mu.freq[i]) / (this.cores[this.material].complex_mu.freq[i+1] - this.cores[this.material].complex_mu.freq[i])
* (this.cores[this.material].complex_mu.mu_2[i+1] - this.cores[this.material].complex_mu.mu_2[i])) + this.cores[this.material].complex_mu.mu_2[i]);
return [mu_1, mu_2];
};
// In Henries:
this.getInductance = function (frequency, mu) {
// const mu = this.getComplexPermeability(frequency);
const L = mu[0] * 4.0 * Math.PI * this.Np**2 * 1e-9 / this.core.CC;
return L;
};
// In Henries:
this.getMutualInductance = function (frequency, mu) {
// const mu = this.getComplexPermeability(frequency);
const M = mu[0] * 4.0 * Math.PI * this.Np * this.Ns * 1e-9 / this.core.CC;
return M;
};
this.getEfficiency = function (frequency, mu) {
//const efficiency = 1.0 - (mu[1] / (mu[0] + mu[1]));
const efficiency = (mu[0] / Math.sqrt(mu[0]**2 + mu[1]**2));
return efficiency;
};
// In Ohms:
this.getImpedance = function (frequency, mu) {
// const mu = this.getComplexPermeability(frequency);
const Lo = 4.0 * Math.PI * this.Np**2 * 1e-9 / this.core.CC;
const Rs = 2.0 * Math.PI * frequency * Lo * mu[1];
const Xs = 2.0 * Math.PI * frequency * Lo * mu[0];
return { real:Rs , imag:Xs };
};
this.getVSWR = function (Vrms) {
// First calculate the reflection coefficient gamma. Assume Z_load and Z0 are complex numbers:
const Z0 = math.complex(this.Z0, 0.0);
const Zl = math.complex(this.Zl * (this.Np/this.Ns)**2, 0.0);
const gamma = math.divide( math.subtract(Zl, Z0) , math.add(Z0, Zl));
const swr = (1.0 + gamma.toPolar().r) / (1.0 - gamma.toPolar().r);
return swr;
};
this.getInsertionLoss = function (frequency, mu) {
//
const eff = this.getEfficiency(frequency, mu);
return 10.0 * Math.log10(1.0/eff);
}
// In Ohms:
this.getPrimaryWireResistance = function(frequency) {
// Calculate AC wire-resistance, using IEC 60287-1-1:
const Ks = 1.0; // Solid core conductor
const xs4 = ((8 * Math.PI * frequency * Ks) / (this.Rdc * 1e7))**2;
const Ys = xs4 / (192.0 + 0.8 * xs4);
const Rac = this.Rdc * (1 + Ys);
return Rac;
};
// In Ohms:
this.getSecondaryWireResistance = function(frequency) {
// Calculate AC wire-resistance, using IEC 60287-1-1:
const Ks = 1.0; // Solid core conductor
const xs4 = ((8 * Math.PI * frequency * Ks) / (this.Rdc * 1e7))**2;
const Ys = xs4 / (192.0 + 0.8 * xs4);
const Rac = this.Rdcs * (1 + Ys);
return Rac;
};
this.getWireResistance2 = function(frequency, r) {
// Al-Asadi equation:
const mu0 = Math.PI * 4e-7;
const cu_sigma = 58e6;
const delta = 1/Math.sqrt(Math.PI * frequency * this.mat.mu_i * mu0 * cu_sigma);
const k = delta * (1-Math.E**(-r/delta));
const Rac = 1/(Math.PI * cu_sigma * k * (2*r - k));
return Rac;
};
this.setLeakage = function(leakage_model) {
//
this.leakage = leakage_model;
}
this.solveTransformer = function(frequency, mu) {
// Solve the voltages, currents and losses:
const Zc = this.getImpedance(frequency, mu);
const Rs = Zc.real;
const Xs = Zc.imag;
const Q = Xs / Rs;
// Calculate B due to primary:
var B = (this.Vrms * 1e8) / (4.44 * frequency * this.Np * this.core['Ae']);
const Z0 = 50.0; // Source impedance in ohms
const R1 = this.getPrimaryWireResistance(frequency); //0.1; // Resistance of primary winding in ohms
const Xp = (Rs**2 + Xs**2) / Xs; // Get parallel equivalent reactance
const Rp = (Rs**2 + Xs**2) / Rs; // Get parallel equivalent resistance
const R2 = this.getSecondaryWireResistance(frequency) * (this.Np/this.Ns)**2; //0.1; // Secondary winding resistance in ohms, reflected at primary side
const Zl = this.Zl*(this.Np/this.Ns)**2; // Load impedance reflected to primary side in ohms
const Cc = 1e-12; // Parasitic capacitance between primary and secondary windings
switch (this.leakage) {
case 'Model_0':
this.Cp = this.Cin + 1e-15;
this.L1 = 1e-12;
this.L2 = 1e-12;
this.Cs = 1e-15;
break;
case 'Model_1':
this.Cp = this.Cin + (0.9 + (78.1/this.Np**2))*1e-12 + (1e-10 * primary_winding_capacitance_slider.value); // Primary winding parasitic capacitance in F
this.L1 = 1e-7 + (1e-7 * primary_winding_inductance_slider.value); // Primary leakage inductance in H
this.L2 = 1e-7 + (1e-7 * secondary_winding_inductance_slider.value); // * (this.Np/this.Ns)**2; // Secondary leakage inductance, reflected into primary side, in H
this.Cs = (0.9 + (78.1/this.Ns**2))*1e-12 *(this.Np/this.Ns)**2 + (1e-10 * secondary_winding_capacitance_slider.value); // Secondary winding parasitic capacitance in F, reflected at primary side
break;
case 'Model_2':
break;
default:
this.Cp = this.Cin + 1e-10 + (1e-10 * primary_winding_capacitance_slider.value); // Primary winding parasitic capacitance in F
this.L1 = 1e-6 + (1e-6 * primary_winding_inductance_slider.value); // Primary leakage inductance in H
this.L2 = 1e-6 + (1e-6 * secondary_winding_inductance_slider.value); // * (this.Np/this.Ns)**2; // Secondary leakage inductance, reflected into primary side, in H
this.Cs = 1e-15 + 1e-10 + (1e-10 * secondary_winding_capacitance_slider.value); // Secondary winding parasitic capacitance in F, reflected at primary side
break;
}
const w = 2 * Math.PI * frequency;
let Z1 = math.complex(R1, w*this.L1);
let Z2 = math.complex(R2, w*this.L2);
let ZCp = math.complex(0.0, -1.0/(w*this.Cp));
//let Zp = math.complex(Rp, Xp);
let Zp = math.complex(Rs, Xs);
//let ZRp = math.complex(Rp, 0.0);
//let ZLp = math.complex(0.0, Xp);
//let Zp = math.divide(math.multiply(ZRp, ZLp), math.add(ZRp, ZLp));
let ZCs = math.complex(0.0, -1.0/(w*this.Cs));
let Zlc = math.divide(math.multiply(ZCs,math.complex(Zl,0.0)), math.add(ZCs,math.complex(Zl,0.0)));
let ZCc = math.complex(0.0, -1.0/(w*Cc));
// Setup the 3x3 matrix. Z31 = Z13 = 0
//let Z11 = math.divide(math.add(math.unaryMinus(math.multiply(Zcp,Z1)), math.unaryMinus(math.multiply(Z0,Z1)), math.unaryMinus(math.multiply(Z0,Zcp))), math.multiply(Z0, Zcp, Z1));
const zero = math.complex(0,0);
let G11 = math.add(math.unaryMinus(math.inv(Z0)), math.unaryMinus(math.inv(ZCp)), math.unaryMinus(math.inv(Z1)), math.unaryMinus(math.inv(ZCc)));
let G21 = math.inv(Z1);
let G31 = math.inv(ZCc);
let G12 = G21;
let G22 = math.add(math.unaryMinus(math.inv(Z1)), math.unaryMinus(math.inv(Zp)), math.unaryMinus(math.inv(Z2)));
let G32 = math.inv(Z2);
let G13 = math.inv(ZCc);
let G23 = math.inv(Z2);
let G33 = math.add(math.unaryMinus(math.inv(Z2)), math.unaryMinus(math.inv(Zlc)), math.unaryMinus(math.inv(ZCc)));
let GGG = math.matrix([[G11, G12, G13], [G21, G22, G23], [G31, G32, G33]]);
let iii = math.matrix([[-this.Vrms/Z0], [zero], [zero]]);
let VVV = math.multiply(math.inv(GGG), iii);
// Power dissipated in Z0:
//let PZ0 = math.divide(math.square(math.subtract(this.Vrms, VVV.get([0,0]))), Z0);
let PZ0 = math.subtract(this.Vrms, VVV.get([0,0])).toPolar().r**2 / Z0;
// Power dissipated in Rc:
let PRp = math.divide(VVV.get([1,0]).toPolar().r**2, Rp); // Check this!
// Power dissipated in Zl:
let PZl = math.divide(VVV.get([2,0]).toPolar().r**2, Zl);
// SWR: Calculate equivalent impedance of circuit as-seen from the source. Then use gamma eqn, followed by VSWR eqn:
return [VVV.get([0,0]), VVV.get([1,0]), VVV.get([2,0]), PZ0, PRp, PZl];
};
this.recalculate = function (frequencies) {
// Input variables:
this.cond_diameter_meters = 0.001 * awgToMm(40.0 - conductor_diameter_slider.value)[0];
this.Pin = 10.0 ** power_slider.value;
this.Z0 = 50.0;
this.Vrms = Math.sqrt(this.Pin * this.Z0);
this.Zl = 5.0 * 10.0**load_impedance_slider.value;
this.Cin = 1e-12 * primary_capacitance_slider.value;
// Frequency independent characteristics:
this.N_max = Math.PI / (Math.atan2(0.5e3 * this.cond_diameter_meters, (0.5 * this.core.B - 0.5e3 * this.cond_diameter_meters)));
this.Np = 1 + Math.round(primary_turns_slider.value * (this.N_max - 1) * 0.5);
this.Ns = 1 + Math.round(secondary_turns_slider.value * (this.N_max - 1) * 0.5);
//this.cond_length_meters = this.N * (2*this.core.C + this.core.A - this.core.B) * 1e-3;
//this.cond_length_meters = 2e-3 * Math.sqrt ( (Math.PI * 0.5 * (this.core.A + this.core.B))**2 + (this.N * (2*this.core.C + this.core.A - this.core.B))**2 );
this.cond_length_meters = 2e-3 * Math.sqrt ( (Math.PI * 0.5 * (this.core.A + this.core.B))**2 + (this.Np * (2*(this.cond_diameter_meters*1e3) + 2*this.core.C + this.core.A - this.core.B))**2 );
this.cond_length_meters_secondary = 2e-3 * Math.sqrt ( (Math.PI * 0.5 * (this.core.A + this.core.B))**2 + (this.Ns * (2*(this.cond_diameter_meters*1e3) + 2*this.core.C + this.core.A - this.core.B))**2 );
this.Rdc = 1.68e-8 * this.cond_length_meters / (Math.PI * ((this.cond_diameter_meters*0.5)**2.0));
this.Rdcs = 1.68e-8 * this.cond_length_meters_secondary / (Math.PI * ((this.cond_diameter_meters*0.5)**2.0));
//const Cpmult = 12.9*()
//this.C = (0.9 + (78.1/this.N**2))*1e-12; // In Farads
// Low frequency mean primary inductance based on Al:
this.L = (this.Np**2) * this.core.Al * 1.0e-9; // In Henries
// Mutual inductance (based on initial permeability):
this.M = this.Np * this.Ns * this.core.Al * 1.0e-9; // In Henries
// Based on David Knight's equation:
this.C = (0.9 + (78.1/this.Np**2))*1e-12; // In Farads
this.SRF = 1.0/(2.0*Math.PI* Math.sqrt(this.L*this.C));
//console.log(this.Rdc, this.L, this.C);
// Clear the frequency dependent characteristics before appending new data:
this.X_vs_f = [];
this.M_vs_f = [];
this.SWR_vs_f = [];
this.eff_vs_f = [];
this.IL_vs_f = [];
this.P0_vs_f = [];
this.Pl_vs_f = [];
this.Ploss_vs_f = [];
this.S11_real_vs_f = [];
this.S11_imag_vs_f = [];
this.V1_vs_f = [];
this.V2_vs_f = [];
this.V3_vs_f = [];
this.L_vs_f = [];
this.Z_vs_f = [];
this.R_vs_f = [];
this.Q_vs_f = [];
this.i_vs_f = [];
this.P_vs_f = [];
this.mu1_vs_f = [];
this.mu2_vs_f = [];
this.H_vs_f = [];
this.B_vs_f = [];
frequencies.every(freq => {
const mu = this.getComplexPermeability(freq);
// Stop iterating if mu becomes negative:
if(mu[0] < 0.0) return false;
const L = this.getInductance(freq, mu);
const M = this.getMutualInductance(freq, mu);
const Z = this.getImpedance(freq, mu);
const eff = this.getEfficiency(freq, mu);
//const IL = this.getInsertionLoss(freq, mu);
//const SWR = this.getVSWR(freq, mu);
const VVV = this.solveTransformer(freq, mu);
//const SWR = (math.max(VVV[0]*0.5, VVV[1]) / math.min(VVV[0]*0.5, VVV[1]));
//const SWR = this.getVSWR(VVV[0]);
const Vin = math.complex(this.Vrms, 0.0);
const Z0 = math.complex(this.Z0, 0.0);
// Zcct is the impedance of the rest of the circuit, looking from
const Zcct = math.divide(math.multiply(Z0, VVV[0]), math.subtract(VVV[0], Vin)); //math.complex(this.Zcct * (this.Np/this.Ns)**2, 0.0);
//console.log(freq, Z0, Zcct, VVV[0]);
//const gamma = math.divide( math.subtract(Zcct, Z0) , math.add(Zcct, Z0));
let gamma = (Zcct.toPolar().r - this.Z0) / (Zcct.toPolar().r + this.Z0);
if(gamma < 0) {
gamma *= -1.0;
}
const SWR = (1.0 + gamma) / (1.0 - gamma);
//console.log(freq, VVV);
//console.log(freq, eff, SWR, VVV);
let S11 = math.divide(math.abs(math.subtract(Zcct, this.Z0)), math.add(Zcct, this.Z0));
// Make freq in MHz from Hz:
freq *= 1e-6;
this.mu1_vs_f.push({x:freq, y:mu[0]});
this.mu2_vs_f.push({x:freq, y:mu[1]});
//this.L_vs_f.push({x:freq, y:(mu[0] * 4.0 * Math.PI * this.N**2 * 1e-3 / this.core.CC)});
this.L_vs_f.push({x:freq, y:L*1e6}); // Convert H to uH
this.M_vs_f.push({x:freq, y:M*1e6}); // Convert H to uH
this.SWR_vs_f.push({x:freq, y:SWR});
this.eff_vs_f.push({x:freq, y:100.0 * eff});
//this.eff_vs_f.push({x:freq, y:100.0 * VVV[5] / (VVV[4] + VVV[5])});
//const IL = 20.0 * Math.log10(VVV[0]/VVV[3]);
//this.IL_vs_f.push({x:freq, y:IL});
this.S11_real_vs_f.push({x:freq, y:math.abs(S11.toPolar().r)});
this.S11_imag_vs_f.push({x:freq, y:math.abs(S11.toPolar().phi * 180.0 / Math.PI)});
this.V1_vs_f.push({x:freq, y:VVV[0].toPolar().r});
this.V2_vs_f.push({x:freq, y:VVV[1].toPolar().r});
this.V3_vs_f.push({x:freq, y:VVV[2].toPolar().r});
const P0 = math.divide(math.square(VVV[0]) , Zcct).toPolar().r; //this.Vrms**2 / this.Z0; // (VVV[0].toPolar().r**2 / this.Z0);
const Pl = VVV[5]; //(VVV[2].toPolar().r**2 / (this.Zl*((this.Np/this.Ns)**2)));
const Ploss = VVV[4];
this.P0_vs_f.push({x:freq, y:P0});
this.Pl_vs_f.push({x:freq, y:Pl});
this.Ploss_vs_f.push({x:freq, y:Ploss});
const IL = 10.0 * Math.log10(P0/Pl);
this.IL_vs_f.push({x:freq, y:IL});
this.R_vs_f.push({x:freq, y:Z.real});
this.X_vs_f.push({x:freq, y:Z.imag});
this.Q_vs_f.push({x:freq, y:(Z.imag/Z.real)});
const ZZ = math.complex(Z.real, Z.imag);
const II = math.divide(this.Vrms, ZZ).toPolar();
this.i_vs_f.push({x:freq, y:(II.r*1e3)}); // Convert A to mA
//this.P_vs_f.push({x:freq, y:((this.Vrms**2 / Z.real)*1e3)});
this.P_vs_f.push({x:freq, y:((Z.real * II.r**2)*1e3)}); // Convert W to mW
this.Z_vs_f.push({x:freq, y:(ZZ.toPolar().r)});
const H = ((0.4 * Math.PI * this.N * 1.414 * II.r) / this.core.le);
const B = ((this.Vrms * 1e8) / (4.44e3 * freq * this.N * this.core.Ae));
//const B = Math.sqrt(mu[0]**2 + mu[1]**2) * H;
this.H_vs_f.push({x:freq, y:H});
this.B_vs_f.push({x:freq, y:B});
return true;
});
};
// Inductance due to primary. (Assumes open-circuit at the secondary.)
this.calculateInductance = function () {
return this.L_vs_f;
};
// Mutual Inductance of the Transformer:
this.calculateMutualInductance = function () {
return this.M_vs_f;
};
// SWR of the Transformer + Z_L:
this.calculateSWR = function () {
return this.SWR_vs_f;
};
// Efficiency of the Transformer:
this.calculateEfficiency = function () {
return this.eff_vs_f;
};
// Mutual Inductance of the Transformer:
this.calculateInsertionLoss = function () {
return this.IL_vs_f;
};
this.calculateS11real = function () {
return this.S11_real_vs_f;
};
this.calculateS11imag = function () {
return this.S11_imag_vs_f;
};
this.calculateP0 = function () {
return this.P0_vs_f;
};
this.calculatePl = function () {
return this.Pl_vs_f;
};
this.calculatePloss = function () {
return this.Ploss_vs_f;
};
this.calculateV1 = function () {
return this.V1_vs_f;
};
this.calculateV2 = function () {
return this.V2_vs_f;
};
this.calculateV3 = function () {
return this.V3_vs_f;
};
this.calculateImpedance = function () {
return this.Z_vs_f;
};
this.calculatePermeability1 = function () {
return this.mu1_vs_f;
};
this.calculatePermeability2 = function () {
return this.mu2_vs_f;
};
this.calculateResistance = function () {
return this.R_vs_f;
};
this.calculateReactance = function () {
return this.X_vs_f;
};
this.calculateQualityFactor = function () {
return this.Q_vs_f;
};
this.calculateCurrent = function () {
return this.i_vs_f;
};
this.calculatePowerLoss = function () {
return this.P_vs_f;
};
this.calculateH = function () {
return this.H_vs_f;
};
this.calculateB = function () {
return this.B_vs_f;
};
}
function Controller() {
// Define global storage for calculated values, so we don't recalculate the same things multiple times:
this.t_mode = 'Transformer';
this.t_size = 'FT240';
this.t_material = '43';
this.t_type = 'ferrite';
this.frequencies = [];
// Create a ferrite and powdered-iron object:
this.ferrite = new Ferrite();
// this.powdered_iron = new PowderedIron();
this.toroid = this.ferrite;
this.setSize = function (size) {
this.t_size = size;
this.toroid.setSize(this.t_size);
};
this.setMaterial = function (material) {
if(material in this.ferrite.cores) {
this.toroid = this.ferrite;
this.toroid.setMaterial(material);
this.t_material = material;
this.t_type = 'ferrite';
/*
// Now re-configure the chart axes options:
this.myChart.data = {
datasets: [
{
label: '|Zp| (\u03A9)',
fill: false,
borderColor: 'orange',
backgroundColor: 'orange',
data: this.toroid.calculateImpedance(),
borderWidth: 1,
yAxisID: 'ohmsID'
},
{
label: 'SWR',
fill: false,
borderColor: 'black',
backgroundColor: 'black',
data: this.toroid.calculateSWR(),
borderWidth: 1,
yAxisID: 'swrID'
},
{
label: 'Eff (%)',
fill: false,
borderColor: 'blue',
backgroundColor: 'blue',
data: this.toroid.calculateEfficiency(),
borderWidth: 1,
yAxisID: 'effID'
},
{
label: 'IL (dB)',
fill: false,
borderColor: 'red',
backgroundColor: 'red',
data: this.toroid.calculateInsertionLoss(),
borderWidth: 1,
yAxisID: 'ilID'
},
{
label: 'Pin (W)',
fill: false,
borderColor: '#69359C',
backgroundColor: '#9A4EAE',
data: this.toroid.calculateP0(),
borderWidth: 1,
yAxisID: 'wattsID',
hidden: false
},
{
label: 'Ploss (W)',
fill: false,
borderColor: 'cyan',
backgroundColor: 'cyan',
data: this.toroid.calculatePloss(),
borderWidth: 1,
yAxisID: 'wattsID',
hidden: false
},
{
label: 'Pout (W)',
fill: false,
borderColor: 'rgb(0,128,128)',
backgroundColor: 'rgb(0,118,118)',
data: this.toroid.calculatePl(),
borderWidth: 1,
yAxisID: 'wattsID',
hidden: false
},
{
label: 'S11 real(\u03A9)',
fill: false,
borderColor: 'orange',
backgroundColor: 'orange',
data: this.toroid.calculateS11real(),
borderWidth: 1,
yAxisID: 'ohmsID'
},
{
label: 'S11 imag(\u03A9)',
fill: false,
borderColor: 'magenta',
backgroundColor: 'magenta',
data: this.toroid.calculateS11imag(),
borderWidth: 1,
yAxisID: 'ohmsID'
},
{
label: 'M (\u03bcH)',
fill: false,
borderColor: 'orange',
backgroundColor: 'orange',
data: this.toroid.calculateMutualInductance(),
borderWidth: 1,
yAxisID: 'lID'
},
{
label: '|Z| (\u03A9)',
fill: false,
borderColor: 'black',
backgroundColor: 'black',
data: this.toroid.calculateImpedance(),
borderWidth: 1,
yAxisID: 'ohmsID'
},
{
label: 'X (j\u03A9)',
fill: false,
borderColor: 'blue',
backgroundColor: 'blue',
data: this.toroid.calculateReactance(),
borderWidth: 1,
yAxisID: 'ohmsID'
},
{
label: 'R (\u03A9)',
fill: false,
borderColor: 'red',
backgroundColor: 'red',
data: this.toroid.calculateResistance(),
borderWidth: 1,
yAxisID: 'ohmsID'
},
{
label: 'Q',
fill: false,
borderColor: '#69359C',
backgroundColor: '#9A4EAE',
data: this.toroid.calculateQualityFactor(),
borderWidth: 1,
yAxisID: 'qID'
},
{
label: 'I (mA)',
fill: false,
borderColor: 'rgb(0,128,128)',
backgroundColor: 'rgb(0,118,118)',
data: this.toroid.calculateCurrent(),
borderWidth: 1,
yAxisID: 'ccID'
},
{
label: '\u03bc\'',
fill: false,
borderColor: '#0070FF',
backgroundColor: '#1974D2',
data: this.toroid.calculatePermeability1(),
borderWidth: 1,
yAxisID: 'muID',
hidden: true
},
{
label: '\u03bc\'\'',
fill: false,
borderColor: '#F78FA7',
backgroundColor: '#FFC0CB',
data: this.toroid.calculatePermeability2(),
borderWidth: 1,
yAxisID: 'muID',
hidden: true
},
{
label: 'H(Oe)',
fill: false,
borderColor: '#654321',
backgroundColor: '#986960',
data: this.toroid.calculateH(),
borderWidth: 1,
yAxisID: 'hID',
hidden: true
},
{
label: 'B(G)',
fill: false,
borderColor: '#FFD300',
backgroundColor: '#F0E130',
data: this.toroid.calculateB(),
borderWidth: 1,
yAxisID: 'bID',
hidden: true
},
{
label: 'Pd(mW)',
fill: false,
borderColor: 'rgb(50,50,50)',
backgroundColor: 'rgb(100,100,100)',
data: this.toroid.calculatePowerLoss(),
borderWidth: 1,
yAxisID: 'wattsID',
hidden: false
}]
};*/
} else {
console.log("Unrecognised material selected =", material);
}
};
this.setLeakage = function (leakage_model) {
//
this.toroid.setLeakage(leakage_model);
}
this.updateFrequencies = function (slider_value) {
// In Hz:
this.frequencies = [];
//var f = 1.0 * slider_value;
for(var i = Math.floor(5.00); i <= 8.00; i+=0.01) {
this.frequencies.push(10.0**i);
}
};
this.updateChart = function () {
this.myChart.options.plugins.title.text
= this.ferrite.mat.manufacturer + " " + this.t_size + "-" + this.t_material + " [" + this.ferrite.core.PN + "] "
+ this.toroid.Np + ":" + this.toroid.Ns + ' #' + (40.0 - conductor_diameter_slider.value) + ' AWG';
this.myChart.data.datasets[0].data = this.ferrite.calculateImpedance();
this.myChart.data.datasets[1].data = this.ferrite.calculateSWR();
this.myChart.data.datasets[2].data = this.ferrite.calculateEfficiency();
this.myChart.data.datasets[3].data = this.ferrite.calculateInsertionLoss();
this.myChart.data.datasets[4].data = this.ferrite.calculateP0();
this.myChart.data.datasets[5].data = this.ferrite.calculatePloss();
this.myChart.data.datasets[6].data = this.ferrite.calculatePl();
this.myChart.data.datasets[7].data = this.ferrite.calculateS11real();
this.myChart.data.datasets[8].data = this.ferrite.calculateS11imag();
/*
this.myChart.data.datasets[4].data = this.ferrite.calculateQualityFactor();
this.myChart.data.datasets[5].data = this.ferrite.calculateCurrent();
this.myChart.data.datasets[6].data = this.ferrite.calculatePermeability1();
this.myChart.data.datasets[7].data = this.ferrite.calculatePermeability2();
this.myChart.data.datasets[8].data = this.ferrite.calculateH();
this.myChart.data.datasets[9].data = this.ferrite.calculateB();
this.myChart.data.datasets[10].data = this.ferrite.calculatePowerLoss();
*/
this.myChart.update();
};
this.recalculate = function () {
if(this.t_type == 'ferrite') {
this.ferrite.recalculate(this.frequencies);
} else {
this.powdered_iron.recalculate((40.0 - conductor_diameter_slider.value), primary_turns_slider.value, power_slider.value, this.frequencies);
}
drawDesign();
};
function justifyText(pre, post) {
var whitespace = 14 - pre.length - post.length;
return pre + ' '.repeat(whitespace) + post;
}
// Startup methods:
this.updateFrequencies(); // load_impedance_slider.value);
this.chartCanvas = document.getElementById("chartCanvas");
this.chartCanvasContext = chartCanvas.getContext('2d');
this.myChart = new Chart(this.chartCanvasContext, {
type: 'line',
data: {
datasets: [
{
label: '|Zp| (\u03A9)',
fill: false,
borderColor: 'orange',
backgroundColor: 'orange',
data: this.toroid.calculateImpedance(),
borderWidth: 1,
yAxisID: 'ohmsID'
},
{
label: 'SWR',
fill: false,
borderColor: 'black',
backgroundColor: 'black',
data: this.toroid.calculateSWR(),
borderWidth: 1,
yAxisID: 'swrID'
},
{
label: 'Eff (%)',
fill: false,
borderColor: 'blue',
backgroundColor: 'blue',
data: this.toroid.calculateEfficiency(),
borderWidth: 1,
yAxisID: 'effID'
},
{
label: 'IL (dB)',
fill: false,
borderColor: 'red',
backgroundColor: 'red',
data: this.toroid.calculateInsertionLoss(),
borderWidth: 1,
yAxisID: 'ilID'
},
{
label: 'Pin (W)',
fill: false,
borderColor: 'rgb(50,50,50)',
backgroundColor: 'rgb(100,100,100)',
data: this.toroid.calculateP0(),
borderWidth: 1,
yAxisID: 'wattsID',
hidden: false
},
{
label: 'Ploss (W)',
fill: false,
borderColor: 'cyan',
backgroundColor: 'cyan',
data: this.toroid.calculateP0(),
borderWidth: 1,
yAxisID: 'wattsID',
hidden: false
},
{
label: 'Pout (W)',
fill: false,
borderColor: 'rgb(50,50,50)',
backgroundColor: 'rgb(150,150,150)',
data: this.toroid.calculatePl(),
borderWidth: 1,
yAxisID: 'wattsID',
hidden: false
},
{
label: 'S11 real(\u03A9)',
fill: false,
borderColor: 'orange',
backgroundColor: 'orange',
data: this.toroid.calculateS11real(),
borderWidth: 1,
yAxisID: 'ohmsID'
},
{
label: 'S11 imag(\u03A9)',
fill: false,
borderColor: 'magenta',
backgroundColor: 'magenta',
data: this.toroid.calculateS11imag(),
borderWidth: 1,
yAxisID: 'angleID'
},
/*,
{
label: 'Q',
fill: false,
borderColor: '#69359C',
backgroundColor: '#9A4EAE',
data: this.toroid.calculateQualityFactor(),
borderWidth: 1,
yAxisID: 'qID'
},
{
label: 'I (mA)',
fill: false,
borderColor: 'rgb(0,128,128)',
backgroundColor: 'rgb(0,118,118)',
data: this.toroid.calculateCurrent(),
borderWidth: 1,
yAxisID: 'ccID'
},
{
label: '\u03bc\'',
fill: false,
borderColor: '#0070FF',
backgroundColor: '#1974D2',
data: this.toroid.calculatePermeability1(),
borderWidth: 1,
yAxisID: 'muID',
hidden: true
},
{
label: '\u03bc\'\'',
fill: false,
borderColor: '#F78FA7',
backgroundColor: '#FFC0CB',
data: this.toroid.calculatePermeability2(),
borderWidth: 1,
yAxisID: 'muID',
hidden: true
},
{
label: 'H(Oe)',
fill: false,
borderColor: '#654321',
backgroundColor: '#986960',
data: this.toroid.calculateH(),
borderWidth: 1,
yAxisID: 'hID',
hidden: true
},
{
label: 'B(G)',
fill: false,
borderColor: '#FFD300',
backgroundColor: '#F0E130',
data: this.toroid.calculateB(),
borderWidth: 1,
yAxisID: 'bID',
hidden: true
},
{
label: 'Pd(mW)',
fill: false,
borderColor: 'rgb(50,50,50)',
backgroundColor: 'rgb(100,100,100)',
data: this.toroid.calculatePowerLoss(),
borderWidth: 1,
yAxisID: 'wattsID',
hidden: false
}*/]
},
options: {
responsive: true,
maintainAspectRatio: false,
elements: {
point: {
radius: 0,
},
},
scales: {
x: {
type: 'logarithmic',
position: 'bottom',
display: 'auto',
title: {
display: true,
text: 'Frequency (MHz)',
color: 'black',
font: {
weight : 'bold'
}
},
ticks: {
autoSkip: false,
}
},
'lID': {
type: 'linear',
display: 'auto',
title: {
display: true,
text: '\u03bcH',
color: 'orange',
font: {
weight : 'bold'
}
},
position: 'left',
},
'swrID': {
type: 'linear',
display: 'auto',
title: {
display: true,
text: 'SWR',
color: 'black',
font: {
weight : 'bold'
}
},
min: 0.0,
max: 5.0,
position: 'right',
},
'effID' : {
type: 'linear',
display: 'auto',
title: {
display: true,
text: 'Efficiency %',
color: 'blue',
font: {
weight : 'bold'
}
},
ticks: {
},
min: 0.0,
max: 100.0,
position: 'left',
},
'ilID': {
type: 'linear',
display: 'auto',
title: {
display: true,
text: 'dB',
color: 'black',
font: {
weight : 'bold'
}
},
min: 0.0,
max: 80.0,
position: 'right',
},
'wattsID' : {
type: 'linear',
display: 'auto',
title: {
display: true,
text: 'W',
color: 'rgb(50,50,50)',
font: {
weight : 'bold'
}
},
min: 0.0,
position: 'right',
},
'ohmsID': {
type: 'logarithmic',
display: 'auto',
title: {
display: true,
text: '\u03A9',
color: 'orange',
font: {
weight : 'bold'
}
},
min: 1.0,
max: 1000.0,
position: 'left',
},
'angleID': {
type: 'linear',
display: 'auto',
title: {
display: true,
text: '\u03A9',
color: 'violet',
font: {
weight : 'bold'
}
},
min: -180.0,
max: 180.0,
position: 'right',
},
'voltsID': {
type: 'linear',
display: 'auto',
title: {
display: true,
text: 'V',
color: 'cyan',
font: {
weight : 'bold'
}
},
min: 0.0,
max: 100.0,
position: 'left',
},/*
'qID' : {
type: 'linear',
display: 'auto',
title: {
display: true,
text: 'Q',
color: 'purple',
font: {
weight : 'bold'
}
},
position: 'left',
},
'ccID' : {
type: 'linear',
display: 'auto',
title: {
display: true,
text: 'mA',
color: 'rgb(0,128,128)',
font: {
weight : 'bold'
}
},
min: 0.0,
position: 'right',
},
'muID' : {
type: 'logarithmic',
display: 'auto',
title: {
display: true,
text: '\u03bc',
color: 'rgb(128,128,128)',
font: {
weight : 'bold'
}
},
min: 0.0,
position: 'right',
},
'hID' : {
type: 'linear',
display: 'auto',
title: {
display: true,
text: 'Oe',
color: 'rgb(0,128,0)',
font: {
weight : 'bold'
}
},
min: 0.0,
position: 'right',
},
'bID' : {
type: 'linear',
display: 'auto',
title: {
display: true,
text: 'G',
color: 'rgb(55,55,0)',
font: {
weight : 'bold'
}
},
min: 0.0,
position: 'left',
},
'wattsID' : {
type: 'linear',
display: 'auto',
title: {
display: true,
text: 'mW',
color: 'rgb(50,50,50)',
font: {
weight : 'bold'
}
},
min: 0.0,
position: 'right',
}*/
},
plugins : {
//showLines: true,
mode : 'nearest',
title: {
display: true,
text: this.toroid.core.manufacturer + " " + this.t_size + "-" + this.t_material + " [" + this.toroid.core.PN + "]",
},
tooltip: {
enabled: true,
mode: 'index',
intersect: false,
position: 'nearest',
bodyFont: {
family: 'monospace',
},
callbacks: {
title: function(context) {
var value = context[0].parsed.x;
var postlabel = " MHz";
if(value >= 1.0e6) {
value *= 1e-6;
postlabel = " GHz";
}
var label = 'Freq = ' + value.toPrecision(4).toString() + postlabel;
return label;
},
label: function(context) {
let value = context.element.parsed.y;
var label = context.dataset.label || '';
if (label) {
label += ' ';
}
if((label[0] == 'R') || (label[0] == 'X')) {
if(label[1] != ' ') {
label = label[0] + label[1] + ' ';
} else {
label = label[0] + ' ';
}
var num = getMetricPrefix(value);
if(num.val < 1e-15) {
label = justifyText(label, '0.0' + ' ' + num.pfx + '\u03A9');
} else {
label = justifyText(label, num.val.toPrecision(3).toString() + ' ' + num.pfx + '\u03A9');
}
} else if(label[1] == 'Z') {
var num = getMetricPrefix(value);
label = justifyText(label.substr(0,4), num.val.toPrecision(3).toString() + ' ' + num.pfx + '\u03A9');
} else if(label[0] == 'L') {
var num = getMetricPrefix(value * 1e-6);
label = justifyText('L ', num.val.toPrecision(3).toString() + ' ' + num.pfx + 'H');
} else if(label[0] == 'M') {
var num = getMetricPrefix(value * 1e-6);
label = justifyText('M ', num.val.toPrecision(3).toString() + ' ' + num.pfx + 'H');
} else if(label[0] == 'E') {
var num = getMetricPrefix(value * 1e-6);
label = justifyText('Eff ', num.val.toPrecision(3).toString() + ' % ');
} else if(label[0] == 'S') {
if(label[1] == 'W') {
// SWR:
// var num = getMetricPrefix(value * 1e-6);
label = justifyText('SWR ', value.toPrecision(3).toString() + ' ');
} else if(label[4] == 'r') {
// S11 real
//var num = getMetricPrefix(value * 1e-3);
label = justifyText('S11r', value.toFixed(3).toString() + '\u03A9');
} else {
// S11 imag
label = justifyText('S11i', value.toFixed(3).toString() + '\u03A9');
}
} else if(label[0] == 'I') {
if(label[1] == 'L') {
//var num = getMetricPrefix(value * 1e-3);
label = justifyText('IL ', value.toFixed(3).toString() + ' dB');
} else {
var num = getMetricPrefix(value * 1e-3);
label = justifyText('I ', num.val.toPrecision(3).toString() + ' ' + num.pfx + 'A');
}
} else if(label[0] == 'B') {
var num = getMetricPrefix(value);
label = justifyText('B ', num.val.toPrecision(3).toString() + ' ' + num.pfx + 'G');
} else if(label[0] == 'H') {
var num = getMetricPrefix(value);
label = justifyText('H ', num.val.toPrecision(3).toString() + ' ' + num.pfx + 'Oe');
} else if(label[0] == 'P') {
if(label[1] == 'i') {
var num = getMetricPrefix(value);
label = justifyText('Pin ', num.val.toPrecision(3).toString() + ' ' + num.pfx + 'W');
} else if(label[1] == 'o') {
var num = getMetricPrefix(value);
label = justifyText('Pout', num.val.toPrecision(3).toString() + ' ' + num.pfx + 'W');
} else {
var num = getMetricPrefix(value * 1e-3);
label = justifyText('Pd ', num.val.toPrecision(3).toString() + ' ' + num.pfx + 'W');
}
} else if(label[0] == 'Q') {
label = justifyText('Q ', value.toPrecision(3).toString() + ' ');
} else {
label = justifyText(label, value.toPrecision(3).toString() + ' ');
}
return label;
}
}
}
},
}
});
};
var controller = new Controller();
function acResistance(frequency_hz) {
return (toroid.cond_length_meters / (Math.PI * toroid.cond_diameter_meters * cu_sigma * skinDepth(frequency_hz)));
}
function getSRF() {
// First, use the initial permeability to start:
var mu = cores[material].mu_i;
var c_0 = 3e8;
var c_r = (1/Math.sqrt(mu)) * c_0;
var srf = c_r / (2 * toroid.cond_length_meters);
return srf;
}
function getMaxTurnsFrom() {
var cond_diameter_meters = 0.001 * awgToMm(40.0 - conductor_diameter_slider.value)[1];
var N_max = Math.PI / (Math.atan2(0.5e3 * cond_diameter_meters, (0.5 * toroid.core.B - 0.5e3 * cond_diameter_meters)));
return N_max;
}
function setMode() {
l_inductors = {
sort_order : {
"Ferrites" : ["75", "78", "77", "79", "43", "43_old", "80", "52", "61", "67"],
//"Powdered Iron" : ["2", "6", "10", "17", "0"]
},
"75":"75 [\u03bci=5000]",
"78":"78 [\u03bci=2300]",
"77":"77 [\u03bci=2000]",
"79":"79 [\u03bci=1400]",
"43":"43 [\u03bci=800]",
"43_old":"43 pre-2020 [\u03bci=800]",
"80":"80 [\u03bci=600]",
"52":"52 [\u03bci=250]",
"61":"61 [\u03bci=125]",
"67":"67 [\u03bci=40]",
"2":"2 [\u03bci=10]",
"6":"6 [\u03bci=8.5]",
"10":"10 [\u03bci=6]",
"17":"17 [\u03bci=4]",
"0":"0 [\u03bci=1]"};
// Clear the materials from the DOM:
var l_materials = document.getElementById("material-select");
while(l_materials.firstChild) {
l_materials.removeChild(l_materials.firstChild);
}
var l_mat_selected = l_inductors;
// Create the optgroup:
Object.keys(l_mat_selected.sort_order).forEach(function (kk) {
var optgroup = document.createElement("OPTGROUP");
optgroup.setAttribute("label", kk)
// Now insert only the sizes that exist for this material:
l_mat_selected.sort_order[kk].forEach(function (key){
// Create an option tag:
if(controller.t_material == key) {
// This is so that if the size was selected and still exists, then maintain the setting:
optgroup.appendChild(new Option(l_mat_selected[key], key, false, true));
} else {
optgroup.appendChild(new Option(l_mat_selected[key], key));
}
});
l_materials.appendChild(optgroup);
});
if(!(controller.t_material in l_mat_selected)) {
controller.t_material = Object.keys(l_mat_selected)[0];
}
// Now rebuild the size DOM for the selected material:
rebuildSizeDOM();
// Re-set the material, as it *may* have changed:
setMaterial();
}
function setToroid() {
//console.log("setToroid()")
var toroids = document.getElementsByName("toroids");
//controller.t_size = toroids[0].value;
controller.setSize(toroids[0].value);
controller.recalculate();
controller.updateChart();
}
function rebuildSizeDOM() {
// Remove all toroid sizes in the DOM:
var toroid_sizes = document.getElementById("toroid-select");
while(toroid_sizes.firstChild) {
toroid_sizes.removeChild(toroid_sizes.firstChild);
}
// Now insert only the sizes that exist for this material:
for(const key in controller.toroid.mat.size) {
// Create an option tag:
if(controller.t_size == key) {
// This is so that if the size was selected and still exists, then maintain the setting:
toroid_sizes.appendChild(new Option(key, key, false, true));
} else {
toroid_sizes.appendChild(new Option(key, key));
}
}
if(!(controller.t_size in controller.toroid.mat.size)) {
//console.log(t_size + " NOT exists!");
controller.setSize(Object.keys(controller.toroid.mat.size)[0]);
}
}
function setMaterial() {
//console.log("setMaterial()")
var materials = document.getElementsByName("materials");
controller.setMaterial(materials[0].value);
// Rebuild the list of available sizes for this material type:
rebuildSizeDOM();
controller.recalculate()
controller.updateChart();
}
function setLeakage() {
//
var leakage = document.getElementsByName("leakage");
controller.setLeakage(leakage[0].value);
console.log(leakage[0].value);
controller.recalculate()
controller.updateChart();
}
// Limit how often we update the chart, as it is quite a slow operation. But updating the graphic
// is very fast. So we update that with every event, but set a short timer for when we stop moving
// the slider.
const emphasis_delay = 40;
var conductor_diameter_timer_handler = 0;
conductor_diameter_slider.oninput = function() {
// Check if we have exceeded the maximum turns:
/*
const max_N = getMaxTurnsFrom();
if(max_N > toroid.N) {
var temp = primary_turns_slider.value;
primary_turns_slider.value = (((1+(temp*(toroid.N_max-1)))-1) / (max_N-1));
}
*/
controller.recalculate();
if(conductor_diameter_timer_handler != 0) {
clearTimeout(conductor_diameter_timer_handler);
}
conductor_diameter_timer_handler = setTimeout(function(){
controller.updateChart();
conductor_diameter_timer_handler = 0;
}, emphasis_delay);
}
var primary_turns_timer_handler = 0;
primary_turns_slider.oninput = function() {
controller.recalculate();
if(primary_turns_timer_handler != 0) {
clearTimeout(primary_turns_timer_handler);
}
primary_turns_timer_handler = setTimeout(function(){
controller.updateChart();
primary_turns_timer_handler = 0;
}, emphasis_delay);
//generateTurnsRatioLUT(primary_turns_slider.value);
}
var secondary_turns_timer_handler = 0;
secondary_turns_slider.oninput = function() {
controller.recalculate();
if(secondary_turns_timer_handler != 0) {
clearTimeout(secondary_turns_timer_handler);
}
secondary_turns_timer_handler = setTimeout(function(){
controller.updateChart();
secondary_turns_timer_handler = 0;
}, emphasis_delay);
//generateTurnsRatioLUT(primary_turns_slider.value);
}
var frequency_timer_handler = 0;
load_impedance_slider.oninput = function() {
//controller.updateFrequencies(load_impedance_slider.value);
controller.recalculate();
if(frequency_timer_handler != 0) {
clearTimeout(frequency_timer_handler);
}
frequency_timer_handler = setTimeout(function(){
controller.updateChart();
frequency_timer_handler = 0;
}, emphasis_delay);
}
var voltage_timer_handler = 0;
power_slider.oninput = function() {
controller.recalculate();
if(voltage_timer_handler != 0) {
clearTimeout(voltage_timer_handler);
}
voltage_timer_handler = setTimeout(function(){
controller.updateChart();
voltage_timer_handler = 0;
}, emphasis_delay);
}
var primary_capacitance_handler = 0;
primary_capacitance_slider.oninput = function() {
controller.recalculate();
if(primary_capacitance_handler != 0) {
clearTimeout(primary_capacitance_handler);
}
primary_capacitance_handler = setTimeout(function(){
controller.updateChart();
primary_capacitance_handler = 0;
}, emphasis_delay);
}
var primary_winding_inductance_slider_handler = 0;
primary_winding_inductance_slider.oninput = function() {
controller.recalculate();
if(primary_winding_inductance_slider_handler != 0) {
clearTimeout(primary_winding_inductance_slider_handler);
}
primary_winding_inductance_slider_handler = setTimeout(function(){
controller.updateChart();
primary_winding_inductance_slider_handler = 0;
}, emphasis_delay);
}
var primary_winding_capacitance_slider_handler = 0;
primary_winding_capacitance_slider.oninput = function() {
controller.recalculate();
if(primary_winding_capacitance_slider_handler != 0) {
clearTimeout(primary_winding_capacitance_slider_handler);
}
primary_winding_capacitance_slider_handler = setTimeout(function(){
controller.updateChart();
primary_winding_capacitance_slider_handler = 0;
}, emphasis_delay);
}
var secondary_winding_capacitance_slider_handler = 0;
secondary_winding_capacitance_slider.oninput = function() {
controller.recalculate();
if(secondary_winding_capacitance_slider_handler != 0) {
clearTimeout(secondary_winding_capacitance_slider_handler);
}
secondary_winding_capacitance_slider_handler = setTimeout(function(){
controller.updateChart();
secondary_winding_capacitance_slider_handler = 0;
}, emphasis_delay);
}
var secondary_winding_inductance_slider_handler = 0;
secondary_winding_inductance_slider.oninput = function() {
controller.recalculate();
if(secondary_winding_inductance_slider_handler != 0) {
clearTimeout(secondary_winding_inductance_slider_handler);
}
secondary_winding_inductance_slider_handler = setTimeout(function(){
controller.updateChart();
secondary_winding_inductance_slider_handler = 0;
}, emphasis_delay);
}
window.onresize = function() {
controller.recalculate();
controller.updateChart();
}
window.onorientationchange = function() {
controller.recalculate();
controller.updateChart();
}
window.onbeforeprint = function() {
console.log("onbeforeprint");
controller.drawDesign();
}
//
function generateTurnsRatioLUT(max_turns) {
var res = {};
var ss = [];
for(var i=1; i<=max_turns; i++) {
for(var j=i; j<=max_turns; j++) {
res[j/i] = [i,j];
ss.push(j/i);
}
}
var kk = Object.keys(res).sort();
var jj = [];
kk.forEach(element => {
jj.push([element, res[element][0], res[element][1]]);
});
console.log(ss.sort());
return res;
}
const afront_canvas = document.getElementById("inductor2D");
const fctx = afront_canvas.getContext('2d');
function drawWire(ctx, x1, y1, x2, y2, wireRadius, fillColor) {
var angle = math.atan2(y1 - y2, x1 - x2) - Math.PI * 0.5;
ctx.beginPath();
ctx.arc(x1, y1, wireRadius, angle, Math.PI+angle);
ctx.arc(x2, y2, wireRadius, Math.PI+angle, angle);
ctx.fillStyle = fillColor;
ctx.fill();
}
function drawTransformer(fctx, originX, originY, outerRadius, innerRadius, wireRadius, pturns, sturns, width, toroid_colour) {
let theta = Math.atan2((2*wireRadius), innerRadius - wireRadius);
//var front_originX = originX - 0.5*(1*outerRadius + 20 + width) - 10;
var front_originX = originX;
originY -= 12;
// Draw front profile of toroid former:
fctx.lineWidth = outerRadius - innerRadius;
//fctx.strokeStyle = "#7F7F7F"; // rgb(100, 100, 100);
fctx.strokeStyle = toroid_colour; // rgb(100, 100, 100);
fctx.beginPath();
fctx.arc(front_originX, originY, 0.5 * (outerRadius + innerRadius), 0.0, 2.0 * Math.PI, false);
fctx.stroke();
fctx.lineWidth = 1.0;
// Draw side profile of toroid:
var side_originX = front_originX + outerRadius + 10;
fctx.fillStyle = "#6F6F6F"; // rgb(100, 100, 100);
fctx.fillRect(side_originX, originY - outerRadius, width, (outerRadius - innerRadius));
fctx.fillRect(side_originX, originY + innerRadius, width, (outerRadius - innerRadius));
//fctx.fillStyle = 'lightgrey';
fctx.fillStyle = toroid_colour; // rgb(100, 100, 100);
fctx.fillRect(side_originX, originY - innerRadius, width, (2 * innerRadius));
// Draw left-hand entry wire:
var x1 = front_originX - 2*outerRadius;
var y1 = originY + outerRadius + 10;
var x2 = front_originX - outerRadius;
var y2 = originY + outerRadius + 10;
//drawWire(fctx, x1, y1, x2, y2, wireRadius, "black");
fctx.lineCap = "round";
fctx.strokeStyle = "blue";
fctx.lineWidth = 2 * wireRadius;
// Primary winding:
fctx.beginPath();
fctx.moveTo(x1, y1);
//fctx.lineTo(x2, y2);
// This is the lead-in line coming from the bottom:
var angle = (-1 * theta) + (Math.PI - ((pturns>>1) * 2 * theta));
x2 = front_originX + (outerRadius + wireRadius) * Math.cos(angle);
fctx.lineTo(x2-5, y2);
y2 = originY + (outerRadius + wireRadius) * Math.sin(angle);
fctx.lineTo(x2, y2);
// Now the primary windings from the inner-radius to the outer-radius:
for(let i = 0; i < (2*pturns); i+=2) {
var angle1 = (i * theta) + (Math.PI - ((pturns>>1) * 2 * theta));
var angle2 = ((i+1) * theta) + (Math.PI - ((pturns>>1) * 2 * theta));
x1 = front_originX + (innerRadius - wireRadius) * Math.cos(angle1);
y1 = originY + (innerRadius - wireRadius) * Math.sin(angle1);
x2 = front_originX + (outerRadius + wireRadius) * Math.cos(angle2);
y2 = originY + (outerRadius + wireRadius) * Math.sin(angle2);
fctx.moveTo(x1, y1);
fctx.lineTo(x2, y2);
}
// Then to the primary exit out the top:
x1 = front_originX - 2*outerRadius;
y1 = originY - outerRadius - 10;
x2 -= 5;
y2 = originY - outerRadius - 10;
fctx.lineTo(x2, y2);
fctx.lineTo(x1, y1);
fctx.stroke();
// Draw the primary-side capacitor:
x1 -= 35;
fctx.lineTo(x1, y1);
fctx.stroke();
fctx.strokeStyle = "black";
fctx.lineWidth = 1;
fctx.beginPath();
fctx.moveTo(x1, y1);
fctx.lineTo(x1, y1);
fctx.lineTo(x1, originY - 3);
fctx.moveTo(x1 - 10, originY - 3);
fctx.lineTo(x1 + 10, originY - 3);
fctx.moveTo(x1 - 10, originY + 3);
fctx.lineTo(x1 + 10, originY + 3);
fctx.moveTo(x1, originY + 3);
fctx.lineTo(x1, originY + outerRadius + 10);
fctx.stroke();
// Do the voltage source and source resistance:
x1 -= 50;
fctx.beginPath();
fctx.moveTo(x1, originY - outerRadius - 10);
fctx.lineTo(x1, originY - outerRadius);
fctx.strokeRect(x1 - 8, originY - outerRadius, 16, 36);
fctx.moveTo(x1, originY + outerRadius - 20);
fctx.lineTo(x1, originY - outerRadius + 36);
fctx.moveTo(x1, originY + outerRadius);
fctx.lineTo(x1, originY + outerRadius + 10);
fctx.stroke();
fctx.beginPath();
fctx.arc(x1, originY + outerRadius - 10, 10, 0, 2*Math.PI);
fctx.stroke();
fctx.beginPath();
fctx.moveTo(x1, originY + outerRadius + 10);
x1 += 50;
fctx.lineTo(x1, originY + outerRadius + 10);
fctx.moveTo(x1-50, originY - outerRadius - 10);
fctx.lineTo(x1, originY - outerRadius - 10);
fctx.stroke();
fctx.lineCap = "round";
fctx.strokeStyle = "blue";
fctx.lineWidth = 2 * wireRadius;
fctx.beginPath();
fctx.moveTo(x1, originY + outerRadius + 10);
x1 += 35;
fctx.lineTo(x1, originY + outerRadius + 10);
fctx.stroke();
// Write the capacitor value:
fctx.save();
fctx.translate(x1 - 35, originY);
fctx.rotate(-Math.PI * 0.5);
fctx.font = "12px arial";
fctx.textAlign = "center";
fctx.fillText((controller.toroid.Cin*1e12).toFixed(0) + " pF", 0, -14);
fctx.fillText("50", outerRadius - 18, -45);
fctx.restore();
// Secondary winding:
fctx.strokeStyle = "hsl(120, 100%, 15%)";
fctx.beginPath();
for(let i = 0; i < (2*sturns); i+=2) {
var angle1 = ((i+1) * theta) + (Math.PI - ((sturns>>1) * 2 * theta));
var angle2 = (i * theta) + (Math.PI - ((sturns>>1) * 2 * theta));
x1 = front_originX + (innerRadius - wireRadius) * Math.cos(angle1);
y1 = originY + (innerRadius - wireRadius) * Math.sin(angle1);
x2 = front_originX + (outerRadius + wireRadius) * Math.cos(angle2);
y2 = originY + (outerRadius + wireRadius) * Math.sin(angle2);
fctx.moveTo(x1, y1);
fctx.lineTo(x2, y2);
}
// Right-hand exit wires:
//x1 = side_originX + outerRadius;
const x_res = side_originX + width + 60;
x1 = x_res;
//x1 += 5;
y1 = originY - outerRadius - 10;
x2 += 5;
y2 = originY - outerRadius - 10;
//fctx.moveTo(x2, y2);
fctx.lineTo(x2, y2);
fctx.lineTo(x1, y1);
var angle1 = (Math.PI - ((sturns>>1) * 2 * theta));
x2 = front_originX + (outerRadius + wireRadius) * Math.cos(angle1);
y2 = originY + (outerRadius + wireRadius) * Math.sin(angle1);
fctx.moveTo(x2, y2);
x2 += 5; //front_originX + outerRadius;
y2 = originY + outerRadius + 10;
fctx.lineTo(x2, y2);
fctx.lineTo(x1, y2);
fctx.stroke();
// Draw the load resistor:
fctx.lineWidth = 1;
fctx.strokeRect(x_res -8, originY - 30, 16, 60);
fctx.beginPath();
fctx.moveTo(x_res, y2);
fctx.lineTo(x_res, originY+30);
fctx.moveTo(x_res, y1);
fctx.lineTo(x_res, originY-30);
fctx.stroke();
fctx.save();
fctx.translate(x_res, originY);
fctx.rotate(-Math.PI * 0.5);
fctx.font = "12px arial";
fctx.textAlign = "center";
var num = getMetricPrefix(controller.toroid.Zl);
fctx.fillText(num.val.toPrecision(3).toString() + ' ' + num.pfx + "\u03A9", 0, 3);
fctx.restore();
//fctx.textAlign = "right";
/*
fctx.font = "12px arial";
fctx.textAlign = "center";
fctx.fillText("Z\u2097", x_res, originY);
fctx.textAlign = "left";
var num = getMetricPrefix(controller.toroid.Zl);
fctx.fillText(num.val.toPrecision(3).toString() + ' ' + num.pfx + "\u03A9", x_res + 15, originY);
*/
// Draw the Dimensions:
fctx.strokeStyle = "black";
fctx.lineWidth = 1;
var localx = front_originX - outerRadius - 20;
fctx.beginPath();
fctx.moveTo(localx + 10, originY - outerRadius);
fctx.lineTo(localx, originY - outerRadius);
fctx.moveTo(localx + 10, originY + outerRadius);
fctx.lineTo(localx, originY + outerRadius);
fctx.lineTo(localx, originY - outerRadius);
fctx.stroke();
fctx.font = "12px arial";
fctx.save();
fctx.translate(localx, originY);
fctx.rotate(-Math.PI * 0.5);
fctx.textAlign = "center";
fctx.fillText((controller.toroid.core.A).toFixed(1) + " mm", 0, -20);
fctx.fillText("(" + (controller.toroid.core.A*0.03937).toFixed(3) + "\")", 0, -6);
fctx.restore();
localx = front_originX + outerRadius + 10 + width + 15;
fctx.beginPath();
fctx.moveTo(localx - 5, originY - innerRadius);
fctx.lineTo(localx, originY - innerRadius);
fctx.lineTo(localx, originY + innerRadius);
fctx.lineTo(localx - 5, originY + innerRadius);
fctx.stroke();
fctx.save();
fctx.translate(localx, originY);
fctx.rotate(-Math.PI * 0.5);
fctx.textAlign = "center";
fctx.fillText((controller.toroid.core.B).toFixed(1) + " mm", 0, 12);
fctx.fillText("(" + (controller.toroid.core.B*0.03937).toFixed(3) + "\")", 0, 26);
fctx.restore();
}
function drawBalun(fctx, originX, originY, outerRadius, innerRadius, wireRadius, turns) {
// Draw toroid former:
fctx.beginPath();
fctx.arc(originX, originY, outerRadius, 0.0, 2.0 * Math.PI, false);
fctx.stroke();
fctx.beginPath();
fctx.arc(originX, originY, innerRadius, 0.0, 2.0 * Math.PI, false);
fctx.stroke();
fctx.lineWidth = 1.0;
// Draw left-hand entry wire:
var x1 = originX - innerRadius + wireRadius;
var y1 = originY;
var x2 = originX - outerRadius - 100;
var y2 = originY;
var angle = math.atan2(y1 - y2, x1 - x2) - Math.PI * 0.5;
fctx.beginPath();
fctx.arc(x1, y1, wireRadius, angle, Math.PI+angle);
fctx.arc(x2, y2, wireRadius, Math.PI+angle, angle);
fctx.fillStyle = "black";
fctx.fill();
// Right-hand exit wire:
x1 = originX + outerRadius + wireRadius;
y1 = originY;
x2 = originX + outerRadius + 100;
y2 = originY;
angle = math.atan2(y1 - y2, x1 - x2) - Math.PI * 0.5;
fctx.beginPath();
fctx.arc(x1, y1, wireRadius, angle, Math.PI+angle);
fctx.arc(x2, y2, wireRadius, Math.PI+angle, angle);
fctx.fillStyle = "black";
fctx.fill();
// Draw cross-over wire:
let theta = Math.PI/8.0;
x1 = originX + (innerRadius - wireRadius) * Math.cos(Math.PI - theta);
y1 = originY + (innerRadius - wireRadius) * Math.sin(Math.PI - theta);
x2 = originX + (outerRadius + wireRadius) * Math.cos(- theta);
y2 = originY + (outerRadius + wireRadius) * Math.sin(- theta);
angle = math.atan2(y1 - y2, x1 - x2) - Math.PI * 0.5;
fctx.beginPath();
fctx.arc(x1, y1, wireRadius, angle, Math.PI+angle);
fctx.arc(x2, y2, wireRadius, Math.PI+angle, angle);
fctx.fillStyle = "black";
fctx.fill();
for(let i = 0; i < (turns-1); i++) {
x1 = originX + (innerRadius - wireRadius) * Math.cos((i/(turns-1.5)) * (Math.PI - theta));
y1 = originY + (innerRadius - wireRadius) * Math.sin((i/(turns-1.5)) * (Math.PI - theta));
x2 = originX + (outerRadius + wireRadius) * Math.cos(((i+0.5)/(turns-1.5)) * (Math.PI - theta));
y2 = originY + (outerRadius + wireRadius) * Math.sin(((i+0.5)/(turns-1.5)) * (Math.PI - theta));
angle = math.atan2(y1 - y2, x1 - x2) - Math.PI * 0.5;
fctx.beginPath();
fctx.arc(x1, y1, wireRadius, angle, Math.PI+angle);
fctx.arc(x2, y2, wireRadius, Math.PI+angle, angle);
fctx.fillStyle = "black";
fctx.fill();
}
for(let i = 0; i < (turns-2); i++) {
x1 = originX + (innerRadius - wireRadius) * Math.cos(((i+1.0)/(turns-1.5)) * (Math.PI - theta) + Math.PI);
y1 = originY + (innerRadius - wireRadius) * Math.sin(((i+1.0)/(turns-1.5)) * (Math.PI - theta) + Math.PI);
x2 = originX + (outerRadius + wireRadius) * Math.cos(((i+0.5)/(turns-1.5)) * (Math.PI - theta) + Math.PI);
y2 = originY + (outerRadius + wireRadius) * Math.sin(((i+0.5)/(turns-1.5)) * (Math.PI - theta) + Math.PI);
angle = math.atan2(y1 - y2, x1 - x2) - Math.PI * 0.5;
fctx.beginPath();
fctx.arc(x1, y1, wireRadius, angle, Math.PI+angle);
fctx.arc(x2, y2, wireRadius, Math.PI+angle, angle);
fctx.fillStyle = "black";
fctx.fill();
}
}
function drawDesign() {
const win_width = document.getElementById("inductor-container").clientWidth;
const win_height = document.getElementById("inductor-container").clientHeight;
afront_canvas.width = win_width-12;
afront_canvas.height = win_height-12;
fctx.clearRect(0, 0, win_width, win_height);
const outer_radius = 0.15 * win_height;
var cond_radius = outer_radius * controller.toroid.cond_diameter_meters * 1e3 / controller.toroid.core.A;
const loopx = win_width/2;
const loopy = win_height/2;
const loop_diameter_mm = controller.toroid.core.A;
const cond_diameter_mm = controller.toroid.cond_diameter_meters * 1000.0;
const loop_diameter_inches = loop_diameter_mm / 25.4;
const cond_diameter_inches = cond_diameter_mm / 25.4;
let inner_radius = outer_radius * controller.toroid.core.B / controller.toroid.core.A;
let thickness = 2.0 * outer_radius * controller.toroid.core.C / controller.toroid.core.A;
if(controller.t_mode == "Transformer") {
drawTransformer(fctx, loopx, loopy, outer_radius, inner_radius, cond_radius, controller.toroid.Np, controller.toroid.Ns, thickness, controller.toroid.mat.color);
} else {
drawInductor(fctx, loopx, loopy, outer_radius, inner_radius, cond_radius, controller.toroid.N, thickness, controller.toroid.mat.color);
}
const y_offset = loopy + outer_radius + 20;
var arrow_size = 10.0;
// Draw inner-diameter arrows: (for using a winding former)
const inner_dia_y = loopy + outer_radius + 40;
// Draw outer-diameter arrows: (for using a winding former)
const outer_dia_y = loopy + outer_radius + 0;
// Write loop inductance:
fctx.font = "12px arial";
fctx.textAlign = "left";
const L = controller.toroid.L * 1.0e+6;
const M = controller.toroid.M * 1.0e+6;
fctx.fillText("M\u1d62 = " + M.toFixed(0).toString() + " \u03bcH", 8, 18);
fctx.fillText("Rdc = " + controller.toroid.Rdc.toFixed(3) + " \u03A9", 8, 32);
fctx.fillText("Pin = " + controller.toroid.Pin.toFixed(2) + " W", 8, 46);
fctx.fillText("Vrms = " + controller.toroid.Vrms.toFixed(2) + " V", 8, 60);
//fctx.fillStyle = "lightgrey";
//fctx.fillText("Ceff = " + (toroid.C*1e12).toFixed(1) + " pF", 8, win_height - 28);
//fctx.fillText("SRF = " + (toroid.SRF*1e-6).toFixed(2) + " MHz", 8, win_height - 14);
fctx.fillStyle = "lightgrey";
//fctx.fillStyle = "grey";
fctx.fillText("Ceff \u2248 " + (controller.toroid.C*1e12).toFixed(1) + " pF", 8, win_height - 28);
fctx.fillText("SRF \u2248 " + (controller.toroid.SRF*1e-6).toFixed(2) + " MHz", 8, win_height - 14);
//fctx.fillText("SRF = " + (getSRF()*1e-6).toFixed(1) + " MHz", 8, win_height - 14);
fctx.fillStyle = "black";
fctx.textAlign = "center";
fctx.font = "bold 16px courier";
fctx.fillText((40-conductor_diameter_slider.value).toString() + " AWG", loopx, 20);
//fctx.fillText("N = " + controller.toroid.N.toString() + " : Nd = " + (primary_turns_slider.value*100).toFixed(0) + "%", loopx, win_height - 28);
//fctx.fillText("Nd = " + (primary_turns_slider.value*100).toFixed(0) + "% : N = " + controller.toroid.N.toString(), loopx, win_height - 28);
fctx.fillText("N = " + controller.toroid.Np.toString() + ':' + controller.toroid.Ns.toString(), loopx, win_height - 46);
fctx.font = "12px arial";
if(controller.toroid.Np < controller.toroid.Ns) {
//
const ratio = controller.toroid.Ns**2 / controller.toroid.Np**2;
fctx.fillText("Z = 1:" + ratio.toFixed(1), loopx, win_height - 28);
} else {
//
const ratio = controller.toroid.Np**2 / controller.toroid.Ns**2;
fctx.fillText("Z = " + ratio.toFixed(1) + ":1", loopx, win_height - 28);
}
fctx.fillText("wire = " + (controller.toroid.cond_length_meters*100.0).toFixed(1)+ " cm (" + (3.2808399*controller.toroid.cond_length_meters).toFixed(2)+ "\')", loopx, win_height - 14);
//fctx.fillText("(" + (3.2808399*toroid.cond_length_meters).toFixed(2)+ "\')", loopx, win_height - 14);
fctx.fillText("\u2300 = " + (1e3 * controller.toroid.cond_diameter_meters).toFixed(3) + " mm" , loopx, 34);
fctx.fillText("(" + (39.37007874 * controller.toroid.cond_diameter_meters).toFixed(3) + "\")", loopx, 48);
// Top right text:
fctx.textAlign = "right";
var datasheet = controller.toroid.getMaterialDataStrings();
var max_width = 0;
/*
datasheet.forEach((element, index) => {
let text = fctx.measureText(element[0] + ": " + element[1]);
if(text.width > max_width) {
max_width = text.width;
}
});
datasheet.forEach((element, index) => {
fctx.textAlign = "left";
fctx.fillText(element[0] + ": ", win_width-18-max_width, 18+(index*14));
fctx.textAlign = "right";
fctx.fillText(element[1], win_width-18, 18+(index*14));
});
*/
}
function getMetricPrefix(num) {
if(num >= 1e9) return {val: num*1e-9, pfx:'G'};
if(num >= 1e6) return {val: num*1e-6, pfx:'M'};
if(num >= 1e3) return {val: num*1e-3, pfx:'k'};
if(num < 1e-12) return {val: num*1e15, pfx:'f'};
if(num < 1e-9) return {val: num*1e12, pfx:'p'};
if(num < 1e-6) return {val: num*1e9, pfx:'n'};
if(num < 1e-3) return {val: num*1e6, pfx:'\u03bc'};
if(num < 1.0) return {val: num*1e3, pfx:'m'};
return {val:num, pfx:' '};
}
setMode();
controller.recalculate();
controller.updateChart();
</script>
</body>
</html>