EMDyna Sandbox Manual & Theory
Overview Manual & Theory Validation Suite Python API Gallery Open Simulator

User Manual & Electrodynamic Formulation Guide

Comprehensive interactive guide detailing 3D viewport manipulation, schematic wiring workflows, the mathematical Partial Element Equivalent Circuit (PEEC) engine, electromagnetic field evaluations, non-linear magnetic cores, and engineering domain boundaries.

2. Component Manipulation & Handles

Every element in the 3D scene (sources, resistors, inductors, plates, coils, and magnets) features interactive on-screen handles for immediate translation, rotation, and deformation.

Rotation Cone Handle Snap Terminal Ring (Pin) Bending Vertex Handle Shift + Drag Lock Constrains translation to a single X, Y, or Z axis
Figure 2.1: Visual anatomy of component manipulation handles and interactive terminals.
  • Planar Translation: Dragging a component moves it parallel to the predominant viewport plane (horizontal $XZ$ ground plane when viewed from above).
  • Axis-Constrained Translation: Hold Shift while dragging to lock movement strictly along the closest primary world axis ($X$, $Y$, or $Z$).
  • Rotation (Cyan Cones): Drag the cyan cone protruding from an active element to rotate its yaw and pitch in 3D space. Holding Shift snaps rotation in neat $15^\circ$ increments.
  • Wire Vertex Bending (White Spheres): Segments can be freely curved and routed by dragging the intermediate vertex nodes along the wire path.
  • Measurement Probe Snapping: Releasing a voltage or magnetic probe near a wire automatically snaps to its centerline. Hold Alt to release snapping and place probes anywhere in free space.
  • Simulation Play/Pause: Press Space to instantly pause or resume solver calculation steps.

3. Interactive Wiring & Circuit Routing

Constructing circuits in 3D is achieved through fluid wire drawing mode or direct terminal snapping.

Start Terminal (A) Click: Add Vertex I = 2.41 A V = 12.0 V Snap Target (B) W Key Toggle Wiring Esc Key Cancel Routing
Figure 3.1: Wire routing workflow with waypoint creation and real-time current/voltage hover tooltips.
  1. Enter Wiring Mode: Press W on your keyboard, or right-click any terminal / wire node and select "Route Wire from Here".
  2. Extrude Wire Segments: Click on an active green terminal ring. Move your cursor to route the wire in 3D space. Click anywhere in free space to place intermediate 3D corner waypoints.
  3. Connect & Terminate: Click another component's terminal ring to finalize the connection. Alternatively, right-click to end the wire at the current location.
  4. Real-time Telemetry Inspection: Hovering the mouse cursor over any conductor displays a live tooltip showing instantaneous current $I(t)$ and electrical potential $\varphi(t)$.

4. PCB Stackup & Plate Editor

Printed Circuit Boards (PCB) and planar metal shielding plates can be customized with multi-layer signal/ground geometries, dielectric substrates, and vertical conductive vias.

Top Signal Copper Layer (t = 35 µm) FR-4 Dielectric Core (εr = 4.4, h = 1.6 mm) Solid GND Plane (Return Path) Plated Via High-Frequency Return Path Current flows directly under trace minimizing loop inductance L
Figure 4.1: Cross-sectional dielectric stackup and image current return loop in ground plane.
  • Open 2D Board Editor: Double-click any PCB or metal plate in the 3D scene to open the integrated 2D layout editor.
  • Stackup Properties: Adjust substrate thickness $h$, relative permittivity $\varepsilon_r$, and copper weight for accurate parasitic capacitance and characteristic impedance $Z_0$.
  • Via Stitching: Insert vertical vias between layers to evaluate ground bounce, via inductance, and high-frequency return current loops.

5. CAD Mesh & Geometry Slicing

Complex custom 3D geometries can be imported directly using standard CAD file formats (STEP, STL). The simulator automatically converts continuous 3D boundaries into electromagnetically coupled PEEC cells.

1. Smooth CAD Solid (STEP/STL) 2. Multi-slice 2.5D Discretization PEEC Panels & Reluctance Volume Grid
Figure 5.1: Geometry slicing pipeline converting CAD solids into planar conductor panels and reluctance voxels.
  • Import Formats: Supports industry-standard STEP (.step, .stp) boundary representations and STL (.stl) triangular surface meshes.
  • Fast In-Browser Slicing: Using OpenCASCADE compiled to WebAssembly (via `occt-import-js`), geometry is sliced into 2.5D planar layers to guarantee interactive 60 FPS solving inside browser threads.

