numra-pde
Partial differential equation solvers for the Numra workspace — Method of Lines for heat, advection-diffusion, and reaction-diffusion in 1D / 2D / 3D, plus Stefan-condition moving-boundary problems.
Method of Lines: discretize the spatial operator with finite differences, hand the resulting ODE system to a numra-ode stepper (often Radau5 for stiff diffusion problems), and let stiffness and step control happen at the time-integration layer rather than in custom PDE code.
Example
use ;
use DirichletBC;
use ;
let grid = uniform;
let pde = new;
let mol = new;
let u0: = grid.points.iter
.map
.collect;
let opts = default.rtol;
let _ = solve;
What's in this crate
Equations (built-in):
- 1D:
HeatEquation1D,DiffusionReaction1D - 2D:
HeatEquation2D,AdvectionDiffusion2D,ReactionDiffusion2D - 3D:
HeatEquation3D,AdvectionDiffusion3D,ReactionDiffusion3D
Discretization:
Grid1D,Grid2D,Grid3D— uniform spatial gridsFDM,Stencil,DifferenceScheme— finite-difference operatorsMOLSystem,MOLSystem2D,MOLSystem3D— Method-of-Lines wrappersParametricMOLSystem2D,ParametricMOLSystem3D— parameterized variants for sensitivity studies
Boundary conditions:
- 1D:
DirichletBC,NeumannBC,RobinBC,PeriodicBC - 2D/3D:
BoundaryConditions2D,BoundaryConditions3D
Moving boundaries: MovingBound, StefanCondition, CoordinateTransform, Domain1D — for melting/freezing and other phase-change problems.
Sparse assembly: assemble_laplacian_2d, assemble_laplacian_3d, assemble_operator_2d, assemble_operator_3d.
Composes with
numra-ode— time-stepping the spatially-discretized system (oftenRadau5for stiff diffusion)numra-spde— shares the same spatial discretizations under stochastic time steppingnumra-stats— spatial-distribution statistics at final time (mean, variance, percentile)numra-linalg— sparse Laplacian / Helmholtz operator assembly
See interop workflows for the verified PDE → statistics workflow.
Install
[]
= "0.1"
Or via the umbrella crate:
[]
= "0.1"
Documentation
- API: https://docs.rs/numra-pde
- Book: Partial DEs
- Source: https://github.com/moussaoutlook/numra-rs/tree/main/numra-pde
License
Numra Academic & Research License (Non-Commercial). Academic and research use is free; commercial use requires a separate license — contact contact@spectralautomata.com. See LICENSE.