Expand description
This module reexports all wire types defined in stem_wire, the
Wire trait as well as the stem_material::prelude
module to simplify the usage of this crate.
Re-exports§
pub use crate::cast::CastWire;pub use crate::rectangular::RectangularWire;pub use crate::round::RoundWire;pub use crate::sff::SffWire;pub use crate::stranded::StrandedWire;pub use crate::stranded::WireGroup;pub use crate::wire::Wire;pub use stem_material;
Modules§
- dyn_
quantity - dyn_quantity
- jordan_
model - An implementation of the Jordan model for iron losses in the core lamination.
- typetag
- github crates-io docs-rs
- unary
- This module contains unary functions which implement
IsQuantityFunction.
Structs§
- Clamped
Quantity - A wrapper around a type implementing
IsQuantityFunctiontrait object which clamps the output ofIsQuantityFunction::callusing the provided upper and lower limits. - DynQuantity
- This type represents a physical quantity via its numerical
valueand a unit of measurement (fieldexponents). The unit of measurement is not defined via the type system, but rather via the values of theUnit. This means that the unit of measurement is not fixed at compile time, but can change dynamically at runtime. - Failed
Coefficient Calculation - A struct representing a failed
JordanModelcoefficient calculation attempt. - Ferromagnetic
Permeability - A ferromagnetic permeability characteristic optimized for calculations.
- FitLoss
Curve - This struct is a “flattened” version of
IronLossData. It is not meant to be used on its own and is just exposed so the optimization result ofIronLossData::solve_for_coefficientscan be examined. See its docstring for more. - Flux
Density Loss Pair - A single datapoint of an
IronLossCharacteristic. - Iron
Loss Characteristic - A iron loss characteristic for a specific frequency.
- Iron
Loss Data - A container for multiple
IronLossCharacteristics. - Jordan
Model - Implementation of the Jordan iron loss model.
- Magnetization
Curve - A collection of datapoints representing the magnetization curve of a material.
- Material
- A substance which constitutes an object, e.g. a magnet or a wire in stem.
- NotConvertible
From Complex F64 - Error describing a failed attempt to convert a
Complex<f64>into the typeVofDynQuantity<V>. - Parse
Error - Error representing a failed attempt to parse a string into a
DynQuantity. - Polarization
Curve - A collection of datapoints representing the polarization curve of a material.
- Quantity
Function - A thin wrapper around a
Box<dyn IsQuantityFunction>trait object which provides some type checks for usage inVarQuantity. - Root
Error - Error representing a failed attempt to calculate the
nth root of anUnit. - Unit
- Struct representing a unit of measurement in the SI system via the exponents of
the base units. The unit is purely defined by the values of its fields, meaning
that it can change at runtime. The struct implements basic arithmetic functions
such as multiplication and division (via the
Mul,MulAssign,Div,DivAssigntraits), exponentiation (Unit::powi) and a fallible version of root calculation (Unit::try_nthroot). - Units
NotEqual - Error representing unequality of units.
- VACUUM_
PERMEABILITY - SI-value of the vacuum magnetic permeability (4π1e-7 NA²) with units.
See
VACUUM_PERMEABILITY_UNITLESSfor more. - ampere
- The ampere is the SI unit of electric current. It is defined by taking the fixed numerical value of the elementary charge e to be 1.602 176 634 × 10⁻¹⁹ when expressed in the unit C, which is equal to A s, where the second is defined in terms of ∆νCs.
- ampere_
per_ centimeter - amperes per centimeter
- ampere_
per_ meter - amperes per meter
- ampere_
per_ micrometer - amperes per micrometer
- centimeter
- centimeters
- centimeter_
per_ second - centimeters per second
- centimeter_
per_ second_ squared - centimeters per second squared
- cubic_
centimeter - cubic centimeters
- cubic_
centimeter_ per_ gram - cubic centimeters per gram
- cubic_
kilometer - cubic kilometers
- cubic_
meter - cubic meters
- cubic_
meter_ per_ gram - cubic meters per gram
- cubic_
meter_ per_ kilogram - cubic meters per kilogram
- cubic_
micrometer - cubic micrometers
- cubic_
millimeter - cubic millimeters
- day
- days
- degree_
celsius - degrees Celsius
- gigaampere
- gigaamperes
- gigahertz
- gigahertz
- gigajoule
- gigajoules
- giganewton
- giganewtons
- gigaohm
- gigaohms
- gigaohm_
meter - gigaohm meters
- gigasiemens
- gigasiemens
- gigatesla
- gigateslas
- gigavolt
- gigavolts
- gigawatt
- gigawatts
- gigawatt_
per_ kelvin - gigawatts per kelvin
- gigawatt_
per_ kilogram - gigawatts per kilogram
- gigawatt_
per_ meter_ kelvin - gigawatts per meter kelvin
- gigaweber
- gigawebers
- gram
- grams
- gram_
per_ cubic_ meter - grams per cubic meter
- henry_
per_ meter - henrys per meter
- hertz
- The hertz is one cycle per second.
- hour
- hours
- joule
- Derived unit of energy.
- joule_
per_ degree_ celsius - joules per degree celsius
- joule_
per_ kelvin - Derived unit of heat capacity expressed in terms of derived unit Joule. Equivalent to kg · m²/(s² · K).
- joule_
per_ kilogram_ kelvin - Derived unit of specific heat capacity expressed in derived units. Equivalent to m²/(s² · K).
- kelvin
- The kelvin is the SI unit of thermodynamic temperature. It is defined by taking the fixed numerical value of the Boltzmann constant k to be 1.380 649 × 10⁻²³ when expressed in the unit J K⁻¹, which is equal to kg m² s⁻² K⁻¹, where the kilogram, meter, and second are defined in terms of h, c, and ∆νCs.
- kiloampere
- kiloamperes
- kilogram
- The kilogram is the SI unit of mass. It is defined by taking the fixed numerical value of the Planck constant h to be 6.626 070 15 × 10⁻³⁴ when expressed in the unit J s, which is equal to kg m² s⁻¹, where the meter and the second are defined in terms of c and ∆νCs.
- kilogram_
per_ cubic_ meter - Derived unit of density.
- kilogram_
square_ meter - kilogram square meters
- kilohertz
- kilohertz
- kilojoule
- kilojoules
- kilojoule_
per_ kilogram_ kelvin - kilojoules per kilogram kelvin
- kilokelvin
- kilokelvins
- kilometer
- kilometers
- kilometer_
per_ hour - kilometers per hour
- kilometer_
per_ second - kilometers per second
- kilometer_
per_ second_ squared - kilometers per second squared
- kilonewton
- kilonewtons
- kiloohm
- kiloohms
- kiloohm_
meter - kiloohm meters
- kilosiemens
- kilosiemens
- kilotesla
- kiloteslas
- kilovolt
- kilovolts
- kilowatt
- kilowatts
- kilowatt_
per_ kelvin - kilowatts per kelvin
- kilowatt_
per_ kilogram - kilowatts per kilogram
- kilowatt_
per_ meter_ kelvin - kilowatts per meter kelvin
- kiloweber
- kilowebers
- megaampere
- megaamperes
- megahertz
- megahertz
- megajoule
- megajoules
- meganewton
- meganewtons
- megaohm
- megaohms
- megaohm_
meter - megaohm meters
- megasiemens
- megasiemens
- megatesla
- megateslas
- megavolt
- megavolts
- megawatt
- megawatts
- megawatt_
per_ kelvin - megawatts per kelvin
- megawatt_
per_ kilogram - megawatts per kilogram
- megawatt_
per_ meter_ kelvin - megawatts per meter kelvin
- megaweber
- megawebers
- meter
- The meter is the SI unit of length. It is defined by taking the fixed numerical value of the speed of light in vacuum c to be 299 792 458 when expressed in the unit m s⁻¹, where the second is defined in terms of the caesium frequency ∆νCs.
- meter_
per_ second - meters per second
- meter_
per_ second_ squared - meters per second squared
- microampere
- microamperes
- microgram
- micrograms
- microgram_
per_ cubic_ meter - micrograms per cubic meter
- microhertz
- microhertz
- microjoule
- microjoules
- microkelvin
- microkelvins
- micrometer
- micrometers
- micrometer_
per_ second - micrometers per second
- micronewton
- micronewtons
- microohm
- microohms
- microohm_
meter - microohm meters
- microsecond
- microseconds
- microsiemens
- microsiemens
- microtesla
- microteslas
- microvolt
- microvolts
- microwatt
- microwatts
- microwatt_
per_ kelvin - microwatts per kelvin
- microwatt_
per_ kilogram - microwatts per kilogram
- microwatt_
per_ meter_ kelvin - microwatts per meter kelvin
- microweber
- microwebers
- milliampere
- millamperes
- milligram
- milligrams
- milligram_
per_ cubic_ meter - milligrams per cubic meter
- millihertz
- millihertz
- millijoule
- millijoules
- millikelvin
- millikelvins
- millimeter
- millimeters
- millimeter_
per_ minute - millimeters per minute
- millimeter_
per_ minute_ squared - millimeters per minute squared
- millimeter_
per_ second - millimeters per second
- millimeter_
per_ second_ squared - millimeters per second squared
- millinewton
- millinewtons
- milliohm
- milliohms
- milliohm_
meter - milliohm meters
- millisecond
- milliseconds
- millisiemens
- millisiemens
- millitesla
- milliteslas
- millivolt
- millivolts
- milliwatt
- milliwatts
- milliwatt_
per_ kelvin - milliwatts per kelvin
- milliwatt_
per_ kilogram - milliwatts per kilogram
- milliwatt_
per_ meter_ kelvin - milliwatts per meter kelvin
- milliweber
- milliwebers
- minute
- minutes
- newton
- Derived unit of force.
- newton_
centimeter - newton centimeters
- newton_
kilometer - newton kilometers
- newton_
meter - Derived unit of torque.
- newton_
micrometer - newton micrometers
- newton_
millimeter - newton millimeters
- ohm
- Derived unit of electrical resistance.
- ohm_
centimeter - ohm centimeters
- ohm_
meter - Derived unit of electrical resistance.
- ohm_
square_ millimeter_ per_ meter - ohm square millimeters per meter
- radian_
per_ second - Derived unit of angular velocity.
- radian_
per_ second_ squared - Derived unit of angular acceleration.
- ratio
- reciprocal_
centimeter - reciprocal centimeters
- reciprocal_
kilometer - reciprocal kilometers
- reciprocal_
micrometer - reciprocal micrometers
- reciprocal_
millimeter - reciprocal millimeters
- revolution_
per_ hour - revolutions per hour
- revolution_
per_ minute - revolutions per minute
- revolution_
per_ second - revolutions per second
- second
- The second is the SI unit of time. It is defined by taking the fixed numerical value of the caesium frequency ∆νCs, the unperturbed ground-state hyperfine transition frequency of the caesium 133 atom, to be 9 192 631 770 when expressed in the unit Hz, which is equal to s⁻¹.
- siemens
- Derived unit of electrical conductance.
- siemens_
per_ centimeter - siemens per centimeter
- siemens_
per_ meter - siemens per meter
- square_
centimeter - square centimeters
- square_
kilometer - square kilometers
- square_
meter - square meters
- square_
micrometer - square micrometers
- square_
millimeter - square millimeters
- standard_
gravity - standard accelerations of gravity
- tesla
- Derived unit of magnetic flux density.
- ton
- Ton Metric
- ton_
per_ cubic_ meter - tons per cubic meter
- volt
- Derived unit of electric potential.
- watt
- Derived unit of power.
- watt_
per_ kelvin - Derived unit of thermal conductance in derived units. Equivalent to kg · m²/(s³ · K).
- watt_
per_ kilogram - Derived unit of specific power.
- watt_
per_ meter_ kelvin - Derived unit of thermal conductivity in derived units. Equivalent to kg · m/(s³ · K).
- weber
- Derived unit of magnetic flux.
- year
- years
Enums§
- Conversion
Error - Error describing a failed attempt to convert between different types representing quantities.
- Invalid
Input Data - Errors which can occur when attempting to convert a
MagnetizationCurveorPolarizationCurveinto aFerromagneticPermeability. - Iron
Losses - A specialized variant of
VarQuantity<SpecificPower>for iron losses. - Parse
Error Reason - The varying reasons parsing a string to a
DynQuantitycan fail. This struct is part ofParseError, which contains the information where the parsing failed. - Predef
Unit - An enum representing predefined
Units. - Relative
Permeability - A specialized variant of
VarQuantity<f64>for relative permeability. - VarQuantity
- A quantity whose value can either be constant or a function of one or more other quantities.
Constants§
- SERIALIZE_
WITH_ UNITS - A thread-local, static variable which enables / disables serialization of
quantities with or without units. It is used within the functions
serialize_quantity,serialize_opt_quantity,serialize_angleandserialize_opt_angleas a thread-local context to decide whether a quantity should be serialized with or without its units. By default, its value isfalse, meaning that quantities are serialized without their units. Theserialize_with_unitsfunction sets it temporarily totrue, then performs the actual serialization, and afterwards resets it tofalseagain (return to default behaviour). - VACUUM_
PERMEABILITY_ UNITLESS - SI-value of the vacuum magnetic permeability (4π1e-7 NA²) without units.
Traits§
- Field
Strength OrFlux Density - Sealed helper trait for
FerromagneticPermeability::get. - IsQuantity
- This is a marker trait which defines trait bounds for all types
Twhich can be used as “quantities” inVarQuantity<T>. It does not provide any methods and is auto-implemented for allTfulfilling the bounds, hence it is not necessary to ever import this trait. It is only public to make compiler error messages more helpful. - IsQuantity
Function - Trait used to construct variable quantities whose value is a (pure) function of other quantities.
- Unit
From Type - A trait to derive
Unitfrom a type. This trait bridges the gap between (external) types representing physical quantities (such as e.g. theQuantitytype from the uom crate) andUnit.
Functions§
- deserialize_
angle - Deserializes an angle from a valid
DynQuantityrepresentation (see docstring ofDynQuantity). The output value is always in radians. - deserialize_
opt_ angle - Like
deserialize_angle, but deserializes into anOption<f64>instead of af64. - deserialize_
opt_ quantity - Like
deserialize_quantity, but deserializes into anOption<T>instead of aTimplementingTryFrom<DynQuantity>. - deserialize_
opt_ vec_ of_ quantities - Like
deserialize_vec_of_quantities, but deserializes into anOption<Vec<T>>instead of aVec<T>. - deserialize_
quantity - Deserializes a type
TimplementingTryFrom<DynQuantity>from a validDynQuantityrepresentation (see docstring ofDynQuantity). - deserialize_
vec_ of_ quantities - Deserializes a vector of
Twhich implementsTryFrom<DynQuantity>from: - filter_
unary_ function - A helper function which filters the
conditionsfor a quantity with the typematch_for. If a matching quantity is found, it is used as argument forFand the result is returned. Otherwise, the result ofG()is returned. - serialize_
angle - Enables serialization of an angle into a string containing both the value and the “rad” unit.
- serialize_
opt_ angle - Like
serialize_angle, but serializes an [&Option<T>] instead of a&TimplementingInto<DynQuantity>. - serialize_
opt_ quantity - Like
serialize_quantity, but serializes an [&Option<T>] instead of a&TimplementingInto<DynQuantity>. - serialize_
quantity - Enables serialization of a quantity (any type implementing
Into<DynQuantity>) into a string containing both the value and the units. - serialize_
with_ units - A wrapper around a serialization function / closure which enables serialization with units.
Type Aliases§
- Absement
Quantitytype alias using the default base units.- Acceleration
Quantitytype alias using the default base units.- Action
Quantitytype alias using the default base units.- Amount
OfSubstance Quantitytype alias using the default base units.- Angle
Quantitytype alias using the default base units.- Angular
Absement Quantitytype alias using the default base units.- Angular
Acceleration Quantitytype alias using the default base units.- Angular
Jerk Quantitytype alias using the default base units.- Angular
Velocity Quantitytype alias using the default base units.- Area
Quantitytype alias using the default base units.- Areal
Density OfStates Quantitytype alias using the default base units.- Areal
Heat Capacity Quantitytype alias using the default base units.- Areal
Mass Density Quantitytype alias using the default base units.- Areal
Number Density Quantitytype alias using the default base units.- Areal
Number Rate Quantitytype alias using the default base units.- Available
Energy Quantitytype alias using the default base units.- Capacitance
Quantitytype alias using the default base units.- Catalytic
Activity Quantitytype alias using the default base units.- Catalytic
Activity Concentration Quantitytype alias using the default base units.- Curvature
Quantitytype alias using the default base units.- Diffusion
Coefficient Quantitytype alias using the default base units.- Dynamic
Viscosity Quantitytype alias using the default base units.- Electric
Charge Quantitytype alias using the default base units.- Electric
Charge Areal Density Quantitytype alias using the default base units.- Electric
Charge Linear Density Quantitytype alias using the default base units.- Electric
Charge Volumetric Density Quantitytype alias using the default base units.- Electric
Current Quantitytype alias using the default base units.- Electric
Current Density Quantitytype alias using the default base units.- Electric
Dipole Moment Quantitytype alias using the default base units.- Electric
Displacement Field Quantitytype alias using the default base units.- Electric
Field Quantitytype alias using the default base units.- Electric
Flux Quantitytype alias using the default base units.- Electric
Permittivity Quantitytype alias using the default base units.- Electric
Potential Quantitytype alias using the default base units.- Electric
Quadrupole Moment Quantitytype alias using the default base units.- Electrical
Conductance Quantitytype alias using the default base units.- Electrical
Conductivity Quantitytype alias using the default base units.- Electrical
Mobility Quantitytype alias using the default base units.- Electrical
Resistance Quantitytype alias using the default base units.- Electrical
Resistivity Quantitytype alias using the default base units.- Energy
Quantitytype alias using the default base units.- Force
Quantitytype alias using the default base units.- Frequency
Quantitytype alias using the default base units.- Frequency
Drift Quantitytype alias using the default base units.- Heat
Capacity Quantitytype alias using the default base units.- Heat
Flux Density Quantitytype alias using the default base units.- Heat
Transfer Quantitytype alias using the default base units.- Inductance
Quantitytype alias using the default base units.- Information
Quantitytype alias using the default base units.- Information
Rate Quantitytype alias using the default base units.- Inverse
Velocity Quantitytype alias using the default base units.- Jerk
Quantitytype alias using the default base units.- Length
Quantitytype alias using the default base units.- Linear
Density OfStates Quantitytype alias using the default base units.- Linear
Mass Density Quantitytype alias using the default base units.- Linear
Number Density Quantitytype alias using the default base units.- Linear
Number Rate Quantitytype alias using the default base units.- Linear
Power Density Quantitytype alias using the default base units.- Luminance
Quantitytype alias using the default base units.- Luminous
Intensity Quantitytype alias using the default base units.- Magnetic
Field Strength Quantitytype alias using the default base units.- Magnetic
Flux Quantitytype alias using the default base units.- Magnetic
Flux Density Quantitytype alias using the default base units.- Magnetic
Moment Quantitytype alias using the default base units.- Magnetic
Permeability Quantitytype alias using the default base units.- Mass
Quantitytype alias using the default base units.- Mass
Concentration Quantitytype alias using the default base units.- Mass
Density Quantitytype alias using the default base units.- Mass
Flux Quantitytype alias using the default base units.- Mass
PerEnergy Quantitytype alias using the default base units.- Mass
Rate Quantitytype alias using the default base units.- Molality
Quantitytype alias using the default base units.- Molar
Concentration Quantitytype alias using the default base units.- Molar
Energy Quantitytype alias using the default base units.- Molar
Flux Quantitytype alias using the default base units.- Molar
Heat Capacity Quantitytype alias using the default base units.- Molar
Mass Quantitytype alias using the default base units.- Molar
Radioactivity Quantitytype alias using the default base units.- Molar
Volume Quantitytype alias using the default base units.- Moment
OfInertia Quantitytype alias using the default base units.- Momentum
Quantitytype alias using the default base units.- Power
Quantitytype alias using the default base units.- Power
Rate Quantitytype alias using the default base units.- Pressure
Quantitytype alias using the default base units.- Radiant
Exposure Quantitytype alias using the default base units.- Radioactivity
Quantitytype alias using the default base units.- Ratio
Quantitytype alias using the default base units.- Reciprocal
Length Quantitytype alias using the default base units.- Solid
Angle Quantitytype alias using the default base units.- Specific
Area Quantitytype alias using the default base units.- Specific
Heat Capacity Quantitytype alias using the default base units.- Specific
Power Quantitytype alias using the default base units.- Specific
Radioactivity Quantitytype alias using the default base units.- Specific
Volume Quantitytype alias using the default base units.- Surface
Electric Current Density Quantitytype alias using the default base units.- Temperature
Coefficient Quantitytype alias using the default base units.- Temperature
Gradient Quantitytype alias using the default base units.- Temperature
Interval Quantitytype alias using the default base units.- Thermal
Conductance Quantitytype alias using the default base units.- Thermal
Conductivity Quantitytype alias using the default base units.- Thermal
Resistance Quantitytype alias using the default base units.- Thermodynamic
Temperature Quantitytype alias using the default base units.- Time
Quantitytype alias using the default base units.- Torque
Quantitytype alias using the default base units.- V
- Storage type.
- Velocity
Quantitytype alias using the default base units.- Volume
Quantitytype alias using the default base units.- Volume
Rate Quantitytype alias using the default base units.- Volumetric
Density OfStates Quantitytype alias using the default base units.- Volumetric
Heat Capacity Quantitytype alias using the default base units.- Volumetric
Number Density Quantitytype alias using the default base units.- Volumetric
Number Rate Quantitytype alias using the default base units.- Volumetric
Power Density Quantitytype alias using the default base units.