MassImpermeableBoundaryValue[pred,vars,pars]
represents a mass impermeable boundary condition for PDEs with predicate pred indicating where it applies, with model variables vars and global parameters pars.
MassImpermeableBoundaryValue[pred,vars,pars,lkey]
represents a mass impermeable boundary condition with local parameters specified in pars[lkey].
MassImpermeableBoundaryValue
MassImpermeableBoundaryValue[pred,vars,pars]
represents a mass impermeable boundary condition for PDEs with predicate pred indicating where it applies, with model variables vars and global parameters pars.
MassImpermeableBoundaryValue[pred,vars,pars,lkey]
represents a mass impermeable boundary condition with local parameters specified in pars[lkey].
Details
- MassImpermeableBoundaryValue specifies a boundary condition for MassTransportPDEComponent and is used as part of the modeling equation:
- MassImpermeableBoundaryValue is typically used to model a mass species impermeable boundary.
- MassImpermeableBoundaryValue models a boundary where there is no mass species flux across it with dependent variable
in [
], independent variables
in [
] and time variable
in [
]. - Stationary variables vars are vars={c[x1,…,xn],{x1,…,xn}}.
- Time-dependent variables vars are vars={c[t,x1,…,xn],t,{x1,…,xn}}.
- The non-conservative time-dependent mass transport model MassTransportPDEComponent is based on a convection-diffusion model with mass diffusivity
, mass convection velocity vector
, mass reaction rate
and mass source term
: - The conservative time-dependent mass transport model MassTransportPDEComponent is based on a conservative convection-diffusion model given by:
- In the non-conservative form, MassImpermeableBoundaryValue with boundary unit normal
models: - In the conservative form, MassImpermeableBoundaryValue models:
- A MassImpermeableBoundaryValue is the implicit default boundary condition for the conservative model form.
- Model parameters pars as specified for MassTransportPDEComponent.
- The following additional model parameters pars can be given:
-
parameter default symbol "BoundaryUnitNormal" Automatic 
"ModelForm" "NonConservative" 
- MassImpermeableBoundaryValue is a special case of MassFluxValue where the mass flux
is 0. - MassImpermeableBoundaryValue evaluates to a NeumannValue.
- The boundary predicate pred can be specified as in NeumannValue.
- If the MassImpermeableBoundaryValue depends on parameters
that are specified in the association pars as …,keypi…,pivi,…, the parameters
are replaced with
.
Examples
open all close allBasic Examples (1)
Set up an impermeable boundary condition for a conservative model:
MassImpermeableBoundaryValue[x == 0, {c[x, y], {x, y}}, <|"ModelForm" -> "Conservative", "MassConvectionVelocity" -> {1, 1}|>]Set up an impermeable boundary condition for a non-conservative model:
MassImpermeableBoundaryValue[x == 0, {c[x, y], {x, y}}, <|"ModelForm" -> "NonConservative", "MassConvectionVelocity" -> {1, 1}|>]Scope (3)
Define model variables vars for a transient acoustic pressure field with model parameters pars and a specific boundary condition parameter:
vars = {c[t, x, y], t, {x, y}};
pars = <|"DiffusionCoefficient" -> 0.026, "MassConvectionVelocity" -> {0.1}, "BoundaryCondition1" -> <||>|>;
MassImpermeableBoundaryValue[x == 1, vars, pars, "BoundaryCondition1"]Define model variables vars for a transient acoustic pressure field with model parameters pars and multiple specific parameter boundary conditions:
vars = {c[t, x, y], t, {x, y}};
pars = <|"DiffusionCoefficient" -> 0.026, "MassConvectionVelocity" -> {0.1}, "BoundaryCondition1" -> <||>, "BoundaryCondition2" -> <||>|>;MassImpermeableBoundaryValue[x == 0, vars, pars, "BoundaryCondition1"]MassImpermeableBoundaryValue[x == 1, vars, pars, "BoundaryCondition2"]The implicit default boundary condition changes depending on the model form. For a conservative model, an implicit Neumann 0 boundary condition is equivalent to specifying an impermeable boundary condition. For a non-conservative model, an implicit Neumann 0 boundary condition is equivalent to specifying an outflow boundary condition.
Considering this, for a constant velocity field, both the conservative and non-conservative models return the same result. A comparison between the conservative and non-conservative fields are conducted based on the following models:
Set up the mass transport model variables
:
vars = {c[x, y], {x, y}};Ω = Rectangle[{0, 0}, {2, 1}];Specify model parameters species diffusivity
and fluid flow velocity
:
pars1 = <|"DiffusionCoefficient" -> 1, "MassConvectionVelocity" -> {0.01, -0.02}|>;
pars2 = Join[pars1, <|"ModelForm" -> "Conservative"|>];Set up a species concentration source of 0.2
length at the center of the left surface:
Subscript[Γ, concentration1] = MassConcentrationCondition[x == 0 && 0.4 ≤ y ≤ 0.6, vars, pars1, <|"MassConcentration" -> 1|>]Subscript[Γ, concentration2] = MassConcentrationCondition[x == 0 && 0.4 ≤ y ≤ 0.6, vars, pars2, <|"MassConcentration" -> 1|>]Set up an outflow flux
of
on the top and bottom surfaces:
Subscript[Γ, flux1] = MassFluxValue[y == 0 || y == 10, vars, pars1, <|"MassFlux" -> -1|>]Subscript[Γ, flux2] = MassFluxValue[y == 0 || y == 10, vars, pars2, <|"MassFlux" -> -1|>]Specify impermeable boundary conditions on all other sides:
Subscript[Γ, imp1] = MassImpermeableBoundaryValue[y ≠ 0 && y ≠ 10 && !(x == 0 && 0.4 ≤ y ≤ 0.6), vars, pars1]Subscript[Γ, imp2] = MassImpermeableBoundaryValue[y ≠ 0 && y ≠ 10 && !(x == 0 && 0.4 ≤ y ≤ 0.6), vars, pars2]Since the default boundary condition for a conservative model is an impermeable boundary, an impermeable boundary condition is added to the non-conservative model.
eqn1 = {MassTransportPDEComponent[vars, pars1] == Subscript[Γ, flux1] + Subscript[Γ, imp1], Subscript[Γ, concentration1]};
eqn2 = {MassTransportPDEComponent[vars, pars2] == Subscript[Γ, flux2] + Subscript[Γ, imp2], Subscript[Γ, concentration2]};cfun1 = NDSolveValue[eqn1, c, {x, y}∈Ω];
cfun2 = NDSolveValue[eqn2, c, {x, y}∈Ω];Visualize the differences in the solutions:
ContourPlot[cfun1[x, y] - cfun2[x, y], {x, y}∈Ω, PlotLegends -> Automatic]Tech Notes
Related Guides
History
Text
Wolfram Research (2020), MassImpermeableBoundaryValue, Wolfram Language function, https://reference.wolfram.com/language/ref/MassImpermeableBoundaryValue.html.
CMS
Wolfram Language. 2020. "MassImpermeableBoundaryValue." Wolfram Language & System Documentation Center. Wolfram Research. https://reference.wolfram.com/language/ref/MassImpermeableBoundaryValue.html.
APA
Wolfram Language. (2020). MassImpermeableBoundaryValue. Wolfram Language & System Documentation Center. Retrieved from https://reference.wolfram.com/language/ref/MassImpermeableBoundaryValue.html
BibTeX
@misc{reference.wolfram_2026_massimpermeableboundaryvalue, author="Wolfram Research", title="{MassImpermeableBoundaryValue}", year="2020", howpublished="\url{https://reference.wolfram.com/language/ref/MassImpermeableBoundaryValue.html}", note=[Accessed: 13-June-2026]}
BibLaTeX
@online{reference.wolfram_2026_massimpermeableboundaryvalue, organization={Wolfram Research}, title={MassImpermeableBoundaryValue}, year={2020}, url={https://reference.wolfram.com/language/ref/MassImpermeableBoundaryValue.html}, note=[Accessed: 13-June-2026]}