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).
nf2ff
Near-field to far-field (NF2FF) transform: radiation patterns, directivity, gain and radiated power (design §5.10).
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, port analysis (power waves, S-parameters) and SAR (sar).
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.
IncidentWave
The incident wave of a plane-wave excitation in a Bloch run: the complex incident E on its entry plane at the phase reference (the first mesh line of every axis), per step at the E times (n + 1)·dt (see PeriodicPlaneWave::incident). It is the reference for reflection and transmission: a field F(r) measured elsewhere relates to it through the Bloch phase e^{−j k_t·(r − r_0)} and the propagation along the normal.
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.
SarResult
One SAR dump result (csx DumpBox of type SARLocal, SAR1g, SAR10g or SARRaw), named after its csx property: the absorbed power and mass density per cell at each of its frequencies (see post::sar).
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.