kopia lustrzana https://github.com/miguelvaca/vk3cpu
Allow manufacturers to be different.
rodzic
80fdfceb8e
commit
8608c3a841
|
@ -0,0 +1,687 @@
|
||||||
|
<!DOCTYPE html>
|
||||||
|
<html lang="en">
|
||||||
|
<head>
|
||||||
|
<meta charset="UTF-8">
|
||||||
|
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||||
|
<title>VK3CPU Fan-Dipole Antenna Calculator</title>
|
||||||
|
<link rel="stylesheet" href="fandipole.css">
|
||||||
|
</head>
|
||||||
|
<body>
|
||||||
|
<header><a href="mailto:vk3cpu@gmail.com">VK3CPU</a> - Fan-Dipole Antenna Calculator 0.1</header>
|
||||||
|
<section class="gridLayoutClass">
|
||||||
|
<div class="chart-container" style="position: relative;">
|
||||||
|
<canvas id="chartCanvas" class="chartCanvasClass">
|
||||||
|
2D Chart Canvas
|
||||||
|
</canvas>
|
||||||
|
</div>
|
||||||
|
<div class="slider_container">
|
||||||
|
<div class="sliders">
|
||||||
|
<label for="conductor_diameter_slider">⌀a:</label>
|
||||||
|
<input type="range" id="conductor_diameter_slider" min="0" max="40" value="20" step="1">
|
||||||
|
</div>
|
||||||
|
<div class="sliders">
|
||||||
|
<label for="length1_slider">l1:</label>
|
||||||
|
<input type="range" id="length1_slider" min="0.9" max="1.1" value="1.0" step="0.01">
|
||||||
|
</div>
|
||||||
|
<div class="sliders">
|
||||||
|
<label for="length2_slider">l2:</label>
|
||||||
|
<input type="range" id="length2_slider" min="0.9" max="1.1" value="1.0" step="0.01">
|
||||||
|
</div>
|
||||||
|
<div class="sliders">
|
||||||
|
<label for="length3_slider">l3:</label>
|
||||||
|
<input type="range" id="length3_slider" min="0.9" max="1.1" value="1.0" step="0.01">
|
||||||
|
</div>
|
||||||
|
<div class="radios">
|
||||||
|
<label>40</label>
|
||||||
|
<input type="checkbox" name="band_checkbox" onclick="return ValidateBandSelection();" id="40m" value="1"/>
|
||||||
|
<label>30</label>
|
||||||
|
<input type="checkbox" name="band_checkbox" onclick="return ValidateBandSelection();" id="30m" value="1"/>
|
||||||
|
<label>20</label>
|
||||||
|
<input type="checkbox" name="band_checkbox" onclick="return ValidateBandSelection();" id="20m" value="1" checked/>
|
||||||
|
<label>18</label>
|
||||||
|
<input type="checkbox" name="band_checkbox" onclick="return ValidateBandSelection();" id="18m" value="1" checked/>
|
||||||
|
<label>15</label>
|
||||||
|
<input type="checkbox" name="band_checkbox" onclick="return ValidateBandSelection();" id="15m" value="1" checked/>
|
||||||
|
<label>12</label>
|
||||||
|
<input type="checkbox" name="band_checkbox" onclick="return ValidateBandSelection();" id="12m" value="1"/>
|
||||||
|
<label>10</label>
|
||||||
|
<input type="checkbox" name="band_checkbox" onclick="return ValidateBandSelection();" id="10m" value="1"/>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div id="antenna-front-container" class="antennaFront-container" style="position: relative;">
|
||||||
|
<canvas id="antennaFront2D" class="antennaFrontClass" width="312" height="150">
|
||||||
|
</canvas>
|
||||||
|
</div>
|
||||||
|
<!--div id="antenna-side-container" class="antennaSide-container" style="position: relative;">
|
||||||
|
<canvas id="antennaSide2D" class="antennaSideClass" width="150" height="150">
|
||||||
|
</canvas>
|
||||||
|
</div-->
|
||||||
|
<div class="notes">
|
||||||
|
<p style="text-align:center"><b><u><a href="./magloop_equations.html"> EQUATIONS USED </a></u></b></p>
|
||||||
|
<b><u>Notes:</u></b><br>
|
||||||
|
The Magloop Antenna Calculator was developed to predict the characteristics of a small-loop (aka "magnetic loop" or "magloop")
|
||||||
|
antenna, given physical dimensions entered via slider widgets. <br>
|
||||||
|
It supports:
|
||||||
|
<ul>
|
||||||
|
<li>circular, octagonal, hexagonal and square-shaped loops</li>
|
||||||
|
<li>main loops made from either hollow round anodised-copper or aluminium conductors</li>
|
||||||
|
<li>metric and imperial units</li>
|
||||||
|
<li>magloops with 1-to-8 turns</li>
|
||||||
|
</ul>
|
||||||
|
I developed this multi-turn capable magloop calculator to take advantage of the
|
||||||
|
touch-screens and high-speed of modern mobile phones, to allow users to get realtime feedback of the predicted
|
||||||
|
behaviour of a magloop antenna. <br>-- 73 de VK3CPU<br><br>
|
||||||
|
<u><b>Inputs via the slider and radio widgets:</b></u>
|
||||||
|
<ul>
|
||||||
|
<li>⌀a : Conductor diameter in millimeters (mm) or inches ("). (Measured between opposing conductor outer surfaces.)</li>
|
||||||
|
<li>⌀b : Loop diameter in meters (m) or feet ('). (Measured between the conductor centers.)</li>
|
||||||
|
<li>N : Number of turns or loops.</li>
|
||||||
|
<li>c/a : is the spacing ratio; based on 'c' being the inter-winding spacing for multi-turn loops measured between conductor centers, and 'a' is the conductor diameter. (Must be >= 1.1)
|
||||||
|
A low-value will increase the resistance due to the proximity effect. (Ignore for single-turn loops.)</li>
|
||||||
|
<li>Tx : The transmit power in Watts. This affects the predicted voltage across the capacitor (Vcap), and the RMS loop current (Ia).</li>
|
||||||
|
<li>Re : Additional resistance due to external losses, due mainly from capacitor contact resistance and proximity-to-ground effects.
|
||||||
|
Use Re=0.0 to assume the loop is in free-space with no capacitor losses (i.e. ideal conditions, with loop-related losses only).
|
||||||
|
Adding Re will reduce antenna efficiency, Q, Vcap and Ia, while increasing antenna BW.
|
||||||
|
According to [1] and [2], a 1 m diameter loop of 22 mm copper tubing at a height of 1.5 m above the ground operating at 7 MHz had a calculated capacitor contact resistance of ~190 mΩ
|
||||||
|
and an additional ground proximity loss resistance of ~30 mΩ. Note that true ground losses are dependent on both frequency and height-above-ground.</li>
|
||||||
|
<li>Metric or Imperial : selects the measuring system.</li>
|
||||||
|
<li>Cu or Al : selects the type of metal conductor (annealed copper or aluminum).</li>
|
||||||
|
<li>Circ, Oct, Hex or Sqr : selects the shape of the magloop.</li>
|
||||||
|
</ul>
|
||||||
|
<u><b>Calculated parameters:</b></u>
|
||||||
|
<ul>
|
||||||
|
<li>L : Inductance in microhenries.</li>
|
||||||
|
<li>A : Loop area in square meters or square feet.</li>
|
||||||
|
<li>C : Effective capacitance of the loop in picofarads.</li>
|
||||||
|
<li>peri : Perimeter of the main loop in meters or feet.</li>
|
||||||
|
<li>c : Distance between windings, measured from the conductor centers in mm or inches.</li>
|
||||||
|
<li>cond : Total required conductor length in meters or feet.</li>
|
||||||
|
<li>Tuning Cap (pF): The capacitance required to bring the loop into resonance at the given frequency. Value in picofarads.</li>
|
||||||
|
<li>Vcap (kV): The predicted voltage across the capacitance given the desired transmit power.</li>
|
||||||
|
<li>BW (kHz): The predicted 3dB bandwidth of the magloop antenna. </li>
|
||||||
|
<li>Efficiency (%): The percentage of input energy that is actually radiated and not lost as heat.</li>
|
||||||
|
<li>R-radiation (Ω): The calculated radiation resistance of the loop in ohms.</li>
|
||||||
|
<li>R-loop (Ω): The calculated resistance of the loop in ohms, due to the combination of material conductance, conductor length, skin-effect and proximity effects.</li>
|
||||||
|
<li>Reactance (jΩ): The inductive reactance of the loop in ohms.</li>
|
||||||
|
<li>Q : The antenna Q (quality) factor.</li>
|
||||||
|
<li>Ia (A): The RMS loop current in amps.</li>
|
||||||
|
<li>Perimeter (λ): Antenna perimeter size relative to the wavelength.</li>
|
||||||
|
</ul>
|
||||||
|
<u><b>Usage hints:</b></u>
|
||||||
|
<li>Tap on legend items to disable or enable an output parameter. This can be used to declutter the chart.</li>
|
||||||
|
<li>Tap on a chart 'dot' to display a tooltip containing calculated output parameters for that frequency or band.</li>
|
||||||
|
<br>
|
||||||
|
<b><u>References:</u></b><br>
|
||||||
|
[1]: B. Austin, A. Boswell and M. Perks, <b>"Loss Mechanisms in the Electrically Small Loop Antenna"</b> <i>, IEEE Antennas and Propagation Magazine, 56, 4, August 2014, pp. 143.</i> <br>
|
||||||
|
[2]: A. Boswell, A. J. Tyler and A. White, <b>"Performance of a Small Loop Antenna in the 3 - 10 MHz Band"</b> <i>, IEEE Antennas and Propagation Magazine, 47, 2, April 2005, pp. 5 1 -56.</i> <br>
|
||||||
|
<br>
|
||||||
|
<b><u>Change history:</u></b><br>
|
||||||
|
<b>[28-Sep-21]</b> <br>
|
||||||
|
* Commenced development.<br>
|
||||||
|
<br>
|
||||||
|
</div>
|
||||||
|
</section>
|
||||||
|
<script src="https://cdnjs.cloudflare.com/ajax/libs/Chart.js/2.9.3/Chart.min.js"></script>
|
||||||
|
<script src="https://cdn.jsdelivr.net/npm/chartjs-plugin-crosshair@1.1.2"></script>
|
||||||
|
<!--script src="https://cdnjs.cloudflare.com/ajax/libs/mathjs/9.5.0/math.js"></script-->
|
||||||
|
<script src="https://cdnjs.cloudflare.com/ajax/libs/mathjs/7.5.1/math.min.js"></script>
|
||||||
|
<script>
|
||||||
|
// GUI control widgets:
|
||||||
|
var conductor_diameter_slider = document.getElementById("conductor_diameter_slider");
|
||||||
|
var length1_slider = document.getElementById("length1_slider");
|
||||||
|
var length2_slider = document.getElementById("length2_slider");
|
||||||
|
var length3_slider = document.getElementById("length3_slider");
|
||||||
|
|
||||||
|
var m40_radio = document.getElementById("40m");
|
||||||
|
var m30_radio = document.getElementById("30m");
|
||||||
|
var m20_radio = document.getElementById("20m");
|
||||||
|
var m10_radio = document.getElementById("10m");
|
||||||
|
|
||||||
|
// Global variables:
|
||||||
|
var global = {
|
||||||
|
conductor_diameter_meters : 0.0,
|
||||||
|
conductor_radius_meters : 0.0,
|
||||||
|
|
||||||
|
};
|
||||||
|
|
||||||
|
function setGlobals() {
|
||||||
|
global.conductor_diameter_meters = 0.001 * awgToMm(40.0 - conductor_diameter_slider.value);
|
||||||
|
global.conductor_radius_meters = 0.5 * global.conductor_diameter_meters;
|
||||||
|
}
|
||||||
|
|
||||||
|
//var units = "metric";
|
||||||
|
//var conductivity = 58e6; // Default is annealed copper
|
||||||
|
//var shape = "circle"; // Shape of the main loop
|
||||||
|
|
||||||
|
//var inductance = 0.0;
|
||||||
|
//var area = 0.0; // Loop area in square meters.
|
||||||
|
//var perimeter = 0.0; // Perimeter of a single turn of the main loop
|
||||||
|
//var loop_capacitance = 0.0; // Effective capacitance of a single or multi-turn loop
|
||||||
|
//var srf = 0.0; // Self-resonant frequency SRF
|
||||||
|
//var conductor_length = 0.0; // Total conductor length
|
||||||
|
//var R_ext = 0.0; // External losses due to capacitor resistance and ground effects, in ohms
|
||||||
|
//var metal = "Cu"; // Default metal is copper
|
||||||
|
|
||||||
|
function awgToMm(awg) {
|
||||||
|
//
|
||||||
|
switch (awg) {
|
||||||
|
case 40: return 0.0799;
|
||||||
|
case 39: return 0.0897;
|
||||||
|
case 38: return 0.101;
|
||||||
|
case 37: return 0.113;
|
||||||
|
case 36: return 0.127;
|
||||||
|
case 35: return 0.143;
|
||||||
|
case 34: return 0.160;
|
||||||
|
case 33: return 0.180;
|
||||||
|
case 32: return 0.202;
|
||||||
|
case 31: return 0.227;
|
||||||
|
case 30: return 0.255;
|
||||||
|
case 29: return 0.286;
|
||||||
|
case 28: return 0.321;
|
||||||
|
case 27: return 0.361;
|
||||||
|
case 26: return 0.405;
|
||||||
|
case 25: return 0.455;
|
||||||
|
case 24: return 0.511;
|
||||||
|
case 23: return 0.573;
|
||||||
|
case 22: return 0.644;
|
||||||
|
case 21: return 0.723;
|
||||||
|
case 20: return 0.812;
|
||||||
|
case 19: return 0.912;
|
||||||
|
case 18: return 1.024;
|
||||||
|
case 17: return 1.150;
|
||||||
|
case 16: return 1.291;
|
||||||
|
case 15: return 1.450;
|
||||||
|
case 14: return 1.628;
|
||||||
|
case 13: return 1.828;
|
||||||
|
case 12: return 2.053;
|
||||||
|
case 11: return 2.305;
|
||||||
|
case 10: return 2.588;
|
||||||
|
case 9: return 2.906;
|
||||||
|
case 8: return 3.264;
|
||||||
|
case 7: return 3.665;
|
||||||
|
case 6: return 4.115;
|
||||||
|
case 5: return 4.621;
|
||||||
|
case 4: return 5.189;
|
||||||
|
case 3: return 5.827;
|
||||||
|
case 2: return 6.544;
|
||||||
|
case 1: return 7.348;
|
||||||
|
case 0: return 8.251;
|
||||||
|
default: return 0.0;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
var frequencies = [];
|
||||||
|
|
||||||
|
function updateFrequencies() {
|
||||||
|
const hamFrequencies = [
|
||||||
|
1.8, 3.5, 5.3, 7.0, 10.1, 14.0, 18.068, 21.0, 24.89, 28.0, 29.7
|
||||||
|
];
|
||||||
|
|
||||||
|
frequencies = [];
|
||||||
|
hamFrequencies.forEach(freq => {
|
||||||
|
for(var i=0; i<10; i++) {
|
||||||
|
frequencies.push(1.0e6 * freq + i * 1.0e3);
|
||||||
|
}
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
var wavelengths = [];
|
||||||
|
function updateWavelength() {
|
||||||
|
wavelengths = [];
|
||||||
|
for(var i=1; i<=60; i++) {
|
||||||
|
wavelengths.push(0.025*i);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
function Cin(x) {
|
||||||
|
var retval = 0.0;
|
||||||
|
for(var k=1; k<40; k++) {
|
||||||
|
var k2 = 2*k;
|
||||||
|
var delta = (x**k2)/(math.factorial(k2)*(k2));
|
||||||
|
if(k & 1) {
|
||||||
|
retval += delta;
|
||||||
|
} else {
|
||||||
|
retval -= delta;
|
||||||
|
}
|
||||||
|
if(delta < 1e-6) {break;}
|
||||||
|
}
|
||||||
|
//console.log("Cin(" + x + ") =", k, retval);
|
||||||
|
return retval;
|
||||||
|
}
|
||||||
|
|
||||||
|
function Ci(x) {
|
||||||
|
var retval = 0.577175 + Math.log(x) - Cin(x);
|
||||||
|
//console.log("Ci(" + x + ") =", retval);
|
||||||
|
return retval;
|
||||||
|
}
|
||||||
|
|
||||||
|
function Si(x) {
|
||||||
|
var retval = x;
|
||||||
|
for(var k=1; k<40; k++) {
|
||||||
|
var k2 = 2*k+1;
|
||||||
|
var delta = (x**k2)/(math.factorial(k2)*(k2));
|
||||||
|
if(k & 1) {
|
||||||
|
retval -= delta;
|
||||||
|
} else {
|
||||||
|
retval += delta;
|
||||||
|
}
|
||||||
|
if(delta < 1e-6) {break;}
|
||||||
|
}
|
||||||
|
//console.log("Si(" + x + ") =", k, retval);
|
||||||
|
return retval;
|
||||||
|
}
|
||||||
|
|
||||||
|
function Rrad(k, l) {
|
||||||
|
const neta = 120.0 * Math.PI;
|
||||||
|
const C = 0.5772; // Euler's constant
|
||||||
|
const kl = k*l;
|
||||||
|
var retval = 60.0 * (C + Math.log(kl) - Ci(kl) + 0.5*Math.sin(kl) * (Si(2.0*kl) - 2.0*Si(kl)) + 0.5*Math.cos(kl)*(C + Math.log(kl*0.5) + Ci(2.0*kl) - 2.0*Ci(kl)));
|
||||||
|
return retval;
|
||||||
|
}
|
||||||
|
|
||||||
|
function calculateRrad() {
|
||||||
|
var retval = [];
|
||||||
|
wavelengths.forEach(wl => {
|
||||||
|
var k = 2.0 * Math.PI;
|
||||||
|
const rr = Rrad(k, wl);
|
||||||
|
retval.push({x:wl, y:rr});
|
||||||
|
});
|
||||||
|
return retval;
|
||||||
|
}
|
||||||
|
|
||||||
|
function Rin(k, l) {
|
||||||
|
var retval = Rrad(k, l) / (Math.sin(0.5*k*l)**2);
|
||||||
|
return retval;
|
||||||
|
}
|
||||||
|
|
||||||
|
function calculateRin() {
|
||||||
|
var retval = [];
|
||||||
|
wavelengths.forEach(wl => {
|
||||||
|
var k = 2.0 * Math.PI;
|
||||||
|
const rr = Rin(k, wl);
|
||||||
|
retval.push({x:wl, y:rr});
|
||||||
|
});
|
||||||
|
return retval;
|
||||||
|
}
|
||||||
|
|
||||||
|
function vswr(frequency) {
|
||||||
|
//
|
||||||
|
return 3.0*Math.sin(frequency) + 4.0;
|
||||||
|
}
|
||||||
|
|
||||||
|
function calculateVSWR() {
|
||||||
|
var retval = [];
|
||||||
|
frequencies.forEach(freq => {
|
||||||
|
const bw = vswr(freq * 1e6);
|
||||||
|
retval.push({x:freq, y:bw});
|
||||||
|
});
|
||||||
|
return retval;
|
||||||
|
}
|
||||||
|
|
||||||
|
function s11(frequency) {
|
||||||
|
//
|
||||||
|
return 3.0*Math.cos(frequency) + 4.0;
|
||||||
|
}
|
||||||
|
|
||||||
|
function calculateS11() {
|
||||||
|
var retval = [];
|
||||||
|
frequencies.forEach(freq => {
|
||||||
|
const bw = s11(freq * 1e6);
|
||||||
|
retval.push({x:freq, y:bw});
|
||||||
|
});
|
||||||
|
return retval;
|
||||||
|
}
|
||||||
|
|
||||||
|
function Xm(k, l) {
|
||||||
|
//const neta = 120.0 * Math.PI;
|
||||||
|
const C = 0.5772; // Euler's constant
|
||||||
|
const kl = k*l;
|
||||||
|
const a2_l = global.conductor_radius_meters ** 2;
|
||||||
|
var retval = 30.0 * (2*Si(kl) + Math.cos(kl) * (2*Si(kl)-Si(2*kl)) - Math.sin(kl) * (2*Ci(kl) - Ci(2*kl) - Ci(2*k*a2_l)));
|
||||||
|
return retval;
|
||||||
|
}
|
||||||
|
|
||||||
|
function calculateXm() {
|
||||||
|
var retval = [];
|
||||||
|
wavelengths.forEach(wl => {
|
||||||
|
var k = 2.0 * Math.PI;
|
||||||
|
const xm = Xm(k, wl);
|
||||||
|
retval.push({x:wl, y:xm});
|
||||||
|
});
|
||||||
|
return retval;
|
||||||
|
}
|
||||||
|
|
||||||
|
function Xin(k, l) {
|
||||||
|
const kl = k*l;
|
||||||
|
var retval = Xm(k,l) / (Math.sin(kl * 0.5)**2);
|
||||||
|
return retval;
|
||||||
|
}
|
||||||
|
|
||||||
|
function calculateXin() {
|
||||||
|
var retval = [];
|
||||||
|
wavelengths.forEach(wl => {
|
||||||
|
var k = 2.0 * Math.PI;
|
||||||
|
const xin = Xin(k, wl);
|
||||||
|
retval.push({x:wl, y:xin});
|
||||||
|
});
|
||||||
|
return retval;
|
||||||
|
}
|
||||||
|
|
||||||
|
function ValidateBandSelection() {
|
||||||
|
}
|
||||||
|
|
||||||
|
// Specify fonts for changing parameters controlled by the sliders:
|
||||||
|
const normal_font = "12px arial";
|
||||||
|
const emphasis_font = "bold 14px arial";
|
||||||
|
const emphasis_delay = 1200;
|
||||||
|
|
||||||
|
const normal_width = 1;
|
||||||
|
const emphasis_width = 3;
|
||||||
|
|
||||||
|
var cond_dia_timer_handler = 0;
|
||||||
|
var cond_dia_font = normal_font;
|
||||||
|
var cond_dia_thickness = normal_width;
|
||||||
|
|
||||||
|
conductor_diameter_slider.oninput = function() {
|
||||||
|
if(cond_dia_timer_handler == 0) {
|
||||||
|
cond_dia_font = emphasis_font;
|
||||||
|
cond_dia_thickness = emphasis_width;
|
||||||
|
cond_dia_timer_handler = setTimeout(function(){
|
||||||
|
cond_dia_font = normal_font;
|
||||||
|
drawFrontDesign();
|
||||||
|
cond_dia_timer_handler = 0;
|
||||||
|
}, emphasis_delay);
|
||||||
|
} else {
|
||||||
|
clearTimeout(cond_dia_timer_handler);
|
||||||
|
cond_dia_timer_handler = setTimeout(function(){
|
||||||
|
cond_dia_font = normal_font;
|
||||||
|
cond_dia_thickness = normal_width;
|
||||||
|
drawFrontDesign();
|
||||||
|
cond_dia_timer_handler = 0;
|
||||||
|
}, emphasis_delay);
|
||||||
|
}
|
||||||
|
|
||||||
|
setGlobals();
|
||||||
|
drawFrontDesign();
|
||||||
|
myChart.data.datasets[0].data = calculateRrad();
|
||||||
|
myChart.data.datasets[1].data = calculateRin();
|
||||||
|
myChart.data.datasets[2].data = calculateXm();
|
||||||
|
myChart.data.datasets[3].data = calculateXin();
|
||||||
|
//myChart.data.datasets[0].data = calculateVSWR();
|
||||||
|
//myChart.data.datasets[1].data = calculateS11();
|
||||||
|
myChart.update();
|
||||||
|
}
|
||||||
|
|
||||||
|
var length1_timer_handler = 0;
|
||||||
|
var length1_font = normal_font;
|
||||||
|
|
||||||
|
length1_slider.oninput = function() {
|
||||||
|
if(length1_timer_handler == 0) {
|
||||||
|
length1_font = emphasis_font;
|
||||||
|
length1_timer_handler = setTimeout(function(){
|
||||||
|
length1_font = normal_font;
|
||||||
|
drawSideDesign();
|
||||||
|
length1_timer_handler = 0;
|
||||||
|
}, emphasis_delay);
|
||||||
|
} else {
|
||||||
|
clearTimeout(length1_timer_handler);
|
||||||
|
length1_timer_handler = setTimeout(function(){
|
||||||
|
length1_font = normal_font;
|
||||||
|
drawSideDesign();
|
||||||
|
length1_timer_handler = 0;
|
||||||
|
}, emphasis_delay);
|
||||||
|
}
|
||||||
|
|
||||||
|
setGlobals();
|
||||||
|
drawFrontDesign();
|
||||||
|
myChart.data.datasets[0].data = calculateRrad();
|
||||||
|
myChart.data.datasets[1].data = calculateRin();
|
||||||
|
myChart.data.datasets[2].data = calculateXm();
|
||||||
|
myChart.update();
|
||||||
|
}
|
||||||
|
|
||||||
|
length2_slider.oninput = function() {
|
||||||
|
}
|
||||||
|
|
||||||
|
length3_slider.oninput = function() {
|
||||||
|
}
|
||||||
|
|
||||||
|
window.onresize = function() {
|
||||||
|
myChart.resize();
|
||||||
|
//myChart.update();
|
||||||
|
drawFrontDesign();
|
||||||
|
//drawSideDesign();
|
||||||
|
// console.log("resize!");
|
||||||
|
}
|
||||||
|
|
||||||
|
window.onorientationchange = function() {
|
||||||
|
//myChart.resize();
|
||||||
|
//myChart.update();
|
||||||
|
drawFrontDesign();
|
||||||
|
//drawSideDesign();
|
||||||
|
}
|
||||||
|
|
||||||
|
window.onbeforeprint = function() {
|
||||||
|
console.log("onbeforeprint");
|
||||||
|
//myChart.resize();
|
||||||
|
drawFrontDesign();
|
||||||
|
//drawSideDesign();
|
||||||
|
}
|
||||||
|
|
||||||
|
const afront_canvas = document.getElementById("antennaFront2D");
|
||||||
|
const fctx = afront_canvas.getContext('2d');
|
||||||
|
|
||||||
|
function drawFrontDesign() {
|
||||||
|
const win_width = document.getElementById("antenna-front-container").offsetWidth;
|
||||||
|
const win_height = document.getElementById("antenna-front-container").offsetHeight;
|
||||||
|
afront_canvas.width = win_width-2;
|
||||||
|
afront_canvas.height = win_height-2;
|
||||||
|
|
||||||
|
fctx.clearRect(0, 0, win_width, win_height);
|
||||||
|
const loop_radius = win_width < win_height ? 0.32 * win_width : 0.32 * win_height;
|
||||||
|
const cond_radius = conductor_diameter_slider.value / 12;
|
||||||
|
const loopx = win_width/2;
|
||||||
|
const loopy = win_height/2;
|
||||||
|
|
||||||
|
fctx.textAlign = "center";
|
||||||
|
//fctx.font = "14px courier";
|
||||||
|
fctx.fillText((40-conductor_diameter_slider.value).toString() + " AWG", loopx, loopy + 3);
|
||||||
|
|
||||||
|
//fctx.fillText("c/a = ", 8, win_height * 0.1 + 18);
|
||||||
|
//fctx.fillText((loop_spacing_slider.value*1.0).toPrecision(3).toString(), 8, win_height * 0.1 + 33);
|
||||||
|
// *****
|
||||||
|
}
|
||||||
|
|
||||||
|
// Set the global variables, which are all determined by physical dimensions, and are thus frequency-independent:
|
||||||
|
setGlobals();
|
||||||
|
// Update the frequencies, now that we have the sliders available:
|
||||||
|
//updateFrequencies();
|
||||||
|
updateWavelength();
|
||||||
|
|
||||||
|
drawFrontDesign();
|
||||||
|
|
||||||
|
|
||||||
|
const chartCanvas = document.getElementById("chartCanvas");
|
||||||
|
const chartCanvasContext = chartCanvas.getContext('2d');
|
||||||
|
|
||||||
|
var myChart = new Chart(chartCanvasContext, {
|
||||||
|
type: 'line',
|
||||||
|
data: {
|
||||||
|
datasets: [
|
||||||
|
{
|
||||||
|
label: 'Rrad', //'VSWR',
|
||||||
|
fill: false,
|
||||||
|
borderColor: 'green',
|
||||||
|
borderDash: [5, 5],
|
||||||
|
backgroundColor: 'green',
|
||||||
|
data: calculateRrad(), //calculateVSWR(),
|
||||||
|
borderWidth: 1,
|
||||||
|
yAxisID: 'vswrID'
|
||||||
|
},
|
||||||
|
{
|
||||||
|
label: 'Rin', //'S11',
|
||||||
|
fill: false,
|
||||||
|
borderColor: 'purple',
|
||||||
|
backgroundColor: 'purple',
|
||||||
|
data: calculateRin(), //calculateS11(),
|
||||||
|
borderWidth: 1,
|
||||||
|
yAxisID: 's11ID'
|
||||||
|
},
|
||||||
|
{
|
||||||
|
label: 'Xm', //'S11',
|
||||||
|
fill: false,
|
||||||
|
borderColor: 'orange',
|
||||||
|
backgroundColor: 'orange',
|
||||||
|
data: calculateXm(), //calculateS11(),
|
||||||
|
borderWidth: 1,
|
||||||
|
yAxisID: 'xmID'
|
||||||
|
},
|
||||||
|
{
|
||||||
|
label: 'Xin', //'S11',
|
||||||
|
fill: false,
|
||||||
|
borderColor: 'blue',
|
||||||
|
backgroundColor: 'blue',
|
||||||
|
borderDash: [5, 5],
|
||||||
|
data: calculateXin(), //calculateS11(),
|
||||||
|
borderWidth: 1,
|
||||||
|
yAxisID: 'xinID'
|
||||||
|
}]
|
||||||
|
},
|
||||||
|
options: {
|
||||||
|
responsive: true,
|
||||||
|
maintainAspectRatio: false,
|
||||||
|
scales: {
|
||||||
|
xAxes: [{
|
||||||
|
type: 'linear',
|
||||||
|
position: 'bottom',
|
||||||
|
display: true,
|
||||||
|
scaleLabel: {
|
||||||
|
display: true,
|
||||||
|
labelString: 'Dipole length', //'Frequency (MHz)'
|
||||||
|
}
|
||||||
|
}],
|
||||||
|
yAxes: [{
|
||||||
|
type: 'linear',
|
||||||
|
display: 'auto',
|
||||||
|
scaleLabel: {
|
||||||
|
display: true,
|
||||||
|
labelString: 'VSWR',
|
||||||
|
fontColor: 'green',
|
||||||
|
fontStyle: 'bold'
|
||||||
|
},
|
||||||
|
ticks: {
|
||||||
|
max: 1000.0,
|
||||||
|
min: 0.0,
|
||||||
|
},
|
||||||
|
position: 'left',
|
||||||
|
id: 'vswrID'
|
||||||
|
},{
|
||||||
|
type: 'linear', //'logarithmic',
|
||||||
|
display: 'auto',
|
||||||
|
scaleLabel: {
|
||||||
|
display: true,
|
||||||
|
labelString: 'S11',
|
||||||
|
fontColor: 'purple',
|
||||||
|
fontStyle: 'bold'
|
||||||
|
},
|
||||||
|
ticks: {
|
||||||
|
min: 0.0,
|
||||||
|
max: 1000.0,
|
||||||
|
},
|
||||||
|
position: 'left',
|
||||||
|
id: 's11ID'
|
||||||
|
},{
|
||||||
|
type: 'linear', //'logarithmic',
|
||||||
|
display: 'auto',
|
||||||
|
scaleLabel: {
|
||||||
|
display: true,
|
||||||
|
labelString: 'Xm',
|
||||||
|
fontColor: 'orange',
|
||||||
|
fontStyle: 'bold'
|
||||||
|
},
|
||||||
|
ticks: {
|
||||||
|
min: -3000.0,
|
||||||
|
max: 3000.0,
|
||||||
|
},
|
||||||
|
position: 'right',
|
||||||
|
id: 'xmID'
|
||||||
|
},{
|
||||||
|
type: 'linear', //'logarithmic',
|
||||||
|
display: 'auto',
|
||||||
|
scaleLabel: {
|
||||||
|
display: true,
|
||||||
|
labelString: 'Xin',
|
||||||
|
fontColor: 'blue',
|
||||||
|
fontStyle: 'bold'
|
||||||
|
},
|
||||||
|
ticks: {
|
||||||
|
//min: -3000.0,
|
||||||
|
//max: 3000.0,
|
||||||
|
},
|
||||||
|
position: 'right',
|
||||||
|
id: 'xinID'
|
||||||
|
}]
|
||||||
|
},
|
||||||
|
showLines: true,
|
||||||
|
tooltips: {
|
||||||
|
mode: 'interpolate',
|
||||||
|
intersect: false,
|
||||||
|
position: 'nearest',
|
||||||
|
callbacks: {
|
||||||
|
title: function(tooltipItem, data) {
|
||||||
|
var lut = {0.1365:'2200', 0.475:'600', 1.8:'160', 3.5:'80', 5.3:'60', 7.0:'40', 10.1:'30', 14.0:'20', 18.068:'18', 21.0:'15', 24.89:'12', 28.0:'10', 29.7:'10', 35.0:'', 40.0:'', 45.0:'', 50.0:'6', 52.0:'6', 54.0:'6'};
|
||||||
|
var label = '' + tooltipItem[0].xLabel.toPrecision(3).toString() + ' MHz';
|
||||||
|
if(lut[tooltipItem[0].xLabel]) {
|
||||||
|
label += ' (';
|
||||||
|
label += lut[tooltipItem[0].xLabel] + ' m)';
|
||||||
|
}
|
||||||
|
return label;
|
||||||
|
},
|
||||||
|
label: function(tooltipItem, data) {
|
||||||
|
var label = data.datasets[tooltipItem.datasetIndex].label || '';
|
||||||
|
if (label) {
|
||||||
|
label += ': ';
|
||||||
|
}
|
||||||
|
if(data.datasets[tooltipItem.datasetIndex].label == "Tuning Cap (pF)" || data.datasets[tooltipItem.datasetIndex].label == "Q") {
|
||||||
|
label += Math.round(tooltipItem.yLabel);
|
||||||
|
} else {
|
||||||
|
label += tooltipItem.yLabel.toFixed(3).toString();
|
||||||
|
//label += Math.round(tooltipItem.yLabel * 1000) / 1000;
|
||||||
|
}
|
||||||
|
return label;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
} ,
|
||||||
|
plugins: {
|
||||||
|
crosshair: {
|
||||||
|
line: {
|
||||||
|
color: 'grey', // crosshair line color
|
||||||
|
width: 1, // crosshair line width
|
||||||
|
dashPattern: [100, 100]
|
||||||
|
},
|
||||||
|
sync: {
|
||||||
|
enabled: false, // enable trace line syncing with other charts
|
||||||
|
group: 1, // chart group
|
||||||
|
suppressTooltips: true // suppress tooltips when showing a synced tracer
|
||||||
|
},
|
||||||
|
zoom: {
|
||||||
|
enabled: true, // enable zooming
|
||||||
|
zoomboxBackgroundColor: 'rgba(66,133,244,0.2)', // background color of zoom box
|
||||||
|
zoomboxBorderColor: '#48F', // border color of zoom box
|
||||||
|
zoomButtonText: 'Reset Zoom', // reset zoom button text
|
||||||
|
zoomButtonClass: 'reset-zoom', // reset zoom button class
|
||||||
|
},
|
||||||
|
callbacks: {
|
||||||
|
beforeZoom: function(start, end) { // called before zoom, return false to prevent zoom
|
||||||
|
return false; // return true to enable zooming
|
||||||
|
},
|
||||||
|
afterZoom: function(start, end) { // called after zoom
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
});
|
||||||
|
</script>
|
||||||
|
</body>
|
||||||
|
</html>
|
|
@ -1,4 +1,4 @@
|
||||||
body {
|
body {
|
||||||
background: rgb(226, 226, 226);
|
background: rgb(226, 226, 226);
|
||||||
margin: 0px;
|
margin: 0px;
|
||||||
}
|
}
|
||||||
|
|
|
@ -0,0 +1,132 @@
|
||||||
|
@@ -0,0 +1,131 @@
|
||||||
|
body {
|
||||||
|
background: rgb(226, 226, 226);
|
||||||
|
margin: 0px;
|
||||||
|
}
|
||||||
|
|
||||||
|
header {
|
||||||
|
background: rgb(226, 226, 226);
|
||||||
|
color: black;
|
||||||
|
font-family: 'Courier New', Courier, monospace;
|
||||||
|
font-weight: bold;
|
||||||
|
font-size: smaller;
|
||||||
|
text-align: center;
|
||||||
|
}
|
||||||
|
|
||||||
|
canvas.chartCanvasClass {
|
||||||
|
background: rgb(255, 255, 255);
|
||||||
|
margin: 0px;
|
||||||
|
padding: 5px;
|
||||||
|
border: 1px solid rgb(0, 0, 0);
|
||||||
|
display: block;
|
||||||
|
box-sizing: border-box;
|
||||||
|
}
|
||||||
|
|
||||||
|
@media (orientation: portrait) {
|
||||||
|
section.gridLayoutClass {
|
||||||
|
display: grid;
|
||||||
|
grid-template-columns: repeat(2, 1fr);
|
||||||
|
grid-template-rows: repeat(3, 1fr) 150px 120px;
|
||||||
|
justify-items: stretch;
|
||||||
|
}
|
||||||
|
|
||||||
|
section div.chart-container {
|
||||||
|
grid-column-start: 1;
|
||||||
|
grid-column-end: 3;
|
||||||
|
grid-row-start: 1;
|
||||||
|
grid-row-end: 4;
|
||||||
|
height: 70vh;
|
||||||
|
width: 100%;
|
||||||
|
box-sizing: border-box;
|
||||||
|
}
|
||||||
|
|
||||||
|
section div.antennaFront-container {
|
||||||
|
grid-column-start: 1;
|
||||||
|
grid-column-end: 2;
|
||||||
|
grid-row-start: 4;
|
||||||
|
grid-row-end: 5;
|
||||||
|
}
|
||||||
|
section div.antennaSide-container {
|
||||||
|
grid-column-start: 2;
|
||||||
|
grid-column-end: 3;
|
||||||
|
grid-row-start: 4;
|
||||||
|
grid-row-end: 5;
|
||||||
|
}
|
||||||
|
section div.slider_container {
|
||||||
|
grid-column-start: 1;
|
||||||
|
grid-column-end: 3;
|
||||||
|
grid-row-start: 5;
|
||||||
|
grid-row-end: 6;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
@media (orientation: landscape) {
|
||||||
|
section.gridLayoutClass {
|
||||||
|
display: grid;
|
||||||
|
grid-template-columns: repeat(4, 1fr);
|
||||||
|
grid-template-rows: repeat(2, 1fr) 150px;
|
||||||
|
justify-items: stretch;
|
||||||
|
}
|
||||||
|
|
||||||
|
section div.chart-container {
|
||||||
|
grid-column-start: 1;
|
||||||
|
grid-column-end: 5;
|
||||||
|
grid-row-start: 1;
|
||||||
|
grid-row-end: 3;
|
||||||
|
height: 80vh;
|
||||||
|
width: 100%;
|
||||||
|
box-sizing: border-box;
|
||||||
|
}
|
||||||
|
|
||||||
|
section div.slider_container {
|
||||||
|
grid-column-start: 1;
|
||||||
|
grid-column-end: 3;
|
||||||
|
grid-row-start: 3;
|
||||||
|
grid-row-end: 4;
|
||||||
|
}
|
||||||
|
section div.antennaFront-container {
|
||||||
|
grid-column-start: 3;
|
||||||
|
grid-column-end: 4;
|
||||||
|
grid-row-start: 3;
|
||||||
|
grid-row-end: 4;
|
||||||
|
}
|
||||||
|
section div.antennaSide-container {
|
||||||
|
grid-column-start: 4;
|
||||||
|
grid-column-end: 5;
|
||||||
|
grid-row-start: 3;
|
||||||
|
grid-row-end: 4;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
/*
|
||||||
|
@media print (orientation: landscape) {
|
||||||
|
section.gridLayoutClass {
|
||||||
|
display: grid;
|
||||||
|
grid-template-columns: repeat(4, 300px);
|
||||||
|
grid-template-rows: repeat(1, 300px) 150px;
|
||||||
|
justify-items: stretch;
|
||||||
|
}
|
||||||
|
section div.chart-container {
|
||||||
|
min-height: 100%;
|
||||||
|
max-width: 100%;
|
||||||
|
max-height: 100%;
|
||||||
|
height: auto!important;
|
||||||
|
width: auto!important;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
@media print (orientation: portrait) {
|
||||||
|
section.gridLayoutClass {
|
||||||
|
display: grid;
|
||||||
|
grid-template-columns: repeat(2, 200px);
|
||||||
|
grid-template-rows: repeat(2, 300px) 150px 120px;
|
||||||
|
justify-items: stretch;
|
||||||
|
}
|
||||||
|
section div.chart-container {
|
||||||
|
min-height: 100%;
|
||||||
|
max-width: 100%;
|
||||||
|
max-height: 100%;
|
||||||
|
height: auto!important;
|
||||||
|
width: auto!important;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
*/
|
|
@ -0,0 +1,451 @@
|
||||||
|
<!DOCTYPE html>
|
||||||
|
<html>
|
||||||
|
<header>
|
||||||
|
<meta charset="utf-8">
|
||||||
|
<title>Method of Moments development environment</title>
|
||||||
|
<link rel="stylesheet" href="mom.css">
|
||||||
|
<style>
|
||||||
|
canvas { display: block; }
|
||||||
|
|
||||||
|
@media (orientation: portrait) {
|
||||||
|
body {
|
||||||
|
background-color: red;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
@media (orientation: landscape) {
|
||||||
|
body {
|
||||||
|
background-color: blue;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
</style>
|
||||||
|
</header>
|
||||||
|
<body>
|
||||||
|
<header>Miguel <a href="mailto:vk3cpu@gmail.com">VK3CPU</a> - Wire Antenna Calculator</header>
|
||||||
|
|
||||||
|
<section class="gridLayoutClass">
|
||||||
|
<div class="chart-container" style="position: relative;">
|
||||||
|
<canvas id="chartCanvas" class="chartCanvasClass">
|
||||||
|
2D Chart Canvas
|
||||||
|
</canvas>
|
||||||
|
</div>
|
||||||
|
</section>
|
||||||
|
|
||||||
|
<!-- math.js library scripts -->
|
||||||
|
<script src="https://cdnjs.cloudflare.com/ajax/libs/mathjs/7.5.1/math.min.js"></script>
|
||||||
|
|
||||||
|
<!-- Chart.js library scripts -->
|
||||||
|
<script src="https://cdnjs.cloudflare.com/ajax/libs/Chart.js/2.9.3/Chart.min.js"></script>
|
||||||
|
<script src="https://cdn.jsdelivr.net/npm/chartjs-plugin-crosshair@1.1.2"></script>
|
||||||
|
|
||||||
|
<!-- Three.js library scripts -->
|
||||||
|
<script src="https://threejs.org/build/three.js"></script>
|
||||||
|
<script src="https://threejs.org/examples/js/libs/dat.gui.min.js"></script>
|
||||||
|
<script src="https://threejs.org/examples/js/controls/OrbitControls.js"></script>
|
||||||
|
|
||||||
|
<!-- Local scripts -->
|
||||||
|
<script>
|
||||||
|
// Javascript in here:
|
||||||
|
|
||||||
|
/* First MoM-Electromagnetics related code: */
|
||||||
|
|
||||||
|
// Solve for the electric field at point m from point n:
|
||||||
|
// n = {i, x, y, z, length}; m = {i, x, y, z}
|
||||||
|
// i is the index of the segment
|
||||||
|
/*
|
||||||
|
function psi(n, m) {
|
||||||
|
var retval = 0.0;
|
||||||
|
const Rmn = Math.sqrt((m.x-n.x)**2 + (m.y-n.y)**2 + (m.z-n.z)**2);
|
||||||
|
const alpha = 0.5 * n.length;
|
||||||
|
const zeta = ;
|
||||||
|
const rho = ;
|
||||||
|
retval = (1.0 / (8.0 * Math.PI * alpha)) * Math.log((zeta + alpha + Math.sqrt(rho**2 + (zeta+alpha)**2)) / (zeta - alpha + Math.sqrt(rho**2 + (zeta - alpha)**2)));
|
||||||
|
return retval;
|
||||||
|
}
|
||||||
|
*/
|
||||||
|
/*
|
||||||
|
function createWire(length, wire_radius, segments) {
|
||||||
|
// dimensions in lambda
|
||||||
|
var wire = [];
|
||||||
|
const seg_len = length / segments;
|
||||||
|
const offset = 0.5 * length;
|
||||||
|
for (let i = 0; i < segments; i++) {
|
||||||
|
var segment = {}
|
||||||
|
segment.radius = wire_radius;
|
||||||
|
segment.minus = {
|
||||||
|
x: i * seg_len - offset,
|
||||||
|
y: 0.0,
|
||||||
|
z: 0.0
|
||||||
|
};
|
||||||
|
segment.plus = {
|
||||||
|
x: (i+1) * seg_len - offset,
|
||||||
|
y: 0.0,
|
||||||
|
z: 0.0
|
||||||
|
}
|
||||||
|
segment.x = (segment.minus.x + segment.plus.x) * 0.5;
|
||||||
|
segment.y = 0.0;
|
||||||
|
segment.z = 0.0;
|
||||||
|
// vectors:
|
||||||
|
segment.vec = [
|
||||||
|
(segment.plus.x - segment.minus.x),
|
||||||
|
(segment.plus.y - segment.minus.y),
|
||||||
|
(segment.plus.z - segment.minus.z)
|
||||||
|
]
|
||||||
|
segment.length = seg_len; // Prepare to make this Pythagorean in the future if this function changes
|
||||||
|
wire.push(segment);
|
||||||
|
}
|
||||||
|
return wire;
|
||||||
|
}
|
||||||
|
*/
|
||||||
|
function createWire(length, wire_radius, segments) {
|
||||||
|
// dimensions in lambda
|
||||||
|
var wire = {};
|
||||||
|
wire.length = length;
|
||||||
|
wire.seg_len = length / segments;
|
||||||
|
wire.radius = wire_radius;
|
||||||
|
const offset = 0.5 * length;
|
||||||
|
wire.points = [];
|
||||||
|
wire.points.push([0.0, 0.0, -offset]);
|
||||||
|
for (let i = 0; i < segments; i++) {
|
||||||
|
wire.points.push([0.0, 0.0, i * wire.seg_len + 0.5 * wire.seg_len - offset]);
|
||||||
|
wire.points.push([0.0, 0.0, (i+1) * wire.seg_len - offset]);
|
||||||
|
}
|
||||||
|
return wire;
|
||||||
|
}
|
||||||
|
/*
|
||||||
|
// m,n = { x:0.0, y:0.0, z:0.0,
|
||||||
|
// xm:0.0, ym:0.0, zm:0.0, xp:0.0, yp:0.0, zp:0.0,
|
||||||
|
// l:sqrt((zp-zm)**2 + (yp-ym)**2 + (xp-xm)**2), radius:0.0}
|
||||||
|
function psi(atMseg, n, m) {
|
||||||
|
var retval = 0.0;
|
||||||
|
const Rmn = Math.sqrt((m.x-n.x)**2 + (m.y-n.y)**2 + (m.z-n.z)**2);
|
||||||
|
const alpha = 0.5 * atMseg.length;
|
||||||
|
const k = 2.0 * Math.PI; // Normalised wavelength is equal to 1.0 - otherwise 2*pi/wavelength
|
||||||
|
const fourPI = 4.0 * Math.PI;
|
||||||
|
// From MININEC thesis (3-36) and (3-37):
|
||||||
|
if(m==n) {
|
||||||
|
console.log("m==n");
|
||||||
|
retval = math.complex((0.5*Math.PI*atMseg.length) * Math.log(atMseg.length / atMseg.radius), -(k/fourPI));
|
||||||
|
} else {
|
||||||
|
console.log("m!=n");
|
||||||
|
retval = math.multiply(math.complex(Math.cos(k * Rmn), -Math.sin(k * Rmn)), (1/(fourPI*Rmn)));
|
||||||
|
}
|
||||||
|
return retval;
|
||||||
|
}
|
||||||
|
*/
|
||||||
|
function psi(wire, n, m) {
|
||||||
|
var retval = 0.0;
|
||||||
|
const k = 2.0 * Math.PI; // Normalised wavelength is equal to 1.0 - otherwise 2*pi/wavelength
|
||||||
|
const fourPI = 4.0 * Math.PI;
|
||||||
|
var Rmn = 0.0;
|
||||||
|
// From MININEC thesis (3-36) and (3-37):
|
||||||
|
if(m==n) {
|
||||||
|
retval = math.complex((1.0/(2.0*Math.PI*wire.seg_len)) * Math.log(wire.seg_len / wire.radius), (-k/fourPI));
|
||||||
|
} else {
|
||||||
|
Rmn = Math.sqrt((wire.points[m][0] - wire.points[n][0])**2 + (wire.points[m][1] - wire.points[n][1])**2 + (wire.points[m][2] - wire.points[n][2])**2);
|
||||||
|
retval = math.multiply(math.complex(Math.cos(k * Rmn), -Math.sin(k * Rmn)), (1/(fourPI*Rmn)));
|
||||||
|
}
|
||||||
|
//console.log(n, m, retval);
|
||||||
|
return retval;
|
||||||
|
}
|
||||||
|
|
||||||
|
function psi_old(wire, n, m) {
|
||||||
|
var retval = 0.0;
|
||||||
|
const k = 2.0 * Math.PI; // Normalised wavelength is equal to 1.0 - otherwise 2*pi/wavelength
|
||||||
|
const fourPI = 4.0 * Math.PI;
|
||||||
|
var Rmn = 0.0;
|
||||||
|
// From MININEC thesis (3-36) and (3-37):
|
||||||
|
if(m==n) {
|
||||||
|
Rmn = Math.sqrt(wire.radius**2 + (wire.seg_len*0.5)**2);
|
||||||
|
} else {
|
||||||
|
Rmn = Math.sqrt((wire.points[m][0] - wire.points[n][0])**2 + (wire.points[m][1] - wire.points[n][1])**2 + (wire.points[m][2] - wire.points[n][2])**2);
|
||||||
|
}
|
||||||
|
retval = math.multiply(math.complex(Math.cos(k * Rmn), -Math.sin(k * Rmn)), (1/(fourPI*Rmn)));
|
||||||
|
//console.log(n, m, retval);
|
||||||
|
return retval;
|
||||||
|
}
|
||||||
|
|
||||||
|
// Use Harrington's equations (129) and (135):
|
||||||
|
function psi2(wire, n, m) {
|
||||||
|
var retval = 0.0;
|
||||||
|
var Rmn = 0.0;
|
||||||
|
// Calculate the range from the source point (n) to the observation point (m) depending whether it is the same segment or not:
|
||||||
|
if(m==n) {
|
||||||
|
Rmn = Math.sqrt(wire.radius**2 + (wire.seg_len*0.5)**2);
|
||||||
|
} else {
|
||||||
|
Rmn = Math.sqrt((wire.points[m][0] - wire.points[n][0])**2 + (wire.points[m][1] - wire.points[n][1])**2 + (wire.points[m][2] - wire.points[n][2])**2);
|
||||||
|
}
|
||||||
|
// Now if r<10a, use 129. If r>=10a, use 135:
|
||||||
|
const alpha = wire.seg_len*0.5;
|
||||||
|
const zeta = wire.points[m][2] - wire.points[n][2]; // This is z at m when n is set as the coordinate space origin. So need to transform coord-space to make it N-centric first! Uugh!
|
||||||
|
// zeta is the projection of m onto the n segment, if the n-segment were centered at the origin along the z-direction.
|
||||||
|
const mn = math.subtract(wire.points[m], wire.points[n-1])
|
||||||
|
//var zeta = math.dot(wire.points[m], wire.points[n]);
|
||||||
|
//zeta = zeta / ()
|
||||||
|
const rho = 0;
|
||||||
|
if(Rmn < (10.0 * alpha)) {
|
||||||
|
// Eq 129:
|
||||||
|
var t1 = math.complex(Math.cos(k * Rmn), -Math.sin(k * Rmn));
|
||||||
|
t1 = math.multiply((1.0/(8.0*Math.PI*alpha)), t1);
|
||||||
|
const i1 = Math.log((zeta + alpha + Math.sqrt(rho**2 + (zeta + alpha)**2)) / (zeta - alpha + Math.sqrt(rho**2 + (zeta - alpha)**2)));
|
||||||
|
const i2 = 2 * alpha;
|
||||||
|
const i3 = (0.5 * (alpha + zeta)) * Math.sqrt(rho**2 + (alpha + zeta)**2) + (0.5 * (alpha - zeta)) * Math.sqrt(rho**2 + (zeta - alpha)**2) + (0.5 * rho**2 * i1);
|
||||||
|
const i4 = (2*alpha*rho**2) + (0.333333 * (2*alpha**3 + 6*alpha*zeta**2));
|
||||||
|
const re = i1 - 0.5*k**2 * (i3 - 2*Rmn*i2 + Rmn**2*i1);
|
||||||
|
const im = -k*(i2 - Rmn*i1) + (1.0/6)*k**3*(i4 - 3*Rmn*i3 + 3*Rmn**2*i2 - Rmn**3*i1);
|
||||||
|
retval = math.complex(math.multiply(t1, re), math.multiply(t1, im));
|
||||||
|
} else {
|
||||||
|
// Eq 135:
|
||||||
|
|
||||||
|
}
|
||||||
|
return retval;
|
||||||
|
}
|
||||||
|
|
||||||
|
function calculateZMatrix(wire) {
|
||||||
|
const w = 2.0 * Math.PI * frequency;
|
||||||
|
const k = 2.0 * Math.PI * frequency / 3e8; // 2*pi/lambda
|
||||||
|
const e0 = 8.854187e-12;
|
||||||
|
const mu0 = 4.0 * Math.PI * 1e-7;
|
||||||
|
const fourPI = 4.0 * Math.PI;
|
||||||
|
var Z = [];
|
||||||
|
for (let m = 1; m < wire.points.length; m+=2) {
|
||||||
|
var row = [];
|
||||||
|
for (let n = 1; n < wire.points.length; n+=2) {
|
||||||
|
// Use Harrington's method:
|
||||||
|
var tmp = math.dot(math.subtract(wire.points[n+1], wire.points[n-1]), math.subtract(wire.points[m+1], wire.points[m-1]));
|
||||||
|
tmp *= w * mu0;
|
||||||
|
tmp = math.multiply(math.complex(0,tmp), psi(wire, n, m));
|
||||||
|
var tmp2 = math.add(psi(wire, n+1, m+1), psi(wire, n-1, m-1));
|
||||||
|
var tmp3 = math.add(psi(wire, n-1, m+1), psi(wire, n+1, m-1));
|
||||||
|
var tmp4 = math.subtract(tmp2, tmp3);
|
||||||
|
tmp2 = math.multiply(tmp4, math.complex(0,-1/(w*e0)));
|
||||||
|
row.push(math.add(tmp, tmp2));
|
||||||
|
}
|
||||||
|
Z.push(row);
|
||||||
|
}
|
||||||
|
return Z;
|
||||||
|
}
|
||||||
|
/*
|
||||||
|
function calculateZMatrix(wire) {
|
||||||
|
const w = 2.0 * Math.PI * frequency;
|
||||||
|
const k = 2.0 * Math.PI * frequency / 3e8; // 2*pi/lambda
|
||||||
|
const e0 = 8.854187e-12;
|
||||||
|
const mu0 = 4.0 * Math.PI * 1e-7;
|
||||||
|
const fourPI = 4.0 * Math.PI;
|
||||||
|
var Z = [];
|
||||||
|
for (let m = 1; m < wire.points.length; m+=2) {
|
||||||
|
var row = [];
|
||||||
|
for (let n = 1; n < wire.points.length; n+=2) {
|
||||||
|
// Use Harrington's method:
|
||||||
|
var tmp = math.dot(math.subtract(wire.points[n+1], wire.points[n-1]), math.subtract(wire.points[m+1], wire.points[m-1]));
|
||||||
|
tmp *= w * mu0;
|
||||||
|
tmp = math.multiply(math.complex(0,tmp), psi(wire, n, m));
|
||||||
|
var tmp2 = math.add(psi(wire, n+1, m+1), psi(wire, n-1, m-1));
|
||||||
|
var tmp3 = math.add(psi(wire, n-1, m+1), psi(wire, n+1, m-1));
|
||||||
|
var tmp4 = math.subtract(tmp2, tmp3);
|
||||||
|
tmp2 = math.multiply(tmp4, math.complex(0,-1/(w*e0)));
|
||||||
|
row.push(math.add(tmp, tmp2));
|
||||||
|
}
|
||||||
|
Z.push(row);
|
||||||
|
}
|
||||||
|
return Z;
|
||||||
|
}
|
||||||
|
*/
|
||||||
|
function createVoltageVector(segments) {
|
||||||
|
var retval = [];
|
||||||
|
for(var i=0; i<segments; i++){
|
||||||
|
if(i == 22) {
|
||||||
|
retval.push(math.complex(1,0));
|
||||||
|
} else {
|
||||||
|
retval.push(math.complex(0,0));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return retval;
|
||||||
|
}
|
||||||
|
|
||||||
|
function calculateVoltage() {
|
||||||
|
var retval = [];
|
||||||
|
var x_axis = 0.0;
|
||||||
|
for(var i=0; i<V.length; i++) {
|
||||||
|
x_axis += wire.seg_len;
|
||||||
|
retval.push({x:x_axis, y:V[i].toPolar().r});
|
||||||
|
}
|
||||||
|
return retval;
|
||||||
|
}
|
||||||
|
|
||||||
|
function calculateCurrent() {
|
||||||
|
var retval = [];
|
||||||
|
var x_axis = 0.0;
|
||||||
|
for(var i=0; i<I.length; i++) {
|
||||||
|
x_axis += wire.seg_len;
|
||||||
|
retval.push({x:x_axis, y:I[i].toPolar().r});
|
||||||
|
}
|
||||||
|
return retval;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* Next is Three.js related code functions/methods: */
|
||||||
|
|
||||||
|
/* Now run the code: */
|
||||||
|
|
||||||
|
// Create a half-wavelength long wire, with a radius of 0.001 lambda, and segmented into 10 pieces:
|
||||||
|
wire = createWire(0.5, 0.0001, 45);
|
||||||
|
//console.log(wire);
|
||||||
|
//console.log(wire);
|
||||||
|
frequency = 3e8;
|
||||||
|
|
||||||
|
// Solve the z-matrix:
|
||||||
|
var impedance = calculateZMatrix(wire);
|
||||||
|
console.log(impedance[22][22]);
|
||||||
|
var admittance = math.inv(impedance);
|
||||||
|
//console.log(admittance);
|
||||||
|
var V = createVoltageVector(45);
|
||||||
|
var I = math.multiply(admittance, V);
|
||||||
|
console.log(I[23]);
|
||||||
|
V = math.multiply(impedance, I);
|
||||||
|
//console.log(V, I);
|
||||||
|
const chartCanvas = document.getElementById("chartCanvas");
|
||||||
|
const chartCanvasContext = chartCanvas.getContext('2d');
|
||||||
|
|
||||||
|
/*
|
||||||
|
const scene = new THREE.Scene();
|
||||||
|
const camera = new THREE.PerspectiveCamera( 75, window.innerWidth / window.innerHeight, 0.1, 1000 );
|
||||||
|
//console.log(chartCanvas.innerWidth, chartCanvas.innerHeight);
|
||||||
|
|
||||||
|
const renderer = new THREE.WebGLRenderer();
|
||||||
|
renderer.setSize( window.innerWidth, window.innerHeight );
|
||||||
|
document.body.appendChild( renderer.domElement );
|
||||||
|
|
||||||
|
const geometry = new THREE.BoxGeometry();
|
||||||
|
const material = new THREE.MeshBasicMaterial( { color: 0x00ff00 } );
|
||||||
|
const cube = new THREE.Mesh( geometry, material );
|
||||||
|
scene.add( cube );
|
||||||
|
|
||||||
|
camera.position.z = 5;
|
||||||
|
|
||||||
|
const animate = function () {
|
||||||
|
requestAnimationFrame( animate );
|
||||||
|
|
||||||
|
cube.rotation.x += 0.01;
|
||||||
|
cube.rotation.y += 0.01;
|
||||||
|
console.log(cube.rotation.x);
|
||||||
|
renderer.render( scene, camera );
|
||||||
|
};
|
||||||
|
|
||||||
|
animate();
|
||||||
|
*/
|
||||||
|
|
||||||
|
var myChart = new Chart(chartCanvasContext, {
|
||||||
|
type: 'line',
|
||||||
|
data: {
|
||||||
|
datasets: [
|
||||||
|
{
|
||||||
|
label: 'Voltage',
|
||||||
|
fill: false,
|
||||||
|
borderColor: 'red',
|
||||||
|
backgroundColor: 'red',
|
||||||
|
data: calculateVoltage(),
|
||||||
|
borderWidth: 1,
|
||||||
|
yAxisID: 'voltageID'
|
||||||
|
},
|
||||||
|
{
|
||||||
|
label: 'Current',
|
||||||
|
fill: false,
|
||||||
|
borderColor: 'blue',
|
||||||
|
backgroundColor: 'blue',
|
||||||
|
data: calculateCurrent(),
|
||||||
|
borderWidth: 1,
|
||||||
|
yAxisID: 'currentID'
|
||||||
|
}]
|
||||||
|
},
|
||||||
|
options: {
|
||||||
|
responsive: true,
|
||||||
|
maintainAspectRatio: false,
|
||||||
|
scales: {
|
||||||
|
xAxes: [{
|
||||||
|
type: 'linear',
|
||||||
|
position: 'bottom',
|
||||||
|
display: true,
|
||||||
|
scaleLabel: {
|
||||||
|
display: true,
|
||||||
|
labelString: 'Wavelength (\u03bb)'
|
||||||
|
}
|
||||||
|
}],
|
||||||
|
yAxes: [{
|
||||||
|
type: 'linear',
|
||||||
|
display: 'auto',
|
||||||
|
scaleLabel: {
|
||||||
|
display: true,
|
||||||
|
labelString: 'V',
|
||||||
|
fontColor: 'red',
|
||||||
|
fontStyle: 'bold'
|
||||||
|
},
|
||||||
|
position: 'left',
|
||||||
|
id: 'voltageID'
|
||||||
|
},{
|
||||||
|
type: 'linear',
|
||||||
|
display: 'auto',
|
||||||
|
scaleLabel: {
|
||||||
|
display: true,
|
||||||
|
labelString: 'I',
|
||||||
|
fontColor: 'blue',
|
||||||
|
fontStyle: 'bold'
|
||||||
|
},
|
||||||
|
position: 'left',
|
||||||
|
id: 'currentID'
|
||||||
|
}]
|
||||||
|
},
|
||||||
|
showLines: true,
|
||||||
|
tooltips: {
|
||||||
|
mode: 'interpolate',
|
||||||
|
intersect: false,
|
||||||
|
position: 'nearest',
|
||||||
|
callbacks: {
|
||||||
|
title: function(tooltipItem, data) {
|
||||||
|
var label = '' + tooltipItem[0].xLabel.toFixed(3).toString();
|
||||||
|
label += ' \u03BB '; // lambda character code, representing wavelength
|
||||||
|
return label;
|
||||||
|
},
|
||||||
|
label: function(tooltipItem, data) {
|
||||||
|
var label = data.datasets[tooltipItem.datasetIndex].label || '';
|
||||||
|
if (label) {
|
||||||
|
label += ': ';
|
||||||
|
}
|
||||||
|
label += Math.round(tooltipItem.yLabel * 1000) / 1000;
|
||||||
|
return label;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
plugins: {
|
||||||
|
crosshair: {
|
||||||
|
line: {
|
||||||
|
color: 'red', // crosshair line color
|
||||||
|
width: 1, // crosshair line width
|
||||||
|
dashPattern: [100, 100]
|
||||||
|
},
|
||||||
|
sync: {
|
||||||
|
enabled: false, // enable trace line syncing with other charts
|
||||||
|
group: 1, // chart group
|
||||||
|
suppressTooltips: true // suppress tooltips when showing a synced tracer
|
||||||
|
},
|
||||||
|
zoom: {
|
||||||
|
enabled: false, // enable zooming
|
||||||
|
zoomboxBackgroundColor: 'rgba(66,133,244,0.2)', // background color of zoom box
|
||||||
|
zoomboxBorderColor: '#48F', // border color of zoom box
|
||||||
|
zoomButtonText: 'Reset Zoom', // reset zoom button text
|
||||||
|
zoomButtonClass: 'reset-zoom', // reset zoom button class
|
||||||
|
},
|
||||||
|
callbacks: {
|
||||||
|
beforeZoom: function(start, end) { // called before zoom, return false to prevent zoom
|
||||||
|
return false; // return true to enable zooming
|
||||||
|
},
|
||||||
|
afterZoom: function(start, end) { // called after zoom
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
|
</script>
|
||||||
|
</body>
|
||||||
|
</html>
|
17
toroid.html
17
toroid.html
|
@ -1,3 +1,4 @@
|
||||||
|
@@ -1,1512 +1,1542 @@
|
||||||
<!DOCTYPE html>
|
<!DOCTYPE html>
|
||||||
<html lang="en">
|
<html lang="en">
|
||||||
<head>
|
<head>
|
||||||
|
@ -189,6 +190,7 @@
|
||||||
'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 },
|
'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 },
|
'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",
|
mat : "MnZn",
|
||||||
mu_i : 600,
|
mu_i : 600,
|
||||||
B : 4700,
|
B : 4700,
|
||||||
|
@ -209,6 +211,7 @@
|
||||||
'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 },
|
'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 },
|
'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",
|
mat : "MnZn",
|
||||||
mu_i : 1400,
|
mu_i : 1400,
|
||||||
B : 4600,
|
B : 4600,
|
||||||
|
@ -232,6 +235,7 @@
|
||||||
'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 },
|
'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 },
|
'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",
|
mat : "MnZn",
|
||||||
mu_i : 2300,
|
mu_i : 2300,
|
||||||
B : 4800,
|
B : 4800,
|
||||||
|
@ -254,6 +258,7 @@
|
||||||
'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 },
|
'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 },
|
'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",
|
mat : "MnZn",
|
||||||
mu_i : 2000,
|
mu_i : 2000,
|
||||||
B : 4900,
|
B : 4900,
|
||||||
|
@ -276,6 +281,7 @@
|
||||||
'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 },
|
'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 },
|
'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",
|
mat : "MnZn",
|
||||||
mu_i : 5000,
|
mu_i : 5000,
|
||||||
B : 4800,
|
B : 4800,
|
||||||
|
@ -300,6 +306,7 @@
|
||||||
'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 },
|
'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 },
|
'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",
|
mat : "NiZn",
|
||||||
mu_i : 40,
|
mu_i : 40,
|
||||||
B : 2300,
|
B : 2300,
|
||||||
|
@ -324,6 +331,7 @@
|
||||||
'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 },
|
'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 },
|
'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",
|
mat : "NiZn",
|
||||||
mu_i : 125,
|
mu_i : 125,
|
||||||
B : 2350,
|
B : 2350,
|
||||||
|
@ -348,6 +356,7 @@
|
||||||
'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 },
|
'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 },
|
'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",
|
mat : "NiZn",
|
||||||
mu_i : 250,
|
mu_i : 250,
|
||||||
B : 4200,
|
B : 4200,
|
||||||
|
@ -369,6 +378,7 @@
|
||||||
'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 },
|
'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 },
|
'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",
|
mat : "MgZn",
|
||||||
mu_i : 500,
|
mu_i : 500,
|
||||||
B : 2550,
|
B : 2550,
|
||||||
|
@ -394,6 +404,7 @@
|
||||||
'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 },
|
'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 },
|
'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",
|
mat : "NiZn",
|
||||||
mu_i : 800,
|
mu_i : 800,
|
||||||
B : 3500,
|
B : 3500,
|
||||||
|
@ -419,6 +430,7 @@
|
||||||
'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 },
|
'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 },
|
'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",
|
mat : "NiZn",
|
||||||
mu_i : 800,
|
mu_i : 800,
|
||||||
B : 2900,
|
B : 2900,
|
||||||
|
@ -439,7 +451,9 @@
|
||||||
'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 },
|
'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 },
|
'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 },
|
'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",
|
mat : "MnZn",
|
||||||
mu_i : 1500,
|
mu_i : 1500,
|
||||||
B : 3600,
|
B : 3600,
|
||||||
|
@ -461,6 +475,7 @@
|
||||||
'T225' : { PN:'T225-2', A:57.2, B:35.6, C:14.0, W:0.0, CC:0.0, le:14.6, Ae:1.42, Ve:20.7, Al:12.0 },
|
'T225' : { PN:'T225-2', A:57.2, B:35.6, C:14.0, W:0.0, CC:0.0, le:14.6, Ae:1.42, Ve:20.7, Al:12.0 },
|
||||||
'T200' : { PN:'T200-2', A:50.8, B:31.8, C:14.0, W:0.0, CC:0.0, le:13.0, Ae:1.27, Ve:16.4, Al:12.0 },
|
'T200' : { PN:'T200-2', A:50.8, B:31.8, C:14.0, W:0.0, CC:0.0, le:13.0, Ae:1.27, Ve:16.4, Al:12.0 },
|
||||||
},
|
},
|
||||||
|
manufacturer : "Powedered ",
|
||||||
mat : "Carbonyl E",
|
mat : "Carbonyl E",
|
||||||
mu_i : 10,
|
mu_i : 10,
|
||||||
}
|
}
|
||||||
|
@ -736,6 +751,7 @@
|
||||||
|
|
||||||
function updateChart() {
|
function updateChart() {
|
||||||
myChart.options.plugins.title.text = "Fair-Rite " + t_size + "-" + material + " [" + toroid.core.PN + "]";
|
myChart.options.plugins.title.text = "Fair-Rite " + t_size + "-" + material + " [" + toroid.core.PN + "]";
|
||||||
|
myChart.options.plugins.title.text = cores[material].manufacturer + " " + t_size + "-" + material + " [" + toroid.core.PN + "]";
|
||||||
myChart.data.datasets[0].data = calculateInductance();
|
myChart.data.datasets[0].data = calculateInductance();
|
||||||
myChart.data.datasets[1].data = calculateImpedance();
|
myChart.data.datasets[1].data = calculateImpedance();
|
||||||
myChart.data.datasets[2].data = calculateResistance();
|
myChart.data.datasets[2].data = calculateResistance();
|
||||||
|
@ -1443,6 +1459,7 @@
|
||||||
title: {
|
title: {
|
||||||
display: true,
|
display: true,
|
||||||
text: "Fair-Rite " + t_size + "-" + material + " [" + toroid.core.PN + "]",
|
text: "Fair-Rite " + t_size + "-" + material + " [" + toroid.core.PN + "]",
|
||||||
|
text: cores[material].manufacturer + " " + t_size + "-" + material + " [" + toroid.core.PN + "]",
|
||||||
},
|
},
|
||||||
tooltip: {
|
tooltip: {
|
||||||
enabled: true,
|
enabled: true,
|
||||||
|
|
Ładowanie…
Reference in New Issue