{
  "format": "mathssim",
  "version": 1,
  "title": "05 - Electric and Magnetic Fields",
  "computeMode": "standard",
  "functions": [],
  "notation": {
    "eps0": "\\epsilon_0",
    "er": "\\epsilon_r",
    "eps": "\\epsilon",
    "Eplate": "E",
    "Dplate": "D",
    "Aplate": "A",
    "Qfree": "Q_f",
    "Qpoint": "Q",
    "mu0": "\\mu_0",
    "Iwire": "I",
    "r_eval": "r",
    "Hwire": "H_\\phi",
    "Bwire": "B_\\phi",
    "qtest": "q",
    "vtest": "\\mathbf{v}",
    "Etestvec": "\\mathbf{E}",
    "Btestvec": "\\mathbf{B}",
    "F_lorentz": "\\mathbf{F}",
    "E0": "E_0",
    "H0": "H_0",
    "we": "w_e",
    "wm": "w_m",
    "S0": "S"
  },
  "regions": [
    {
      "id": "ch05-head-001",
      "type": "text",
      "x": 65,
      "y": 35,
      "w": 990,
      "content": "05 - Electric and Magnetic Fields",
      "heading": true
    },
    {
      "id": "ch05-note-002",
      "type": "text",
      "x": 65,
      "y": 140,
      "w": 990,
      "content": "Interactive M²S companion to EM Course Document 05.\nE, D, B, H, sources, constitutive relations, force, energy and Poynting power flow.\nEdit the input Math regions, then Calculate. M²S values are unitless, so SI units are stated explicitly in labels and notes.",
      "heading": false
    },
    {
      "id": "ch05-head-003",
      "type": "text",
      "x": 65,
      "y": 291,
      "w": 990,
      "content": "1. E and D in a linear dielectric",
      "heading": true
    },
    {
      "id": "ch05-math-004",
      "type": "math",
      "x": 65,
      "y": 396,
      "w": 475,
      "target": "eps0",
      "expr": "8.854e-12"
    },
    {
      "id": "ch05-math-005",
      "type": "math",
      "x": 560,
      "y": 396,
      "w": 475,
      "target": "er",
      "expr": "4"
    },
    {
      "id": "ch05-math-006",
      "type": "math",
      "x": 65,
      "y": 561,
      "w": 990,
      "target": "eps",
      "expr": "eps0*er"
    },
    {
      "id": "ch05-math-007",
      "type": "math",
      "x": 65,
      "y": 726,
      "w": 990,
      "target": "Eplate",
      "expr": "2000"
    },
    {
      "id": "ch05-math-008",
      "type": "math",
      "x": 65,
      "y": 891,
      "w": 990,
      "target": "Dplate",
      "expr": "eps*Eplate"
    },
    {
      "id": "ch05-math-009",
      "type": "math",
      "x": 65,
      "y": 1056,
      "w": 990,
      "target": "Aplate",
      "expr": "0.01"
    },
    {
      "id": "ch05-math-010",
      "type": "math",
      "x": 65,
      "y": 1221,
      "w": 990,
      "target": "Qfree",
      "expr": "Dplate*Aplate"
    },
    {
      "id": "ch05-table-011",
      "type": "table",
      "x": 65,
      "y": 1386,
      "w": 990,
      "h": 280,
      "title": "Parallel-plate field relation",
      "headersText": "Value",
      "rowLabels": "E (V/m)\nD (C/m²)\nFree charge for 0.01 m² (C)",
      "expr": "cols([Eplate,Dplate,Qfree])",
      "precision": "12"
    },
    {
      "id": "ch05-head-012",
      "type": "text",
      "x": 65,
      "y": 1756,
      "w": 990,
      "content": "2. Point-charge electric field",
      "heading": true
    },
    {
      "id": "ch05-math-013",
      "type": "math",
      "x": 65,
      "y": 1861,
      "w": 990,
      "target": "Qpoint",
      "expr": "2e-9"
    },
    {
      "id": "ch05-plot-014",
      "type": "plot",
      "kind": "quiver3d",
      "title": "Electric field direction around a positive point charge",
      "xexpr": "linspace(-0.12,0.12,6)",
      "yexpr": "linspace(-0.12,0.12,6)",
      "zexpr": "linspace(-0.12,0.12,6)",
      "x": 65,
      "y": 2026,
      "w": 990,
      "h": 500,
      "xlabel": "x (m)",
      "ylabel": "y (m)",
      "y2label": "",
      "zlabel": "z (m)",
      "vlines": "",
      "bins": 20,
      "palette": "blue",
      "xlog": false,
      "ylog": false,
      "y2log": false,
      "uexpr": "Qpoint*x/(4*pi*eps0*(x^2+y^2+z^2)^(3/2))",
      "vexpr": "Qpoint*y/(4*pi*eps0*(x^2+y^2+z^2)^(3/2))",
      "wexpr": "Qpoint*z/(4*pi*eps0*(x^2+y^2+z^2)^(3/2))",
      "vectorStyle": "arrows",
      "vectorAutoScale": true,
      "vectorScale": 0.8,
      "vectorNormalize": true,
      "vectorHeadSize": 0.58,
      "vectorWidth": 2.0,
      "vectorOpacity": 0.9,
      "vectorDensity": 1,
      "vectorAnchor": "tail",
      "vectorColorMode": "magnitude",
      "vectorColor": "#2175b5",
      "vectorPalette": "Viridis",
      "showColorbar": true,
      "animate": false,
      "animVar": "t",
      "animStart": "0",
      "animStop": "2*pi",
      "animFrames": 32,
      "animFps": 14,
      "animLoop": true
    },
    {
      "id": "ch05-head-015",
      "type": "text",
      "x": 65,
      "y": 2631,
      "w": 990,
      "content": "3. H and B around a long straight current",
      "heading": true
    },
    {
      "id": "ch05-math-016",
      "type": "math",
      "x": 65,
      "y": 2736,
      "w": 475,
      "target": "mu0",
      "expr": "4*pi*1e-7"
    },
    {
      "id": "ch05-math-017",
      "type": "math",
      "x": 560,
      "y": 2736,
      "w": 475,
      "target": "Iwire",
      "expr": "5"
    },
    {
      "id": "ch05-math-018",
      "type": "math",
      "x": 65,
      "y": 2901,
      "w": 990,
      "target": "r_eval",
      "expr": "0.020"
    },
    {
      "id": "ch05-math-019",
      "type": "math",
      "x": 65,
      "y": 3066,
      "w": 990,
      "target": "Hwire",
      "expr": "Iwire/(2*pi*r_eval)"
    },
    {
      "id": "ch05-math-020",
      "type": "math",
      "x": 65,
      "y": 3231,
      "w": 990,
      "target": "Bwire",
      "expr": "mu0*Hwire"
    },
    {
      "id": "ch05-table-021",
      "type": "table",
      "x": 65,
      "y": 3396,
      "w": 990,
      "h": 280,
      "title": "Long-wire worked value",
      "headersText": "Value",
      "rowLabels": "H at 20 mm (A/m)\nB at 20 mm (T)",
      "expr": "cols([Hwire,Bwire])",
      "precision": "12"
    },
    {
      "id": "ch05-plot-022",
      "type": "plot",
      "kind": "quiver2d",
      "title": "Magnetic H direction around +z current",
      "xexpr": "linspace(-0.05,0.05,12)",
      "yexpr": "linspace(-0.05,0.05,12)",
      "zexpr": "",
      "x": 65,
      "y": 3766,
      "w": 990,
      "h": 470,
      "xlabel": "x (m)",
      "ylabel": "y (m)",
      "y2label": "",
      "zlabel": "",
      "vlines": "",
      "bins": 20,
      "palette": "blue",
      "xlog": false,
      "ylog": false,
      "y2log": false,
      "uexpr": "-Iwire*y/(2*pi*(x^2+y^2))",
      "vexpr": "Iwire*x/(2*pi*(x^2+y^2))",
      "wexpr": "",
      "vectorAutoScale": true,
      "vectorScale": 0.85,
      "vectorNormalize": true,
      "vectorHeadSize": 0.42,
      "vectorWidth": 2.0,
      "vectorOpacity": 0.92,
      "vectorDensity": 1,
      "vectorAnchor": "tail",
      "vectorColorMode": "magnitude",
      "vectorColor": "#2175b5",
      "vectorPalette": "Viridis",
      "showColorbar": true,
      "animate": false,
      "animVar": "t",
      "animStart": "0",
      "animStop": "2*pi",
      "animFrames": 36,
      "animFps": 16,
      "animLoop": true
    },
    {
      "id": "ch05-head-023",
      "type": "text",
      "x": 65,
      "y": 4341,
      "w": 990,
      "content": "4. Force on a moving charge",
      "heading": true
    },
    {
      "id": "ch05-math-024",
      "type": "math",
      "x": 65,
      "y": 4446,
      "w": 990,
      "target": "qtest",
      "expr": "1e-9"
    },
    {
      "id": "ch05-math-025",
      "type": "math",
      "x": 65,
      "y": 4611,
      "w": 990,
      "target": "vtest",
      "expr": "[2e6,0,0]"
    },
    {
      "id": "ch05-math-026",
      "type": "math",
      "x": 65,
      "y": 4776,
      "w": 990,
      "target": "Etestvec",
      "expr": "[0,500,0]"
    },
    {
      "id": "ch05-math-027",
      "type": "math",
      "x": 65,
      "y": 4941,
      "w": 990,
      "target": "Btestvec",
      "expr": "[0,0,0.02]"
    },
    {
      "id": "ch05-math-028",
      "type": "math",
      "x": 65,
      "y": 5106,
      "w": 990,
      "target": "F_lorentz",
      "expr": "qtest*(Etestvec+cross(vtest,Btestvec))"
    },
    {
      "id": "ch05-table-029",
      "type": "table",
      "x": 65,
      "y": 5271,
      "w": 990,
      "h": 280,
      "title": "Lorentz-force components",
      "headersText": "Value",
      "rowLabels": "Fx (N)\nFy (N)\nFz (N)",
      "expr": "cols([at(F_lorentz,0),at(F_lorentz,1),at(F_lorentz,2)])",
      "precision": "12"
    },
    {
      "id": "ch05-head-030",
      "type": "text",
      "x": 65,
      "y": 5641,
      "w": 990,
      "content": "5. Energy density and Poynting vector",
      "heading": true
    },
    {
      "id": "ch05-math-031",
      "type": "math",
      "x": 65,
      "y": 5746,
      "w": 475,
      "target": "E0",
      "expr": "100"
    },
    {
      "id": "ch05-math-032",
      "type": "math",
      "x": 560,
      "y": 5746,
      "w": 475,
      "target": "H0",
      "expr": "0.265"
    },
    {
      "id": "ch05-math-033",
      "type": "math",
      "x": 65,
      "y": 5911,
      "w": 990,
      "target": "we",
      "expr": "0.5*eps0*E0^2"
    },
    {
      "id": "ch05-math-034",
      "type": "math",
      "x": 65,
      "y": 6076,
      "w": 990,
      "target": "wm",
      "expr": "0.5*mu0*H0^2"
    },
    {
      "id": "ch05-math-035",
      "type": "math",
      "x": 65,
      "y": 6241,
      "w": 990,
      "target": "S0",
      "expr": "E0*H0"
    },
    {
      "id": "ch05-table-036",
      "type": "table",
      "x": 65,
      "y": 6406,
      "w": 990,
      "h": 280,
      "title": "Field energy and power",
      "headersText": "Value",
      "rowLabels": "Electric energy density 0.5εE² (J/m³)\nMagnetic energy density 0.5μH² (J/m³)\nInstantaneous |E×H| (W/m²)",
      "expr": "cols([we,wm,S0])",
      "precision": "12"
    },
    {
      "id": "ch05-plot-037",
      "type": "plot",
      "kind": "quiver3d",
      "title": "Uniform plane-wave power direction: S = E × H",
      "xexpr": "[-1,0,1]",
      "yexpr": "[-1,0,1]",
      "zexpr": "[-1,0,1]",
      "x": 65,
      "y": 6776,
      "w": 990,
      "h": 500,
      "xlabel": "x",
      "ylabel": "y",
      "y2label": "",
      "zlabel": "z",
      "vlines": "",
      "bins": 20,
      "palette": "blue",
      "xlog": false,
      "ylog": false,
      "y2log": false,
      "uexpr": "0",
      "vexpr": "0",
      "wexpr": "S0",
      "vectorStyle": "arrows",
      "vectorAutoScale": true,
      "vectorScale": 0.8,
      "vectorNormalize": true,
      "vectorHeadSize": 0.58,
      "vectorWidth": 2.0,
      "vectorOpacity": 0.9,
      "vectorDensity": 1,
      "vectorAnchor": "tail",
      "vectorColorMode": "single",
      "vectorColor": "#2175b5",
      "vectorPalette": "Viridis",
      "showColorbar": false,
      "animate": false,
      "animVar": "t",
      "animStart": "0",
      "animStop": "2*pi",
      "animFrames": 32,
      "animFps": 14,
      "animLoop": true
    },
    {
      "id": "ch05-head-038",
      "type": "text",
      "x": 65,
      "y": 7381,
      "w": 990,
      "content": "Checkpoint / exploration",
      "heading": true
    },
    {
      "id": "ch05-note-039",
      "type": "text",
      "x": 65,
      "y": 7486,
      "w": 990,
      "content": "Use the worksheet to keep E/D and B/H distinct: material relations connect them, but they are not interchangeable physical quantities.",
      "heading": false
    }
  ]
}
