Skip to main content

Crate ems

Crate ems 

Source
Expand description

§ems

Pure Rust FDTD (finite-difference time-domain) electromagnetic field solver, compatible with openEMS models.

Geometry, materials and the rectilinear grid are described with the csx crate (re-exported here); ems turns such a model into an FDTD engine and runs it. See docs/DESIGN.md in the repository for the architecture and roadmap.

Re-exports§

pub use axis::Axis;
pub use compile::CompileOptions;
pub use compile::Compiled;
pub use engine::CellMaterials;
pub use engine::EdgeMaterials;
pub use engine::Engine;
pub use engine::Grid;
pub use error::Error;
pub use error::Result;
pub use fdtd::Boundaries;
pub use fdtd::Boundary;
pub use fdtd::Cpml;
pub use fdtd::EndCriteria;
pub use fdtd::Face;
pub use fdtd::Fdtd;
pub use fdtd::Mur;
pub use post::Complex64;
pub use waveform::ExpressionWaveform;
pub use waveform::Waveform;
pub use csx;

Modules§

axis
Cartesian coordinate axes.
compile
Compile step: csx::ContinuousStructure + Fdtd settings → engine inputs (design §6, §10 step 5).
constants
Physical constants (SI units).
engine
FDTD engine core: mesh, fields, coefficients, kernels, thread pool and operator hooks.
error
Error type.
fdtd
Solver settings: the equivalent of the openEMS <FDTD> section.
io
Output file writers.
mesh
Solver-aware mesh checks and suggestions (design §4, §5.6, §7).
port
Port helpers that emit csx properties into a model (design §2): the ports round-trip through openEMS XML and run unchanged from XML.
post
Post-processing: complex arithmetic, discrete Fourier transforms and port analysis (power waves, S-parameters).
prelude
The main user-facing types, for glob import: use ems::prelude::*;.
waveform
Excitation waveforms.

Structs§

DumpResult
One dump result, named after its csx property.
ProbeResult
The recorded time series of one csx ProbeBox, restricted to its StartTime/StopTime window (a stop time ≤ 0 means “no limit”) and multiplied by its weight.
Results
Results of a Simulation: every model probe and dump, looked up by csx property name or id, plus the run outcome.
Simulation
A compiled simulation: the Engine with the model’s excitations, lumped elements, probes and dumps installed, plus the metadata needed to relate engine results back to the model.

Enums§

DumpData
The recorded data of one csx DumpBox.
ProbeKind
What a model probe measures (csx ProbeBox type).
ProbeValues
Recorded values of a probe.