formulate-maxwell-equations
정보
이 Claude 스킬은 맥스웰 방정식을 적분형과 미분형 모두로 다루기 위한 도구를 제공합니다. 전자기장 분석, 파동 전파, 에너지 전달을 가능하게 하며, 포인팅 벡터와 경계 조건 계산을 포함합니다. 개발자는 파동 방정식 유도나 통합 프레임워크 내 정전기학과 정자기학의 연결과 같은 고급 전자기학 문제 해결에 사용해야 합니다.
빠른 설치
Claude Code
추천npx skills add pjt222/agent-almanac -a claude-code/plugin add https://github.com/pjt222/agent-almanacgit clone https://github.com/pjt222/agent-almanac.git ~/.claude/skills/formulate-maxwell-equationsClaude Code에서 이 명령을 복사하여 붙여넣어 스킬을 설치하세요
문서
Formulate Maxwell Equations
Analyze electromagnetic phenomena: state the relevant Maxwell equations in appropriate form (integral or differential), apply boundary conditions and symmetry to reduce the system, solve the resulting PDEs for the fields, compute derived quantities (Poynting vector, radiation pressure, wave impedance), and verify the solution against known static and wave limits.
When to Use
- Solving a boundary value problem for E and B fields in a region with sources and material interfaces
- Deriving the electromagnetic wave equation from first principles
- Computing energy flow (Poynting vector) and momentum density of electromagnetic fields
- Applying boundary conditions at interfaces between different media (dielectrics, conductors, magnetic materials)
- Analyzing displacement current and its role in completing the Ampere-Maxwell equation
- Connecting the static limits (Coulomb's law, Biot-Savart) to the unified time-dependent framework
Inputs
- Required: Physical configuration (geometry, source charges and currents, material properties)
- Required: Quantity to solve for (E-field, B-field, wave solution, energy flux, or boundary field values)
- Optional: Symmetry information (planar, cylindrical, spherical, or no special symmetry)
- Optional: Time dependence specification (static, harmonic at frequency omega, or general time-dependent)
- Optional: Boundary conditions at material interfaces or conductor surfaces
Procedure
Step 1: State the Four Maxwell Equations and Identify Relevant Subset
Write the complete set and select which equations constrain the problem:
-
Gauss's law for E: div(E) = rho / epsilon_0 (differential) or closed_surface_integral(E . dA) = Q_enc / epsilon_0 (integral). Relates E-field divergence to charge density. Use for finding E from charge distributions with symmetry.
-
Gauss's law for B: div(B) = 0 (differential) or closed_surface_integral(B . dA) = 0 (integral). No magnetic monopoles. Every magnetic field line is a closed loop. Use as a consistency check on computed B-fields.
-
Faraday's law: curl(E) = -dB/dt (differential) or contour_integral(E . dl) = -d(Phi_B)/dt (integral). A changing B-field generates a curling E-field. Use for induction problems and wave derivation.
-
Ampere-Maxwell law: curl(B) = mu_0 J + mu_0 epsilon_0 dE/dt (differential) or contour_integral(B . dl) = mu_0 I_enc + mu_0 epsilon_0 d(Phi_E)/dt (integral). Current and changing E-field generate curling B-field. The displacement current term mu_0 epsilon_0 dE/dt is essential for wave propagation and current continuity.
-
Form selection: Choose differential form for local field calculations, wave equations, and PDEs. Choose integral form for high-symmetry problems where the field can be extracted from the integral directly.
-
Identify active equations: Not all four equations are independent constraints in every problem. For electrostatics (dB/dt = 0, J = 0), only Gauss's law for E and curl(E) = 0 matter. For magnetostatics, Gauss's law for B and Ampere's law (without displacement current) suffice.
## Maxwell Equations for This Problem
- **Form**: [differential / integral / both]
- **Active equations**: [list which of the four are non-trivial constraints]
- **Source terms**: rho = [charge density], J = [current density]
- **Time dependence**: [static / harmonic / general]
- **Displacement current**: [negligible / essential -- with justification]
Got: Four equations stated, relevant subset identified with justification, displacement current either included or argued negligible.
If fail: If unclear whether the displacement current matters, estimate the ratio |epsilon_0 dE/dt| / |J|. If comparable to or greater than 1, retain the displacement current. In vacuum with no free charges, the displacement current is always essential for wave propagation.
Step 2: Apply Boundary Conditions and Symmetry
Reduce the system using material interfaces and geometric symmetry:
-
Boundary conditions at material interfaces: At the interface between media 1 and 2 with surface charge sigma_f and surface current K_f:
- Normal E: epsilon_1 E_1n - epsilon_2 E_2n = sigma_f
- Tangential E: E_1t = E_2t (continuous)
- Normal B: B_1n = B_2n (continuous)
- Tangential H: n_hat x (H_1 - H_2) = K_f (where n_hat points from 2 to 1)
-
Conductor boundary conditions: At the surface of a perfect conductor:
- E_tangential = 0 (inside the conductor E = 0)
- B_normal = 0 (inside the conductor B = 0 for time-varying fields)
- Surface charge: sigma = epsilon_0 E_normal
- Surface current: K = (1/mu_0) n_hat x B
-
Symmetry reduction: Use identified symmetries to reduce the number of independent variables:
- Planar symmetry: fields depend on one coordinate only (e.g., z), reducing PDEs to ODEs
- Cylindrical symmetry: fields depend on (rho, z) or rho only
- Spherical symmetry: fields depend on r only
- Translational invariance: Fourier transform in the invariant direction
-
Gauge choice (if using potentials): Select a gauge for the scalar potential phi and vector potential A:
- Coulomb gauge: div(A) = 0 (separates electrostatic and radiation contributions)
- Lorenz gauge: div(A) + mu_0 epsilon_0 d(phi)/dt = 0 (manifestly Lorentz-covariant, decouples wave equations)
## Boundary Conditions and Symmetry
- **Interfaces**: [list with media properties on each side]
- **Boundary conditions applied**: [normal E, tangential E, normal B, tangential H]
- **Symmetry**: [planar / cylindrical / spherical / none]
- **Reduced coordinates**: [independent variables after symmetry reduction]
- **Gauge** (if using potentials): [Coulomb / Lorenz / other]
Got: All boundary conditions stated at every interface, symmetry exploited to reduce dimensionality, problem ready for PDE solution.
If fail: If boundary conditions are over-determined (more equations than unknowns at an interface), check that the number of field components matches the number of conditions. If under-determined, a boundary condition was missed — often the tangential H condition or the radiation condition at infinity.
Step 3: Solve Resulting PDEs
Solve the Maxwell equations or their derived forms for the field quantities:
-
Wave equation derivation: In a source-free, linear, homogeneous medium:
- Take the curl of Faraday's law: curl(curl(E)) = -d/dt(curl(B))
- Substitute Ampere-Maxwell: curl(curl(E)) = -mu epsilon d^2E/dt^2
- Use the vector identity: curl(curl(E)) = grad(div(E)) - nabla^2(E)
- With div(E) = 0 (no free charges): nabla^2(E) = mu epsilon d^2E/dt^2
- Wave speed: v = 1/sqrt(mu epsilon); in vacuum c = 1/sqrt(mu_0 epsilon_0)
- Identical equation holds for B
-
Plane wave solutions: For a wave propagating in the z-direction:
- E(z, t) = E_0 exp[i(kz - omega t)] with k = omega/v = omega * sqrt(mu epsilon)
- B = (1/v) k_hat x E (perpendicular to E and propagation direction)
- |B| = |E|/v
- Polarization: linear, circular, or elliptical depending on E_0 components
-
Laplace and Poisson equations (static case):
- With no time dependence: nabla^2(phi) = -rho/epsilon_0 (Poisson) or nabla^2(phi) = 0 (Laplace)
- Solve by separation of variables in the appropriate coordinate system
- Match boundary conditions to determine expansion coefficients
-
Guided waves and cavities: For waveguides and resonant cavities:
- Decompose into TE (transverse electric) and TM (transverse magnetic) modes
- Apply conducting-wall boundary conditions
- Solve the eigenvalue problem for allowed propagation constants or resonant frequencies
- Cutoff frequency: omega_c = v * pi * sqrt((m/a)^2 + (n/b)^2) for a rectangular guide with dimensions a x b
-
Skin depth in conductors: For time-varying fields penetrating a conductor with conductivity sigma_c:
- delta = sqrt(2 / (omega mu sigma_c))
- Fields decay as exp(-z/delta) into the conductor
- At 60 Hz in copper: delta approximately 8.5 mm; at 1 GHz: delta approximately 2 micrometers
## Field Solution
- **Equation solved**: [wave equation / Laplace / Poisson / eigenvalue]
- **Solution method**: [separation of variables / Fourier transform / Green's function / numerical]
- **Result**: E(r, t) = [expression], B(r, t) = [expression]
- **Dispersion relation**: omega(k) = [if wave solution]
- **Characteristic scales**: [wavelength, skin depth, decay length]
Got: Explicit field expressions satisfying Maxwell's equations and all boundary conditions, with dispersion relation or eigenvalue spectrum if applicable.
If fail: If the PDE cannot be separated in the chosen coordinate system, try a different system or resort to numerical methods (finite difference, finite element). If the solution does not satisfy one of the Maxwell equations on back-substitution, there is an algebraic error — re-check the curl and divergence operations.
Step 4: Compute Derived Quantities
Extract physically meaningful quantities from the field solution:
-
Poynting vector: S = (1/mu_0) E x B (instantaneous energy flux, W/m^2):
- For plane waves: S = (1/mu_0) |E|^2 / v in the propagation direction
- Time-averaged Poynting vector: <S> = (1/2) Re(E x H*) for harmonic fields
- Intensity: I = |<S>| (power per unit area)
-
Electromagnetic energy density:
- u = (1/2)(epsilon_0 |E|^2 + |B|^2/mu_0) in vacuum
- u = (1/2)(E . D + B . H) in linear media
- Energy conservation: du/dt + div(S) = -J . E (Poynting's theorem)
-
Radiation pressure: For a plane wave incident on a surface:
- Perfect absorber: P_rad = I/c = <S>/c
- Perfect reflector: P_rad = 2I/c = 2<S>/c
- This is the momentum flux density of the electromagnetic field
-
Wave impedance:
- In a medium: eta = sqrt(mu/epsilon) = mu * v
- In vacuum: eta_0 = sqrt(mu_0/epsilon_0) approximately 377 Ohms
- Relates E and H amplitudes: |E| = eta |H|
- Reflection coefficient at normal incidence: r = (eta_2 - eta_1)/(eta_2 + eta_1)
-
Power dissipation and quality factor:
- Ohmic loss per unit volume: p_loss = sigma |E|^2 / 2 (in a conductor)
- Quality factor of a cavity: Q = omega * (stored energy) / (power dissipated per cycle)
- Relates to the bandwidth of resonances: Delta_omega = omega / Q
## Derived Quantities
- **Poynting vector**: S = [expression], <S> = [time-averaged]
- **Energy density**: u = [expression]
- **Radiation pressure**: P_rad = [value]
- **Wave impedance**: eta = [value]
- **Reflection/transmission**: r = [value], t = [value]
- **Q-factor** (if resonant): Q = [value]
Got: All derived quantities computed with correct units, energy conservation verified via Poynting's theorem, physically reasonable magnitudes.
If fail: If Poynting's theorem does not balance (du/dt + div(S) does not equal -J . E), there is an inconsistency between the E and B solutions. Re-verify that both fields satisfy all four Maxwell equations. A common error is computing E and B from different approximations that are not mutually consistent.
Step 5: Verify Against Known Limits
Check that the full solution reduces correctly in limiting cases:
-
Static limit (omega -> 0): The solution should reduce to the electrostatic or magnetostatic result:
- E-field should satisfy Coulomb's law or the Laplace/Poisson equation
- B-field should satisfy the Biot-Savart law or Ampere's law (without displacement current)
- Displacement current vanishes: mu_0 epsilon_0 dE/dt -> 0
-
Plane wave limit: In a source-free, unbounded medium, the solution should reduce to plane waves with v = 1/sqrt(mu epsilon) and the correct polarization.
-
Perfect conductor limit (sigma -> infinity):
- Skin depth delta -> 0 (fields do not penetrate)
- Tangential E -> 0 at the surface
- Reflection coefficient r -> -1 (perfect reflection with phase inversion)
-
Vacuum limit (epsilon_r = 1, mu_r = 1): Material-dependent quantities should reduce to their vacuum values. Wave speed should equal c. Impedance should equal eta_0 approximately 377 Ohms.
-
Energy conservation check: Integrate Poynting's theorem over a closed volume. The rate of change of total field energy plus the power flowing out through the surface must equal the negative of the power delivered by currents inside the volume. Any imbalance indicates an error.
## Limiting Case Verification
| Limit | Condition | Expected | Obtained | Match |
|-------|-----------|----------|----------|-------|
| Static | omega -> 0 | Coulomb / Biot-Savart | [result] | [Yes/No] |
| Plane wave | unbounded medium | v = c/n, eta = eta_0/n | [result] | [Yes/No] |
| Perfect conductor | sigma -> inf | delta -> 0, r -> -1 | [result] | [Yes/No] |
| Vacuum | epsilon_r = mu_r = 1 | c, eta_0 | [result] | [Yes/No] |
| Energy conservation | Poynting's theorem | balanced | [check] | [Yes/No] |
Got: All limits produce the correct known results. Energy conservation is satisfied to within numerical precision.
If fail: A failed limit is a definitive indicator of an error. The static limit failing suggests a problem in the source terms or boundary conditions. The plane wave limit failing suggests an error in the wave equation derivation. Energy conservation failing suggests inconsistency between E and B solutions. Trace the failure back to the specific step and correct before accepting the solution.
Validation
- All four Maxwell equations are stated and the relevant subset is identified
- Displacement current is included or explicitly justified as negligible
- Boundary conditions are applied at every material interface
- Symmetry is exploited to reduce the PDE dimensionality
- The wave equation (or Laplace/Poisson equation) is correctly derived
- Field solutions satisfy all four Maxwell equations on back-substitution
- Poynting vector and energy density are computed with correct units (W/m^2 and J/m^3)
- Poynting's theorem (energy conservation) is verified
- Wave impedance and reflection/transmission coefficients are physically reasonable
- Static limit reproduces Coulomb's law and Biot-Savart law
- Plane wave limit yields v = 1/sqrt(mu epsilon) and orthogonal E, B, k
- The solution is complete enough for another researcher to reproduce
Pitfalls
- Omitting the displacement current: In the original Ampere's law (curl B = mu_0 J), taking the divergence gives div(J) = 0, which contradicts charge conservation when rho changes in time. The displacement current term mu_0 epsilon_0 dE/dt fixes this and is essential for wave propagation. Never drop it without verifying that dE/dt is negligible compared to J/epsilon_0.
- Inconsistent E and B solutions: Solving for E and B independently (e.g., E from Gauss's law and B from Ampere's law) without verifying Faraday's law and Gauss's law for B can produce fields that are not mutually consistent. Verify all four equations.
- Wrong boundary condition normal direction: The convention n_hat x (H_1 - H_2) = K_f requires n_hat to point from medium 2 into medium 1. Reversing the direction flips the sign of the surface current condition.
- Confusing D, E, B, and H in materials: In vacuum, D = epsilon_0 E and B = mu_0 H. In linear media, D = epsilon E and B = mu H. Maxwell's equations in matter use D and H for the free source terms and E and B for the force law. Mixing constitutive relations leads to factors of epsilon_r or mu_r errors.
- Phase velocity versus group velocity: The wave speed v = omega/k is the phase velocity. Energy and information propagate at the group velocity v_g = d(omega)/dk. In dispersive media these differ, and using phase velocity for energy transport gives wrong results.
- Forgetting the radiation condition: For scattering and radiation problems in unbounded domains, the solution must satisfy the Sommerfeld radiation condition (outgoing waves at infinity). Without this condition, the solution is not unique and may include unphysical incoming waves.
Related Skills
analyze-magnetic-field-- compute static B-fields that serve as the magnetostatic limit of Maxwell's equationssolve-electromagnetic-induction-- apply Faraday's law to specific induction geometries and RL circuitsformulate-quantum-problem-- quantize the electromagnetic field for quantum optics and QEDderive-theoretical-result-- carry out rigorous derivations of wave equations, Green's functions, and dispersion relationsanalyze-diffusion-dynamics-- diffusion equations arise from Maxwell's equations in conducting media (skin effect)
GitHub 저장소
연관 스킬
llamaguard
기타LlamaGuard는 폭력 및 혐오 발언 등 6가지 안전 범주에서 LLM 입력과 출력을 조정하기 위한 Meta의 70-80억 파라미터 모델입니다. 94-95% 정확도를 제공하며 vLLM, Hugging Face 또는 Amazon SageMaker를 사용해 배포할 수 있습니다. 이 기술을 사용하여 AI 애플리케이션에 콘텐츠 필터링 및 안전 가드레일을 손쉽게 통합하세요.
cost-optimization
기타이 Claude Skill은 리소스 적정화, 태깅 전략, 지출 분석을 통해 개발자들이 클라우드 비용을 최적화할 수 있도록 지원합니다. AWS, Azure, GCP에서 클라우드 비용을 절감하고 비용 거버넌스를 구현하기 위한 프레임워크를 제공합니다. 인프라 비용을 분석하거나, 리소스를 적정화하거나, 예산 제약을 충족해야 할 때 사용하세요.
quantizing-models-bitsandbytes
기타이 스킬은 bitsandbytes를 사용하여 LLM을 8비트 또는 4비트 정밀도로 양자화하며, 최소한의 정확도 손실로 50-75%의 메모리 감소를 달성합니다. 제한된 GPU 메모리에서 더 큰 모델을 실행하거나 추론을 가속화하는 데 이상적이며, INT8, NF4, FP4와 같은 형식을 지원합니다. 이 스킬은 HuggingFace Transformers와 통합되어 QLoRA 학습 및 8비트 옵티마이저를 가능하게 합니다.
dispatching-parallel-agents
기타이 Claude Skill은 3개 이상의 독립적인 문제를 동시에 조사하고 해결하기 위해 다중 에이전트를 배치합니다. 공유 상태나 의존성 없이 해결 가능한 무관련 장애 시나리오에 맞게 설계되었습니다. 핵심 기능은 병렬 문제 해결로, 각 독립 문제 영역마다 하나의 에이전트를 할당하여 효율성을 극대화합니다.