6. Solver Formulation (3D PEEC Method)

Rather than relying on user-guessed lump-sum circuit values ($L$ and $C$), the simulator solves Maxwell's electrodynamic equations via the 3D Quasi-Static Partial Element Equivalent Circuit (PEEC) formulation. Geometry directly yields full electromagnetic coupling.

Fundamental Field Equations: The total electric field $\boldsymbol{E}$ inside conductors is decomposed into scalar potential $\varphi$ and magnetic vector potential $\boldsymbol{A}$: $$\boldsymbol{E} = -\nabla \varphi - \frac{\partial \boldsymbol{A}}{\partial t}$$ Enforcing Ohm's constitutive law $\boldsymbol{J} = \sigma \boldsymbol{E}$ and local charge conservation $\nabla \cdot \boldsymbol{J} + \frac{\partial \rho}{\partial t} = 0$ over discretized geometry yields the matrix differential-algebraic equation (DAE) system.

Discretizing the circuit branches into inductive filament segments with currents $\boldsymbol{i}$ and capacitive surface patches with stored charges $\boldsymbol{q}$ produces:

$$L \frac{d\boldsymbol{i}}{dt} + R \boldsymbol{i} + D^T P \boldsymbol{q} = \boldsymbol{v}(t), \qquad \frac{d\boldsymbol{q}}{dt} = D \boldsymbol{i}$$
Partial Inductance Matrix ($L$) Calculates self and mutual inductances between all wire segments using exact analytical Neumann line integrals: $$L_{ij} = \frac{\mu_0}{4\pi} \oint_{C_i} \oint_{C_j} \frac{d\boldsymbol{l}_i \cdot d\boldsymbol{l}_j}{|\boldsymbol{r}_i - \boldsymbol{r}_j|}$$
Potential Coefficients ($P$) Calculates Coulomb electrostatic interactions between capacitive boundary panels via Galerkin surface integrals: $$P_{ab} = \frac{1}{4\pi\varepsilon_0 S_a S_b} \iint_{S_a} \iint_{S_b} \frac{dS_a \, dS_b}{|\boldsymbol{r}_a - \boldsymbol{r}_b|}$$
Incidence Matrix ($D$) Encodes topological Kirchhoff Current Law (KCL) connections relating branch segment currents to node charge accumulation.
Time Integration ($\theta$-Method) Steps through time using a weighted implicit scheme with $\theta = 0.55$. This guarantees A-stable damping of unphysical high-frequency numerical ringing while preserving energy conservation.

7. Electromagnetic Fields & Poynting Vector Flow

At any observation point $\boldsymbol{r}$ in the 3D space, vector field distributions are evaluated continuously from instantaneous charge $\rho$ and current $\boldsymbol{J}$.

