-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathCoilDesigner.html
More file actions
141 lines (130 loc) · 13.2 KB
/
Copy pathCoilDesigner.html
File metadata and controls
141 lines (130 loc) · 13.2 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
<!DOCTYPE html>
<html lang="en">
<head>
<script async src="https://pagead2.googlesyndication.com/pagead/js/adsbygoogle.js?client=ca-pub-4211938844076974"
crossorigin="anonymous"></script>
<script async src="https://www.googletagmanager.com/gtag/js?id=G-6R4JGG0586"></script>
<script>window.dataLayer=window.dataLayer||[];function gtag(){dataLayer.push(arguments);}gtag('js',new Date());gtag('config','G-6R4JGG0586');</script>
<meta charset="UTF-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Simple RF Coil Designer — MRI Loop Coil Calculator | RF Toolbox</title>
<meta name="description" content="Calculate loop coil inductance and tuning capacitor for MRI or NMR. Enter wire diameter, loop diameter, and Larmor frequency. Based on the Wheeler/Rosa formula.">
<meta name="robots" content="index, follow">
<link rel="canonical" href="https://rftoolbox.ca/CoilDesigner.html">
<meta property="og:title" content="Simple RF Coil Designer — MRI Loop Coil Calculator | RF Toolbox">
<meta property="og:description" content="Calculate loop coil inductance and tuning capacitor for MRI or NMR. Enter wire diameter, loop diameter, and Larmor frequency. Based on the Wheeler/Rosa formula.">
<meta property="og:url" content="https://rftoolbox.ca/CoilDesigner.html">
<meta property="og:type" content="website">
<meta property="og:site_name" content="RF Toolbox">
<script src="MathJax.js"></script>
<script id="MathJax-script" async src="https://cdn.jsdelivr.net/npm/mathjax@3/es5/tex-chtml.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/mathjs/12.3.2/math.js" integrity="sha512-L6TOvunyzSyFBxlyKEYgAmofV+iAI+J9t3M9lc4smm/FbV8HlzKD+vflXUGjx8puTKzH7o4PCWsR4jDwlHXAHg==" crossorigin="anonymous" referrerpolicy="no-referrer"></script>
<script src="https://code.jquery.com/jquery-1.11.3.min.js"></script>
<link rel="stylesheet" href="style.css">
<script type="application/ld+json">
{
"@context": "https://schema.org",
"@type": "SoftwareApplication",
"name": "Simple RF Coil Designer — MRI Loop Coil Calculator",
"description": "Calculate loop coil inductance and tuning capacitor for MRI or NMR. Enter wire diameter, loop diameter, and Larmor frequency. Based on the Wheeler/Rosa formula.",
"url": "https://rftoolbox.ca/CoilDesigner.html",
"applicationCategory": "EngineeringApplication",
"operatingSystem": "Web",
"offers": {"@type": "Offer", "price": "0", "priceCurrency": "USD"},
"publisher": {"@type": "Organization", "name": "RF Toolbox", "url": "https://rftoolbox.ca"}
}
</script>
</head>
<body class="no-nav">
<header><h2><a href="index.html" style="color:white;text-decoration:none;">RF Toolbox</a></h2></header>
<section>
<article>
<div class="breadcrumb"><a href="index.html">⌂ Home</a></div>
<h3>Simple RF Coil Designer</h3>
<div class="tool-concept">
<p>Designs a single-turn loop coil for MRI or NMR. Given the loop dimensions and Larmor frequency, calculates self-inductance using the single-turn loop (Rosa/Neumann) formula and the tuning capacitor required for resonance.</p>
<details style="margin-top:8px;">
<summary style="cursor:pointer;font-size:11px;color:#AA77FF;font-weight:bold;letter-spacing:0.05em;text-transform:uppercase;user-select:none;">Equations & Parameters ▸</summary>
<div style="background:#f0eeff;border-left:3px solid #AA77FF;padding:8px 12px 6px;border-radius:0 4px 4px 0;margin:6px 0 10px;font-size:12.5px;line-height:2.0;overflow-x:auto;">\(L = \mu_0\mu_r\!\left(\tfrac{D}{2}\right)\!\left[\ln\!\left(\tfrac{8D}{d}\right)-2\right] \qquad C = \dfrac{1}{4\pi^2 f^2 L}\)</div>
<table style="font-size:12px;border-collapse:collapse;margin-top:6px;"><tr><td style="padding:3px 14px 3px 0;font-weight:bold;color:#5533aa;white-space:nowrap;vertical-align:top;">d</td><td style="padding:3px 0;">Wire diameter (mm). Thicker wire → lower resistance → higher Q.</td></tr><tr><td style="padding:3px 14px 3px 0;font-weight:bold;color:#5533aa;white-space:nowrap;vertical-align:top;">D</td><td style="padding:3px 0;">Loop diameter (mm). Larger loop → more inductance, more signal sensitivity.</td></tr><tr><td style="padding:3px 14px 3px 0;font-weight:bold;color:#5533aa;white-space:nowrap;vertical-align:top;">f</td><td style="padding:3px 0;">Larmor frequency — the resonant frequency of the nucleus in the static B₀ field. ¹H at 3T ≈ 128 MHz, at 7T ≈ 298 MHz.</td></tr><tr><td style="padding:3px 14px 3px 0;font-weight:bold;color:#5533aa;white-space:nowrap;vertical-align:top;">L</td><td style="padding:3px 0;">Self-inductance (Rosa formula).</td></tr><tr><td style="padding:3px 14px 3px 0;font-weight:bold;color:#5533aa;white-space:nowrap;vertical-align:top;">C</td><td style="padding:3px 0;">Required tuning capacitor for resonance at f.</td></tr></table>
<div style="margin-top:10px;padding-top:8px;border-top:1px solid #e0d8ff;"><div style="font-size:10px;font-weight:bold;color:#AA77FF;letter-spacing:0.07em;text-transform:uppercase;margin-bottom:4px;">Physical constants used</div><table style="font-size:12px;border-collapse:collapse;"><tr><td style="padding:3px 14px 3px 0;font-weight:bold;color:#5533aa;">µ₀</td><td>4π×10⁻⁷ H/m</td></tr>
<tr><td style="padding:3px 14px 3px 0;font-weight:bold;color:#5533aa;">¹H γ/2π</td><td>42.577 MHz/T (Larmor frequency per Tesla)</td></tr>
<tr><td style="padding:3px 14px 3px 0;font-weight:bold;color:#5533aa;">¹H at 1.5 T</td><td>63.87 MHz</td></tr>
<tr><td style="padding:3px 14px 3px 0;font-weight:bold;color:#5533aa;">¹H at 3 T</td><td>127.74 MHz</td></tr>
<tr><td style="padding:3px 14px 3px 0;font-weight:bold;color:#5533aa;">¹H at 7 T</td><td>297.7 MHz</td></tr>
<tr><td style="padding:3px 14px 3px 0;font-weight:bold;color:#5533aa;">σ_muscle @ 128 MHz</td><td>≈ 0.77 S/m</td></tr>
<tr><td style="padding:3px 14px 3px 0;font-weight:bold;color:#5533aa;">ε_muscle @ 128 MHz</td><td>≈ 58</td></tr>
<tr><td style="padding:3px 14px 3px 0;font-weight:bold;color:#5533aa;">IEC SAR limit (WB normal)</td><td>2 W/kg (over 6 min)</td></tr>
<tr><td style="padding:3px 14px 3px 0;font-weight:bold;color:#5533aa;">IEC SAR limit (head)</td><td>3.2 W/kg (over 10 min)</td></tr></table></div>
<div style="margin-top:8px;padding-top:6px;border-top:1px solid #e0d8ff;font-size:11.5px;color:#666;"><span style="font-weight:bold;color:#AA77FF;">Reference: </span>Neumann mutual inductance formula; H. Wheeler, "Simple inductance formulas for radio coils," <em>Proc. IRE</em> 16, 1398 (1928)</div>
</details>
</div>
<div class="sec-lbl">Inputs</div>
<div class="sec-lbl" style="margin-top:0;margin-bottom:6px;border:none;color:#888;">Loop geometry</div>
<div class="inp-grid"><div class="inp-row"><label>Wire diameter, <span class="var">d</span></label><div class="inp-inline"><input type="text" id="d" placeholder="Enter mm" data-tip="Conductor (wire or tube) diameter. Thicker wire lowers resistance and raises Q."><span class="inp-units">mm</span></div><span class="inp-hint">Conductor diameter, not radius</span></div><div class="inp-row"><label>Loop diameter, <span class="var">D</span></label><div class="inp-inline"><input type="text" id="D" placeholder="Enter mm" data-tip="Loop diameter, measured centre-to-centre of the conductor. Larger D → more inductance."><span class="inp-units">mm</span></div><span class="inp-hint">Centre-to-centre of conductor</span></div></div>
<div class="sec-lbl" style="margin-top:8px;margin-bottom:6px;border:none;color:#888;">Field parameters</div>
<div class="inp-grid"><div class="inp-row"><label>Larmor frequency, <span class="var">f</span></label><div class="inp-inline"><input type="text" id="f" placeholder="Enter freq" data-tip="Larmor frequency. ¹H: 64 MHz at 1.5T, 128 MHz at 3T, 298 MHz at 7T."><select id="f_dropdown"><option value="0">kHz</option><option value="1" selected>MHz</option><option value="2">GHz</option><option value="3">THz</option></select></div><span class="inp-hint">¹H at 3T ≈ 128 MHz</span></div></div>
<div style="display:flex;gap:8px;align-items:center;margin:12px 0 6px;"><button class="calc-btn" id="btn">Calculate</button> <button class="example-btn" onclick="loadExample({"d": "1.5", "D": "80", "f": "128", "f_dropdown": "1"})" title="3T MRI ¹H coil — 80 mm loop, 1.5 mm wire, 128 MHz">Load Example</button></div>
<div id="error" class="err-msg" style="color:#c0392b;font-size:12px;margin-bottom:6px;min-height:16px;"></div>
<div class="sec-lbl">Results</div>
<div class="res-grid"><div class="res-card"><h4>Coil Parameters</h4><div class="res-row"><span class="res-lbl">Self-inductance, L</span><span class="res-val " id="L">—</span></div><div class="res-row"><span class="res-lbl">Tuning capacitor, C</span><span class="res-val " id="C">—</span></div></div></div>
<div class="sec-lbl">Diagram</div>
<div class="schematic-box"><div id="tool-diagram"></div></div>
<script>
function drawDiagram() {
var Lv = document.getElementById('L') ? document.getElementById('L').textContent : '—';
var Cv = document.getElementById('C') ? document.getElementById('C').textContent : '—';
var Dv = document.getElementById('D') ? (parseFloat(document.getElementById('D').value)||0) : 0;
var dv = document.getElementById('d') ? (parseFloat(document.getElementById('d').value)||0) : 0;
var W=560,H=190,cx=200,cy=85,R=65;
var s='<svg viewBox="0 0 '+W+' '+H+'" width="'+W+'" height="'+H+'" xmlns="http://www.w3.org/2000/svg" style="font-family:monospace;max-width:100%;">';
s+='<rect width="'+W+'" height="'+H+'" fill="#faf9ff" rx="4"/>';
// Loop wire — translucent underlay visualises the wire diameter d
var wireR=Math.max(3,Math.min(10, dv*1.5));
s+='<circle cx="'+cx+'" cy="'+cy+'" r="'+R+'" fill="none" stroke="#AA77FF" stroke-width="'+(wireR*2)+'" opacity="0.22"/>';
s+='<circle cx="'+cx+'" cy="'+cy+'" r="'+R+'" fill="none" stroke="#5533aa" stroke-width="'+Math.max(2,wireR)+'" stroke-linecap="round"/>';
// Tuning capacitor — break the loop at 3 o'clock; plates perpendicular to the wire
var gx=cx+R;
s+='<rect x="'+(gx-wireR-4)+'" y="'+(cy-14)+'" width="'+(2*wireR+8)+'" height="28" fill="#faf9ff"/>';
s+='<line x1="'+gx+'" y1="'+(cy-13)+'" x2="'+gx+'" y2="'+(cy-3.5)+'" stroke="#5533aa" stroke-width="2" stroke-linecap="round"/>';
s+='<line x1="'+gx+'" y1="'+(cy+3.5)+'" x2="'+gx+'" y2="'+(cy+13)+'" stroke="#5533aa" stroke-width="2" stroke-linecap="round"/>';
s+='<line x1="'+(gx-9)+'" y1="'+(cy-3.5)+'" x2="'+(gx+9)+'" y2="'+(cy-3.5)+'" stroke="#5533aa" stroke-width="2.8" stroke-linecap="round"/>';
s+='<line x1="'+(gx-9)+'" y1="'+(cy+3.5)+'" x2="'+(gx+9)+'" y2="'+(cy+3.5)+'" stroke="#5533aa" stroke-width="2.8" stroke-linecap="round"/>';
s+='<text x="'+(gx+16)+'" y="'+(cy+4)+'" text-anchor="start" font-size="11" fill="#5533aa" font-style="italic">C</text>';
// L label inside loop
s+='<text x="'+cx+'" y="'+(cy+4)+'" text-anchor="middle" font-size="14" fill="#AA77FF" font-weight="bold" font-style="italic">L</text>';
// Wire-diameter callout (cross-section of the conductor)
if(dv>0){
var xd=cx-R*0.72, yd=cy-R*0.72;
s+='<circle cx="'+xd+'" cy="'+yd+'" r="'+wireR+'" fill="#faf9ff" stroke="#AA77FF" stroke-width="1.2" stroke-dasharray="2,2"/>';
s+='<text x="'+(xd-wireR-4)+'" y="'+(yd+4)+'" text-anchor="end" font-size="9" fill="#888">d'+(dv?' = '+dv+' mm':'')+'</text>';
}
// D dimension — double-headed arrow below the loop
var ddy=cy+R+12;
s+='<line x1="'+(cx-R)+'" y1="'+ddy+'" x2="'+(cx+R)+'" y2="'+ddy+'" stroke="#888" stroke-width="1" stroke-dasharray="3,3"/>';
s+='<polygon points="'+(cx-R)+','+ddy+' '+(cx-R+7)+','+(ddy-3)+' '+(cx-R+7)+','+(ddy+3)+'" fill="#888"/>';
s+='<polygon points="'+(cx+R)+','+ddy+' '+(cx+R-7)+','+(ddy-3)+' '+(cx+R-7)+','+(ddy+3)+'" fill="#888"/>';
s+='<text x="'+cx+'" y="'+(ddy+14)+'" text-anchor="middle" font-size="9.5" fill="#888">D'+(Dv?' = '+Dv+' mm':'')+'</text>';
// Results panel
var rx2=330;
s+='<rect x="'+rx2+'" y="25" width="210" height="120" fill="white" stroke="#d0c8f0" stroke-width="1" rx="4"/>';
s+='<text x="'+(rx2+10)+'" y="42" font-size="10" font-weight="bold" fill="#5533aa" letter-spacing="1">RESULTS</text>';
s+='<line x1="'+rx2+'" y1="47" x2="'+(rx2+210)+'" y2="47" stroke="#e0d8ff" stroke-width="1"/>';
s+='<text x="'+(rx2+10)+'" y="66" font-size="11" fill="#555">Self-inductance, L</text>';
s+='<text x="'+(rx2+200)+'" y="66" text-anchor="end" font-size="12" font-weight="bold" fill="#1a1a1a">'+Lv+'</text>';
s+='<line x1="'+rx2+'" y1="72" x2="'+(rx2+210)+'" y2="72" stroke="#e8e0ff" stroke-width="1" stroke-dasharray="2,2"/>';
s+='<text x="'+(rx2+10)+'" y="92" font-size="11" fill="#555">Tuning capacitor, C</text>';
s+='<text x="'+(rx2+200)+'" y="92" text-anchor="end" font-size="12" font-weight="bold" fill="#1a1a1a">'+Cv+'</text>';
s+='</svg>';
document.getElementById('tool-diagram').innerHTML=s;
}
</script>
<div class="wiki-link-hint">📖 <a href="wiki_coil_design.html">Learn about RF coil design for MRI →</a></div>
<script src="CoilDesigner.js"></script>
</article>
</section>
<footer><p><a href="index.html">Home</a> · <a href="wiki.html">📖 Wiki</a> · <a href="privacy.html">Privacy</a> · <a href="disclaimer.html">Disclaimer</a></p></footer>
<script src="tool-enhancements.js"></script>
</body>
</html>