Please check the build logs for more information.
See Builds for ideas on how to fix a failed build, or Metadata for how to configure docs.rs builds.
If you believe this is docs.rs' fault, open an issue.
stem_material
This crate provides a Material definition for simulation of electromagnetic
devices – especially electric motors – built on topof the var_quantity crate.
It is used to define motor components within stem - a Simulation Toolbox for
Electric Motors. See the stem book
for an introduction to the framework.
Due to the aforementioned tight coupling with var_quantity, this crate reexports it. It also heavily relies on the uom crate for providing static quantities. The resulting interface is therefore hard to misuse, as it doesn't matter whether e.g. the density of a material is given as kg/m³ or as g/cm³ - uom will take care of the conversions automatically.
Modeling soft magnetism
Even though this crate is foundational for stem, some of its components might also be useful outside of it. In particular, it offers the following types to model soft magnetism:
- The
FerromagneticPermeabilitystruct offers a spline-based way to model the ferromagnetic behaviour of a material from measured datapoints. It is particularily optimized for usage with iterative solvers and slightly modifies the resulting curve to achieve numerical stability and fast convergence. It models bothµr = f(H)andµr = f(B), meaning that either the magnetic field strengthHor the magnetic flux densityBcan be used to calculate the relative permeability of a material. - The
JordanModeltype provides a simple and fast model for calculating hysteresis and eddy current losses based on the equationp = kh * f * B² + kec * (f * B)². The accompanying module offers ergonomic ways to obtain the the loss coefficientskhandkecusing least-square fitting.
Serialization and deserialization
The serde integration is gated behind the serde feature flag.
Most of the types (except errors) in this crate implement serialization and deserialization. See the docstrings of the individual types for details.
Documentation
The full API documentation is available at https://docs.rs/stem_material/0.1.0/stem_material/.