stem_wire
Feedback welcome!
Found a bug, missing docs, or have a feature request?
Please open an issue on GitHub.
This crate contains the Wire trait which serves as the basic building block
for defining wires within the stem (Simulation Toolbox for Electric Motors)
ecosystem, see the stem book for an
introduction to the framework.
Additionally, the following predefined wire types are provided:
RoundWire: A round, possible hollow wire with insulation.RectangularWire: A rectangular wire with insulation.StrandedWire: A stranded wire composed of multiple other wires.SffWire: An abstract wire type defined by its slot fill factor.CastWire: A wire bar casted directly into the slot of a magnetic core.
The resistance module provides formulas for calculating resistances of
different basic geometric bodies like cylinders, cuboids, spheres etc.
Serialization and deserialization
If the serde feature is enabled, all wire types from this crate can be
serialized and deserialized. During deserialization, the invariants are
validated (to e.g. prevent negative diameters for a RoundWire).
Units and quantities can be deserialized from strings representing SI units via the dyn_quantity crate. Similarily, it is possible to serialize the quantities of a wire as value-unit strings using the serialize_with_units function.
See the chapter serialization and deserialization of the stem book for details.
Documentation
The full API documentation is available at https://docs.rs/stem_wire/0.1.0/stem_wire/.