SourcePDETerm[vars,f]
represents a source term
with source coefficient
and model variables vars.
SourcePDETerm[vars,f,pars]
uses model parameters pars.
SourcePDETerm
SourcePDETerm[vars,f]
represents a source term
with source coefficient
and model variables vars.
SourcePDETerm[vars,f,pars]
uses model parameters pars.
Details
- Source terms are used in a number of domains such as thermodynamics, acoustics, chemistry, physics and fluid dynamics.
- A source is typically used to model a source or sink.
- Adding a source with a source coefficient
is the process of inserting or removing energy into a model by: - SourcePDETerm returns a differential operators term to be used as a part of partial differential equations:
- SourcePDETerm can be used to model sources in 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 source term
in context with other PDE terms is given by: - The source coefficient
has the following form: -


scalar 
- For a system of PDEs with dependent variables {u1,…,um}, the source represents:
- The source term in context systems of PDE terms:
- The source coefficient
is a tensor of rank 1 of the form
where each value
is a scalar that can be specified in the same way as for a single dependent variable. - The source coefficient
can depend on time, space, parameters and the dependent variables. - 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.
Examples
open all close allBasic Examples (3)
Define a time-independent source term:
SourcePDETerm[{u[x], {x}}, 1]Define a time-dependent source term:
SourcePDETerm[{u[t, x], t, {x}}, Sin[t]]Solve a Poisson equation constructed from a diffusion and a source term:
vars = {u[x, y], {x, y}};
NDSolveValue[{DiffusionPDETerm[vars] == SourcePDETerm[vars, 1], DirichletCondition[u[x, y] == 0, True]}, u, {x, y}∈Disk[]]Plot3D[%[x, y], {x, y}∈Disk[]]Scope (7)
Define a symbolic source term:
SourcePDETerm[{u[t, x], t, {x}}, a]Define a 2D stationary source term:
SourcePDETerm[{u[x, y], {x, y}}, 1]Define a 3D axisymmetric time-independent source term:
SourcePDETerm[{u[r, θ, z], {r, θ, z}}, 1, <|"RegionSymmetry" -> "Axisymmetric"|>]Define a source term for multiple dependent variables:
SourcePDETerm[{{u[x], v[x]}, {x}}, {{Subscript[f, 1]}, {Subscript[f, 2]}}]Solve a Poisson equation with a source term:
NDSolveValue[{-Laplacian[u[x, y], {x, y}] == SourcePDETerm[{u[x, y], {x, y}}, 1], DirichletCondition[u[x, y] == 0, True]}, u, {x, y}∈Disk[]]Plot3D[%[x, y], {x, y}∈Disk[]]Compute eigenvalues of a Poisson equation constructed from a diffusion and a source term:
vars = {u[x, y], {x, y}};
NDEigenvalues[{DiffusionPDETerm[vars] - SourcePDETerm[vars, 1], DirichletCondition[u[x, y] == 0, True]}, u, {x, y}∈Disk[], 5]helmholtzModel[vars_, k_] := DiffusionPDETerm[vars, 1] + ReactionPDETerm[vars, k]Solve the Helmholtz equation with a source term:
vars = {u[x, y], {x, y}};
NDSolveValue[{helmholtzModel[vars, 4] == SourcePDETerm[vars, 1], DirichletCondition[u[x, y] == 0, True]}, u[x, y], {x, y}∈Disk[]]Plot3D[%, {x, y}∈Disk[]]Related Guides
History
Text
Wolfram Research (2020), SourcePDETerm, Wolfram Language function, https://reference.wolfram.com/language/ref/SourcePDETerm.html.
CMS
Wolfram Language. 2020. "SourcePDETerm." Wolfram Language & System Documentation Center. Wolfram Research. https://reference.wolfram.com/language/ref/SourcePDETerm.html.
APA
Wolfram Language. (2020). SourcePDETerm. Wolfram Language & System Documentation Center. Retrieved from https://reference.wolfram.com/language/ref/SourcePDETerm.html
BibTeX
@misc{reference.wolfram_2026_sourcepdeterm, author="Wolfram Research", title="{SourcePDETerm}", year="2020", howpublished="\url{https://reference.wolfram.com/language/ref/SourcePDETerm.html}", note=[Accessed: 13-June-2026]}
BibLaTeX
@online{reference.wolfram_2026_sourcepdeterm, organization={Wolfram Research}, title={SourcePDETerm}, year={2020}, url={https://reference.wolfram.com/language/ref/SourcePDETerm.html}, note=[Accessed: 13-June-2026]}