Lemonergy · Core equation
ficks_first_law_flux
One-dimensional diffusive molar flux for a supplied concentration gradient.
- Implementation ID
ficks_first_law_flux- Reviewed
- 2026-10-27
Behavior
Diffusivity must be finite and nonnegative; the gradient must be finite. Scalar and broadcastable array inputs are supported. This evaluates a constitutive law, not a spatial PDE, gradient estimator or boundary-condition solver.
Interface
| Name | Direction | Unit | Meaning |
|---|---|---|---|
return | output | mol/(m^2 s) | Scalar float or NumPy array following broadcasting. |
Parameters
Defaults are initial model values. Select values for your own model and operating conditions.
| Parameter | Unit | Default | Meaning and limits |
|---|---|---|---|
diffusivitydiffusivity | m^2/s | Supplied by the user | Finite nonnegative diffusion coefficient. |
concentration gradientconcentration_gradient | mol/m^4 | Supplied by the user | Finite spatial concentration gradient. |
Equations and rules
J = -D * dc/dx
Worked example
Calculate diffusion flux
For D = 1 × 10⁻¹⁰ m²/s and dc/dx = 2 × 10⁶ mol/m⁴, J = −2 × 10⁻⁴ mol/(m²·s).
Open the worked lesson →Use in a workflow
Calculate diffusion flux
Lemonergy Core evaluates this relation.
- ficks_first_law_flux: Core equation
- D (m²/s)
- dc/dx (mol/m⁴)
Connected concepts
Limits and interpretation
- This does not solve second-law time evolution or specify boundary conditions.
Implementation sources
This reference follows Lemonergy implementation sources. Scientific articles support the linked concepts separately.
Repository: battery-core · Revision: main
src/battery_core/diffusion.py
This implementation and its workflow uses (JSON) · Knowledge graph (JSON-LD)