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

ficks_first_law_flux interfaceInputs or arguments on the left, observed outputs on the right. Conserving terminals appear below the component. The tables give units and behavior.ficks_first_law_fluxCore equationdiffusivityconcentration_gradientreturn
Original Lemonergy interface view. Lines identify ports; they are not a completed simulation circuit.
Ports and observed outputs
NameDirectionUnitMeaning
returnoutputmol/(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.

Configuration fields
ParameterUnitDefaultMeaning and limits
diffusivity
diffusivity
m^2/sSupplied by the userFinite nonnegative diffusion coefficient.
concentration gradient
concentration_gradient
mol/m^4Supplied by the userFinite 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.

  1. ficks_first_law_flux: Core equation
    • D (m²/s)
    • dc/dx (mol/m⁴)
Open the worked lesson

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)