Prąd przemienny

#coil-simulation {–bg:#f7f8fb;–card:#fff;–text:#172033;–muted:#667085;–grid:#e1e5ec;–axis:#202939;–curve:#2563eb;–tan:#dc2626;–point:#7c3aed;–field:#18cfd0;–coil:#8b0000; box-sizing:border-box; font-family:system-ui,-apple-system,Segoe UI,Roboto,Arial,sans-serif;background:var(–bg);color:var(–text)} #coil-simulation *,#coil-simulation *::before,#coil-simulation *::after{box-sizing:border-box} #coil-simulation .app{max-width:1450px;margin:auto;padding:18px} #coil-simulation .top{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:16px} #coil-simulation .card{background:#fff;border:1px solid #dfe3eb;border-radius:16px;padding:12px;min-width:0} #coil-simulation .title{font-weight:750;font-size:19px;margin:2px 0 8px} #coil-simulation svg{width:100%;height:auto;display:block;background:#fff;border-radius:10px} #coil-simulation .controls{margin-top:16px} #coil-simulation .row{display:flex;align-items:center;gap:12px;flex-wrap:wrap} #coil-simulation .readout{font-size:25px;font-weight:750;margin-left:auto} #coil-simulation input[type=range]{width:100%;accent-color:#2563eb;margin-top:8px} #coil-simulation button{min-height:42px;border:1px solid #cfd5df;border-radius:9px;background:#fff;color:#172033;-webkit-text-fill-color:#172033;padding:8px 13px;font-size:15px;font-weight:650;cursor:pointer} #coil-simulation button:hover{background:#f4f6f9} #coil-simulation .hint{font-size:14px;color:var(–muted);margin-top:10px} @media(max-width:1000px){#coil-simulation .top{grid-template-columns:repeat(2,minmax(0,1fr))}#coil-simulation .phase{grid-column:1/-1}} @media(max-width:720px){#coil-simulation .top{grid-template-columns:1fr}#coil-simulation .phase{grid-column:auto}#coil-simulation .readout{margin-left:0}}
Rotating coil in a magnetic field
S B α
Magnetic flux–time graph
Induced EMF–time graph
Choose a time
EMF = 0.00 V
The coil orientation, magnetic flux, tangent and induced EMF are synchronized. By Faraday’s law, the induced EMF has the opposite sign to the gradient of the magnetic flux graph.
(()=>{ const root=document.getElementById(„coil-simulation”); if(!root)return; const get=id=>root.querySelector(„#”+id); const NS=”http://www.w3.org/2000/svg&#8221;; // ———- phase diagram ———- const field=get(„field”); for(let y=48;yp.join(„,”)).join(” „)); // Draw the actual rotation axis through the centre. axisLine.setAttribute(„x1”,C.x-175*Z.x);axisLine.setAttribute(„y1”,C.y-175*Z.y); axisLine.setAttribute(„x2”,C.x+175*Z.x);axisLine.setAttribute(„y2”,C.y+175*Z.y); axisLine.setAttribute(„stroke”,”#555″);axisLine.setAttribute(„stroke-width”,”2″); axisLine.setAttribute(„stroke-dasharray”,”7 6″); // Area vector S rotates from +B toward the vertical screen direction. // Its x-component is cos(theta), so Phi is proportional to cos(theta). const svx=Math.cos(theta), svy=-0.78*Math.sin(theta); const norm=Math.hypot(svx,svy)||1, len=108; const ex=C.x+len*svx/norm, ey=C.y+len*svy/norm; svec.setAttribute(„x1”,C.x);svec.setAttribute(„y1”,C.y); svec.setAttribute(„x2”,ex);svec.setAttribute(„y2″,ey); sLabelPos(ex,ey); // Display alpha between B and S. const disp=Math.atan2(svy,svx),r=48,steps=28;let d=””; for(let i=0;iL+x/xMax*(W-L-R), sy=y=>H-B-(y+1.25)/2.5*(H-T-B); function add(tag,a,p,text=””){const e=document.createElementNS(NS,tag);Object.entries(a).forEach(([k,v])=>e.setAttribute(k,v));if(text)e.textContent=text;p.appendChild(e);return e;} function setup(grid,axes,yLabel){ for(let x=0;xadd(„line”,{x1:L,y1:sy(y),x2:W-R,y2:sy(y),stroke:”var(–grid)”,”stroke-width”:1},grid)); add(„line”,{x1:L,y1:sy(0),x2:W-R,y2:sy(0),stroke:”var(–axis)”,”stroke-width”:2.2},axes); add(„line”,{x1:L,y1:H-B,x2:L,y2:T,stroke:”var(–axis)”,”stroke-width”:2.2},axes); add(„path”,{d:`M ${W-R-10} ${sy(0)-6} L ${W-R} ${sy(0)} L ${W-R-10} ${sy(0)+6}`,fill:”none”,stroke:”var(–axis)”,”stroke-width”:2.2},axes); add(„path”,{d:`M ${L-6} ${T+10} L ${L} ${T} L ${L+6} ${T+10}`,fill:”none”,stroke:”var(–axis)”,”stroke-width”:2.2},axes); [[0,”0″],[.25,”T/4″],[.5,”T/2″],[.75,”3T/4″],[1,”T”]].forEach(([x,s])=>{add(„line”,{x1:sx(x),y1:sy(0)-6,x2:sx(x),y2:sy(0)+6,stroke:”var(–axis)”,”stroke-width”:1.5},axes);add(„text”,{x:sx(x),y:sy(0)+24,”text-anchor”:”middle”,”font-size”:13,fill:”#667085″},axes,s)}); add(„text”,{x:W-R-2,y:sy(0)+36,”text-anchor”:”end”,”font-size”:17,”font-style”:”italic”,fill:”var(–axis)”},axes,”t”); add(„text”,{x:L-38,y:T+16,”font-size”:18,”font-style”:”italic”,fill:”var(–axis)”},axes,yLabel); } setup(get(„fgrid”),get(„faxes”),”Φ”); setup(get(„egrid”),get(„eaxes”),”EMF”); const flux=x=>Math.cos(2*Math.PI*x), emf=x=>Math.sin(2*Math.PI*x); let fd=””,ed=””; for(let x=0;x<=1.25;x+=.003){fd+=(fd?"L":"M")+sx(x)+" "+sy(flux(x))+" ";ed+=(ed?"L":"M")+sx(x)+" "+sy(emf(x))+" ";} get("fcurve").setAttribute("d",fd);get("ecurve").setAttribute("d",ed); const slider=get("slider"),fp=get("fpoint"),ep=get("epoint"),tan=get("ftan"),guide=get("eguide"),read=get("emf"); function update(){ const x=+slider.value,F=flux(x),E=emf(x),theta=2*Math.PI*x; fp.setAttribute("cx",sx(x));fp.setAttribute("cy",sy(F));ep.setAttribute("cx",sx(x));ep.setAttribute("cy",sy(E)); guide.setAttribute("x1",sx(x));guide.setAttribute("x2",sx(x));guide.setAttribute("y1",sy(0));guide.setAttribute("y2",sy(E)); read.textContent=(Math.abs(E)get(id).addEventListener(„click”,()=>{slider.value=x;update()})); update(); })();