use-plasma 0.0.1

Small scalar plasma physics helpers for RustUse
Documentation
  • Coverage
  • 97.87%
    46 out of 47 items documented12 out of 34 items with examples
  • Size
  • Source code size: 30.51 kB This is the summed size of all the files inside the crates.io package for this release.
  • Documentation size: 622.22 kB This is the summed size of all files generated by rustdoc for all configured targets
  • Ø build duration
  • this release: 8s Average build duration of successful builds.
  • all releases: 8s Average build duration of successful builds in releases after 2024-10-23.
  • Links
  • Homepage
  • RustUse/use-physics
    1 0 0
  • crates.io
  • Dependencies
  • Versions
  • Owners
  • CloudBranch

use-plasma

Small scalar plasma physics helpers for RustUse.

Install

[dependencies]
use-plasma = "0.0.1"

Foundation

use-plasma provides small scalar plasma physics helpers for plasma frequency, Debye length, Debye number, thermal speed, gyrofrequency, gyroradius, plasma pressure, magnetic pressure, plasma beta, Alfven speed, charge density, and quasi-neutrality checks.

Inputs are expected to be SI-style numeric values:

  • particles per cubic meter for number density
  • kelvin for temperature
  • teslas for magnetic flux density
  • kilograms for mass
  • kilograms per cubic meter for mass density
  • meters for Debye length and gyroradius
  • radians per second for angular frequency
  • hertz for frequency
  • pascals for pressure
  • coulombs per cubic meter for charge density

The crate keeps only a few local convenience constants. Broader physical constants belong in the top-level use-constants set. Unit abstractions belong in the top-level use-units set. Electromagnetic field helpers belong in use-electromagnetism, and particle metadata belongs in use-particle.

Example

use use_plasma::{ElectronPlasma, alfven_speed};

# fn main() -> Result<(), &'static str> {
let plasma = ElectronPlasma::new(1.0e18, 10_000.0).ok_or("expected valid plasma")?;

assert!(plasma.debye_length().is_some_and(|value| value > 0.0));
assert!(plasma.plasma_frequency().is_some_and(|value| value > 0.0));
assert!(alfven_speed(0.01, 1.0e-10).is_some_and(|value| value >= 0.0));
# Ok(())
# }

When to use directly

Choose use-plasma when you need reusable scalar plasma formulas without bringing in a larger simulation stack or a broader plasma modeling framework.

Scope

  • APIs stay dependency-free, f64-first, and intentionally small.
  • This crate is not a plasma simulation engine, particle-in-cell framework, magnetohydrodynamics solver, radiation transport tool, or materials database.
  • Detailed collisional transport models, plasma chemistry, and reaction networks are out of scope.

Status

use-plasma is a pre-1.0 crate with a deliberately small scalar API.