ConvectionPDETerm[vars,β]
represents a convection term
with convection coefficient
and model variables vars.
ConvectionPDETerm[vars,β,pars]
uses model parameters pars.
ConvectionPDETerm
ConvectionPDETerm[vars,β]
represents a convection term
with convection coefficient
and model variables vars.
ConvectionPDETerm[vars,β,pars]
uses model parameters pars.
Details
- Convection terms are used in a number of domains such as thermodynamics, acoustics, structural mechanics and fluid dynamics.
- Convection is also known as advection.
- Convection with a convection coefficient
is the process of transport of the dependent variable
due to a bulk movement: - ConvectionPDETerm returns a differential operators term to be used as a part of partial differential equations:
- ConvectionPDETerm can be used to model convection equations with dependent variable
, independent variables
and time variable
. - Stationary model variables vars are vars={u[x1,…,xn],{x1,…,xn}}.
- Time-dependent model variables vars are vars={u[t,x1,…,xn],{x1,…,xn}} or vars={u[t,x1,…,xn],t,{x1,…,xn}}.
- The convection term
in context with other PDE terms is given by: - During convection, the medium in which the convection happens is the transport mechanism, in contrast to diffusion where the medium remains stationary.
- The convection coefficient
has the following form: -
{β1,…,βn} 
vector 
- For a system of PDEs with dependent variables {u1,…,um}, the convection represents:
- The convection term in context systems of PDE terms:
- The convection coefficient
is a tensor of rank 3 of the form
where each submatrix
is a vector of length
that is specified in the same way as for a single dependent variable. - A symbolic convection coefficient can be specified through a VectorSymbol. »
- The conservative convection coefficient
can depend on time, space, parameters and the dependent variables. - The following parameters pars can be given:
-
parameter default symbol "CoordinateChart" "Cartesian" 
- The coefficient
does not affect the meaning of NeumannValue. - All quantities that do not explicitly depend on the independent variables given are taken to have zero partial derivative.
- The ConservativeConvectionPDETerm is closely related.
Examples
open all close allBasic Examples (4)
Define a time-independent convection term:
ConvectionPDETerm[{u[x], {x}}, {2}]Define a time-dependent convection term:
ConvectionPDETerm[{u[t, x], t, {x}}, {2}]Define a 2D stationary convection term:
ConvectionPDETerm[{u[x, y], {x, y}}, {1, 0}]Solve a convection diffusion equation build with basic terms:
vars = {u[x, y], {x, y}};
NDSolveValue[{DiffusionPDETerm[vars, 1] + ConvectionPDETerm[vars, {2, 0}] == SourcePDETerm[vars, -1], DirichletCondition[u[x, y] == 0, x == 0 || y == 0]}, u[x, y], {x, y}∈Rectangle[]]ContourPlot[%, {x, y}∈Rectangle[]]Scope (10)
Define a symbolic convection term:
ConvectionPDETerm[{u[t, x], t, {x}}, {a}]Define a stationary dependent convection term with a symbolic vector convection coefficient:
β = VectorSymbol["β", {1}];
ConvectionPDETerm[{u[x], {x}}, β]%//ActivateDefine a stationary dependent convection term with a symbolic vector convection coefficient replaced:
β = VectorSymbol["β", {1}];
ConvectionPDETerm[{u[x], {x}}, β, <|β -> {1}|>]Define a time-dependent convection term with a symbolic vector convection coefficient replaced:
β = VectorSymbol["β", {1}];
ConvectionPDETerm[{u[t, x], t, {x}}, β, <|β -> {1}|>]Define a 1D axisymmetric time-independent convection term:
ConvectionPDETerm[{u[r], {r}}, {2}, <|"RegionSymmetry" -> "Axisymmetric"|>]Apply Activate to the term:
Activate[%]Define a time-independent 2D convection term:
ConvectionPDETerm[{u[x, y], {x, y}}, {2, 1}]Define a nonlinear time-independent 2D convection term:
ConvectionPDETerm[{u[x, y], {x, y}}, {2, u[x, y] ^ 2}]Define a nonlinear time-dependent 2D convection term:
ConvectionPDETerm[{u[t, x, y], t, {x, y}}, {2, u[x, y] ^ 2}]Define a convection term with multiple dependent variables:
ConvectionPDETerm[{{u[x, y], v[x, y]}, {x, y}}, {{{1, 0}, {0, 2}}, {{0, 0}, {0, 1}}}]stokesModel[vars_, μ_] := DiffusionPDETerm[vars, {{μ, 0, 0}, {0, μ, 0}, {0, 0, 0}}] + ConvectionPDETerm[vars, {{0, 0, {1, 0}}, {0, 0, {0, 1}}, {{1, 0}, {0, 1}, 0}}]stokesModel[{{u[x, y], v[x, y], p[x, y]}, {x, y}}, μ] == {0, 0, 0}Applications (3)
Use DiffusionPDETerm to model species diffusion under a dam. Set up the region:
Subscript[Ω, dam] = Rectangle[{6, 3}, {12, 18}];
Subscript[Ω, sediment] = RegionDifference[Rectangle[{0, 0}, {18, 6}], Subscript[Ω, dam]];model = DiffusionPDETerm[{u[x, y], {x, y}}, 10 ^ -4]solution = NDSolveValue[{model == 0, DirichletCondition[u[x, y] == 16, x ≤ 6 && y == 6], DirichletCondition[u[x, y] == 8, x ≥ 12 && y == 6]}, u, {x, y}∈Subscript[Ω, sediment]]flux = model /. Inactive[Div][flux_, _] :> Activate[flux]Show[
...,
VectorPlot[Evaluate[flux /. u -> solution], {x, 0, 18}, {y, 0, 6}, Rule[...]]
]//QuietFind the concentration of species under the dam. Construct the model:
op = DiffusionPDETerm[{c[x, y], {x, y}}, 1] + ConvectionPDETerm[{c[x, y], {x, y}}, flux /. u -> solution] + 2 * 10 ^ -5c[x, y];concentration = NDSolveValue[{op == 0,
DirichletCondition[c[x, y] == 100, x ≤ 6 && y == 6], DirichletCondition[c[x, y] == 50, x ≥ 12 && y == 6]
}, c, {x, y}∈Subscript[Ω, sediment]]Visualize the species concentration:
Show[
...,
ContourPlot[concentration[x, y], {x, y}∈concentration["ElementMesh"], ...],
VectorPlot[Evaluate[flux /. u -> solution], {x, 0, 18}, {y, 0, 6}, Rule[...]]
]//QuietstokesModel[vars_, μ_] := DiffusionPDETerm[vars, {{μ, 0, 0}, {0, μ, 0}, {0, 0, 0}}] + ConvectionPDETerm[vars, {{0, 0, {1, 0}}, {0, 0, {0, 1}}, {{1, 0}, {0, 1}, 0}}]eqn = stokesModel[{{u[x, y], v[x, y], p[x, y]}, {x, y}}, 1] == {0, 0, 0}Ω = RegionUnion[Rectangle[{0, 0}, {1, 1 / 2}], Rectangle[{1, 1 / 10}, {2, 2 / 5}]];bcs = {DirichletCondition[
{u[x, y] == 4 * 0.3 * y * (0.5 - y) / (0.41) ^ 2, v[x, y] == 0.}, x == 0.], DirichletCondition[{u[x, y] == 0., v[x, y] == 0.}, 0 < x < 2],
DirichletCondition[p[x, y] == 0., x == 2]};{xVel, yVel, pressure} = NDSolveValue[{eqn, bcs}, {u, v, p}, {x, y}∈Ω, Method -> {"FiniteElement", "InterpolationOrder" -> {u -> 2, v -> 2, p -> 1}, "MeshOptions" -> {"MaxCellMeasure" -> 0.0005}}];VectorPlot[{xVel[x, y], yVel[x, y]}, {x, y}∈Ω, AspectRatio -> Automatic, StreamPoints -> 6, StreamColorFunction -> "TemperatureMap", StreamColorFunctionScaling -> False]//QuietExtend a Stokes-flow model to a Navier–Stokes flow model. Define a Stokes-flow model:
stokesModel[vars_, μ_] := DiffusionPDETerm[vars, {{μ, 0, 0}, {0, μ, 0}, {0, 0, 0}}] + ConvectionPDETerm[vars, {{0, 0, {1, 0}}, {0, 0, {0, 1}}, {{1, 0}, {0, 1}, 0}}]Define a Navier–Stokes flow model:
navierStokesModel[vars_, μ_, ρ_] := stokesModel[vars, μ] + ConvectionPDETerm[vars, {{ρ vars[[1, {1, 2}]], 0, 0}, {0, ρ vars[[1, {1, 2}]], 0}, {0, 0, 0}}]eqn = navierStokesModel[{{u[x, y], v[x, y], p[x, y]}, {x, y}}, 1, 10 ^ -3] == {0, 0, 0}Ω = Rectangle[{0, 0}, {1, 1}];bcs = {DirichletCondition[
{u[x, y] == 1, v[x, y] == 0}, y == 1], DirichletCondition[{u[x, y] == 0, v[x, y] == 0}, y < 1],
DirichletCondition[p[x, y] == 0, x == 0 && y == 1]};{xVel, yVel, pressure} = NDSolveValue[{eqn, bcs}, {u, v, p}, {x, y}∈Ω, Method -> {"FiniteElement", "InterpolationOrder" -> {u -> 2, v -> 2, p -> 1}, "MeshOptions" -> {"MaxCellMeasure" -> 0.0005}}];VectorPlot[{xVel[x, y], yVel[x, y]}, {x, y}∈Ω, AspectRatio -> Automatic, StreamPoints -> 6, StreamColorFunction -> "TemperatureMap", StreamColorFunctionScaling -> False]Possible Issues (2)
A convection term with a 0-flow velocity field evaluates to 0:
ConvectionPDETerm[{u[x], {x}}, 0]ConvectionPDETerm[{u[x], {x}}, {0}]A symbolic convection coefficient needs to be of sufficient length:
ConvectionPDETerm[{u[x], {x}}, v]The way to specify the symbolic vector convection coefficient is through a VectorSymbol:
vs = VectorSymbol["v", {1}];
ConvectionPDETerm[{u[x], {x}}, vs]ConvectionPDETerm[{u[x], {x}}, vs]//ActivateSubstitute a VectorSymbol with an actual value:
ConvectionPDETerm[{u[x], {x}}, vs, <|vs -> {1}|>]An alternative is to specify the symbolic convection coefficient as a vector:
ConvectionPDETerm[{u[x], {x}}, {v}, <|v -> 1|>]Related Guides
Text
Wolfram Research (2020), ConvectionPDETerm, Wolfram Language function, https://reference.wolfram.com/language/ref/ConvectionPDETerm.html (updated 2026).
CMS
Wolfram Language. 2020. "ConvectionPDETerm." Wolfram Language & System Documentation Center. Wolfram Research. Last Modified 2026. https://reference.wolfram.com/language/ref/ConvectionPDETerm.html.
APA
Wolfram Language. (2020). ConvectionPDETerm. Wolfram Language & System Documentation Center. Retrieved from https://reference.wolfram.com/language/ref/ConvectionPDETerm.html
BibTeX
@misc{reference.wolfram_2026_convectionpdeterm, author="Wolfram Research", title="{ConvectionPDETerm}", year="2026", howpublished="\url{https://reference.wolfram.com/language/ref/ConvectionPDETerm.html}", note=[Accessed: 13-June-2026]}
BibLaTeX
@online{reference.wolfram_2026_convectionpdeterm, organization={Wolfram Research}, title={ConvectionPDETerm}, year={2026}, url={https://reference.wolfram.com/language/ref/ConvectionPDETerm.html}, note=[Accessed: 13-June-2026]}