AdvectionDiffusionEquation<T>

Models & Types · AiDotNet.PhysicsInformed.PDEs

Represents the Advection-Diffusion Equation: ∂c/∂t + v·∇c = D∇²c + S

Inheritance: PDESpecificationBase<T> → AdvectionDiffusionEquation<T>

Implements: IPDEResidualGradient<T>

How It Works

For Beginners: The Advection-Diffusion equation models the transport of a substance (like heat, pollutants, or chemicals) by both fluid flow (advection) and random molecular motion (diffusion).

Variables:

  • c(x,y,t) or c(x,t) = Concentration of the transported quantity
  • v = (vₓ, vᵧ) = Velocity field (how fast the fluid flows)
  • D = Diffusion coefficient (how fast the substance spreads randomly)
  • S = Source/sink term (where substance is added or removed)

Physical Interpretation:

  • Advection: The substance is carried along by the flowing fluid (like leaves in a river)
  • Diffusion: The substance spreads from high to low concentration (like a drop of ink in water)
  • The equation combines both effects

Dimensionless Numbers:

  • Péclet number (Pe = vL/D) measures advection vs diffusion strength
  • Pe >> 1: Advection dominates (sharp fronts)
  • Pe << 1: Diffusion dominates (smooth profiles)

Applications:

  • Environmental engineering (pollution transport in air/water)
  • Chemical engineering (reactor design)
  • Hydrology (groundwater contamination)
  • Heat transfer in moving fluids
  • Drug delivery in blood flow

Example: Smoke dispersing from a chimney is advected by wind while simultaneously diffusing into the surrounding air.

Constructors

Constructor Summary
AdvectionDiffusionEquation(T diffusionCoeff, T velocityX, T sourceTerm) Initializes a new instance of the 1D Advection-Diffusion Equation with double parameters.
AdvectionDiffusionEquation(T diffusionCoeff, T velocityX, T velocityY, T sourceTerm) Initializes a new instance of the 2D Advection-Diffusion Equation with double parameters.
AdvectionDiffusionEquation(double diffusionCoeff, double velocityX, double sourceTerm) Initializes a new instance of the 1D Advection-Diffusion Equation with double parameters.
AdvectionDiffusionEquation(double diffusionCoeff, double velocityX, double velocityY, double sourceTerm) Initializes a new instance of the 2D Advection-Diffusion Equation with double parameters.

Properties

Property Summary
int InputDimension { get; }
int OutputDimension { get; }
string Name { get; }

Methods

Method Summary
PDEResidualGradient<T> ComputeResidualGradient(Vector<T> inputs, Vector<T> outputs, PDEDerivatives<T> derivatives)
T ComputeResidual(Vector<T> inputs, Vector<T> outputs, PDEDerivatives<T> derivatives)
Tensor<T> ComputeTapeResidual(Tensor<T> inputs, Tensor<T> outputs, PDEDerivatives<T> derivatives)