Current I (Segment) Magnetic Field B Point r E (Electric Field) B (Magnetic Field) S = (E × B) / µ₀
Figure 7.1: Orthogonal relationship of electric field $\boldsymbol{E}$, magnetic field $\boldsymbol{B}$, and Poynting energy flow vector $\boldsymbol{S}$.
  • Magnetic Flux Density $\boldsymbol{B}(\boldsymbol{r})$: Summed over all linear segments via closed-form Biot-Savart line integrals: $$\boldsymbol{B}(\boldsymbol{r}) = \frac{\mu_0}{4\pi} \sum_k \int_{C_k} \frac{I_k \, d\boldsymbol{l}' \times (\boldsymbol{r} - \boldsymbol{r}')}{|\boldsymbol{r} - \boldsymbol{r}'|^3}$$
  • Electric Field $\boldsymbol{E}(\boldsymbol{r})$: Evaluated as the superposition of static Coulomb charges and Faraday induction potentials: $$\boldsymbol{E}(\boldsymbol{r}) = -\frac{1}{4\pi\varepsilon_0} \nabla \int \frac{\rho(\boldsymbol{r}')}{|\boldsymbol{r}-\boldsymbol{r}'|} dV' - \frac{\mu_0}{4\pi} \frac{\partial}{\partial t} \int \frac{\boldsymbol{J}(\boldsymbol{r}')}{|\boldsymbol{r}-\boldsymbol{r}'|} dV'$$
  • Poynting Energy Flow Vector $\boldsymbol{S}(\boldsymbol{r})$: Depicts the magnitude and direction of spatial energy transmission in $\text{W/m}^2$: $$\boldsymbol{S} = \frac{1}{\mu_0} \boldsymbol{E} \times \boldsymbol{B}$$

8. Non-linear Reluctance Cores & Demagnetization

Ferromagnetic materials with relative permeability $\mu_r$ (e.g. ferrite cores, iron toroids, and transformers) are solved via a dual Magnetic Reluctance Network combined with Boundary Surface Charge formulation.

Flux Φ (Closed) Reluctance Network (∇·B = 0) H B Saturation Bs Smooth Anhysteric Curve
Figure 8.1: Closed magnetic reluctance grid and smooth non-linear saturation curve $B(H)$.
  • Closed-Path Flux Conservation: Closed magnetic paths (such as toroidal inductors) exhibit zero surface magnetic pole charges. Pure boundary element methods struggle here. The simulator subdivides the core interior into reluctance cells where magnetic flux continuity ($\nabla \cdot \boldsymbol{B} = 0$) is rigorously preserved.
  • Nonlinear Saturation Characteristic: When saturation flux density $B_s$ is specified, the core follows a smooth anhysteric arctangent formulation: $$B(H) = \mu_0 H + \frac{2 B_s}{\pi} \arctan\left(\frac{\pi (\mu_r - 1)\mu_0 H}{2 B_s}\right)$$ Local differential permeability $\mu_{\text{diff}} = \frac{dB}{dH}$ is solved per time step using Newton-Raphson iterations.

9. Charged Particle & Rigid-Body Dynamics

Moving magnets, electrodynamic motors, and free-flying charged particles (e.g. cathode rays) are solved simultaneously with field forces.

Uniform B (out of page) q v F = q(v × B)
Figure 9.1: Charged particle motion governed by the Lorentz force equation.
  • Free Charged Particles: Particles with mass $m$ and charge $q$ accelerate according to the classical Lorentz force: $$\boldsymbol{F} = q \left(\boldsymbol{E} + \boldsymbol{v} \times \boldsymbol{B}\right), \qquad m \frac{d\boldsymbol{v}}{dt} = \boldsymbol{F}$$ Particles striking conductors automatically transfer their charge to the respective circuit node.
  • Rigid Magnet Dynamics: Free-moving permanent magnets solve 6-DOF Newton-Euler equations of motion. Electrodynamic back-EMF creates real damping (eddy braking) in coupled circuits.

10. Physical Assumptions & Scope Limits

Engineering and Academic Disclaimer:
This simulator is an interactive, browser-optimized quasi-static PEEC engine engineered for immediate visual intuition and fast parameter exploration. It operates under specific physical assumptions distinct from full-wave FEM or FDTD solvers.

① Quasi-Static Boundary Condition ($D < \lambda / 10$)

  • No Retardation or Radiative Loss: Retardation delays ($t - r/c$) are neglected in mutual matrix kernels. Consequently, open antennas (e.g. half-wave dipoles or patch radiators) do not exhibit radiation resistance or far-field electromagnetic wave propagation.
  • Valid Frequency Range: Highly accurate when circuit dimension $D$ satisfies the standard quasi-static threshold: $$D < \frac{\lambda}{10} = \frac{c}{10 f}$$

② Conductor Skin Effect Approximation

  • Skin impedance is evaluated via the analytical 1D Helmholtz diffusion equation for an equivalent slab: $$\frac{R_{\text{AC}}}{R_{\text{DC}}} = \operatorname{Re}\left[\frac{\gamma t}{2} \coth\left(\frac{\gamma t}{2}\right)\right], \quad \gamma = \sqrt{j \omega \mu_0 \sigma}$$ Complex 3D proximity current crowding across asymmetric cross-sections is approximated.

③ Anhysteric Core Models & Eddy Currents

  • No Core Eddy Currents: Magnetic cores are assumed to be bulk insulators (like high-resistivity MnZn/NiZn ferrites). Microscopic eddy currents inside laminated silicon steel sheets are not resolved.
  • Reversible Saturation: Magnetic hysteresis loops (coercive field $H_c$ and remanence $B_r$) are not tracked; core magnetization follows a reversible anhysteric path.

④ Planar Staircase Geometry Slicing

  • When importing curved 3D solids (e.g. spheres), shapes are discretized into 2.5D slices. This induces a minor directional staircase anisotropy (typically $\approx 1\text{--}5\%$ dependent on slice thickness). Full details and Richardson extrapolation trends are documented in the Validation Sphere Benchmark.