算法艺术创作
algorithmic-art
通过代码和可调参数创作生成艺术与交互式视觉效果。
analyze-magnetic-field【设计与创意】Calculate and visualize magnetic fields produced by current distributions using the Biot-Savart law, Ampere's law, and magnetic dipole approximations. Use when computing B-fields from arbitrary current geometries, exploiting symmetry with Ampere's law, analyzing superposition of multiple sources, or characterizing magnetic materials through permeabil…
独立 GitHub 快照 · 自动分类 · 以原作者文档为准
由電分算磁場:定源、選律(Biot-Savart 任幾、Ampere 對稱)、積分、驗極限、含材效、繪場線。
擇法前全規源:
## Source Characterization
- **Current type**: [line I / surface K / volume J]
- **Geometry**: [parametric description]
- **Coordinate system**: [and justification]
- **Symmetries**: [translational / rotational / reflection]
- **Nonzero B-components by symmetry**: [list]
- **Current continuity**: [verified / issue noted]
得:完整幾述,座定、對稱錄、流續驗。
敗:幾太繁不能閉式參→離為短直段(數 Biot-Savart)。流不續→加位移流或返荷積項再進。
合題對稱與繁:
Ampere 律(高對稱):源之對稱足以由線積出 B。適:
Biot-Savart 律(通用):Ampere 不能簡時用:
磁偶近(遠場):觀於遠(r >> 源 d):
疊:多源各算 B 而向加。Maxwell 線性保此精。
## Method Selection
- **Primary method**: [Ampere / Biot-Savart / dipole]
- **Justification**: [symmetry argument or distance criterion]
- **Expected complexity**: [closed-form / single integral / numerical]
- **Fallback method**: [if primary fails or for cross-validation]
得:擇法附明由:所擇律何以合對稱階。
敗:選 Ampere 而對稱不足(B 不可由積出)→退至 Biot-Savart。源太繁不能析 Biot-Savart→數離。
按二步法行算:
Ampere 律路:各 Amperian 環:
Biot-Savart 積:各場點 r:
偶算:
疊裝:各觀點和諸源貢。各分獨追以保消精。
## Field Calculation
- **Integral setup**: [explicit expression]
- **Evaluation method**: [analytic / numeric with N segments]
- **Result**: B(r) = [expression with units]
- **Convergence check** (if numerical): [N vs. 2N comparison]
得:B(r) 於觀點之明式,附正單位(Tesla 或 Gauss)與數結之收驗。
敗:積發散→察缺正規(如線本場無窮細線發散——用有限線徑)。數果隨 N 振→積近奇,需適配積或析減奇部。
信前比知物理:
遠場偶極限:大 r,任局電分應出配磁偶式之場。算 r → 無窮極限與 (mu_0 / 4 pi) * [3(m . r_hat) r_hat - m] / r^3 比。
近場無窮線極限:近長直導段(距 rho << 長 L),場應近 B = mu_0 I / (2 pi rho)。察相關幾段。
軸特例:環、螺軸場有簡閉式:
對稱一致:驗一步預測消之分(步一)果中真零。非零禁分示誤。
量綱析:驗 B 為 Tesla。各項應載 mu_0 * [流] / [長] 或等。
## Limiting Case Verification
| Case | Condition | Expected | Computed | Match |
|------|-----------|----------|----------|-------|
| Far-field dipole | r >> d | mu_0 m / (4 pi r^3) scaling | [result] | [Yes/No] |
| Near-field wire | rho << L | mu_0 I / (2 pi rho) | [result] | [Yes/No] |
| On-axis formula | [geometry] | [known result] | [result] | [Yes/No] |
| Symmetry zeros | [component] | 0 | [result] | [Yes/No] |
| Units | -- | Tesla | [check] | [Yes/No] |
得:諸極限皆配。場有正單位、對稱、漸態。
敗:極限敗示積設或評誤。常因:叉積錯號、缺 2 或 pi 因、積限誤、源與場參座系不配。
擴含材效而出視:
線磁材:材內以 mu = mu_r * mu_0 代 mu_0。材界施條:
非線材(B-H 曲):鐵磁核:
退磁效:有限幾磁材(短桿、球)內場以退磁因 N_d 減:H_internal = H_applied - N_d * M。
場視:
物覺察:確場圖質合理。場應強於源近、繞流(右手律)、隨距減。
## Material Effects and Visualization
- **Material model**: [vacuum / linear mu_r / nonlinear B-H / hysteretic]
- **Boundary conditions applied**: [list interfaces]
- **Visualization**: [field lines / magnitude contour / both]
- **Div B = 0 check**: [field lines close / verified numerically]
得:含相關材效之全場解,附視示閉場線合 div B = 0 與物覺一致行。
敗:場線不閉→算有散誤,重察積或數法。材致意外場放→驗 mu_r 唯施材體內且界條於各界正行。
solve-electromagnetic-induction —— 用算 B 場析時變通與感 EMFformulate-maxwell-equations —— 推全 Maxwell 方含位移流與波傳design-electromagnetic-device —— 施磁場析於電磁、馬達、變壓設formulate-quantum-problem —— 磁交之量處(Zeeman 效、自旋軌耦)