MassTransportPDEComponent

MassTransportPDEComponent[vars,pars]

yields a mass transport PDE term with variables vars and parameters pars.

Details

  • MassTransportPDEComponent returns a sum of differential operators to be used as a part of partial differential equations:
  • MassTransportPDEComponent models the generation and propagation of diluted mass species in physical systems such as mixtures, solutions and solids by mechanisms of diffusion or convection.
  • MassTransportPDEComponent models are applicable when the concentration of the diluted species is at least one order of magnitude less than the concentration of the solvent.
  • MassTransportPDEComponent models mass transport phenomena with dependent variable in [TemplateBox[{InterpretationBox[, 1], {"mol", , "/", , {"m", ^, 3}}, moles per meter cubed, {{(, "Moles", )}, /, {(, {"Meters", ^, 3}, )}}}, QuantityTF]], independent variables in [TemplateBox[{InterpretationBox[, 1], "m", meters, "Meters"}, QuantityTF]] and time variable in [TemplateBox[{InterpretationBox[, 1], "s", seconds, "Seconds"}, QuantityTF]].
  • Stationary variables vars are vars={c[x1,,xn],{x1,,xn}}.
  • Time-dependent variables vars are vars={c[t,x1,,xn],t,{x1,,xn}}.
  • MassTransportPDEComponent provides both a conservative model to be used with compressible fluids and a non-conservative model to be used with incompressible fluids.
  • 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:
  • The non-conservative stationary mass transport PDE term is given by:
  • The implicit default boundary condition for the non-conservative model is a MassOutflowValue.
  • The conservative stationary mass transport PDE term is given by:
  • The implicit default boundary condition for the conservative model is a MassImpermeableBoundaryValue.
  • The difference between the non-conservative and the conservative models is the treatment of a convection velocity .
  • The non-conservative model is the default model. The conservative model should be used when the divergence of convection velocity is nonzero.
  • The units of the mass transport PDE terms are in [TemplateBox[{InterpretationBox[, 1], {"mol", , "/(", , {"m", ^, 3}, , "s", , ")"}, moles per meter cubed second, {{(, "Moles", )}, /, {(, {{"Meters", ^, 3},  , "Seconds"}, )}}}, QuantityTF]].
  • The following model parameters pars can be given:
  • parameterdefaultsymbol
    "MassConvectionVelocity", flow velocity [TemplateBox[{InterpretationBox[, 1], {"m", , "/", , "s"}, meters per second, {{(, "Meters", )}, /, {(, "Seconds", )}}}, QuantityTF]]
    "DiffusionCoefficient"IdentityMatrix, mass diffusivity [TemplateBox[{InterpretationBox[, 1], {{"m", ^, 2}, , "/", , "s"}, meters squared per second, {{(, {"Meters", ^, 2}, )}, /, {(, "Seconds", )}}}, QuantityTF]]
    "MassReactionRate"0, mass reaction rate in [1/TemplateBox[{InterpretationBox[, 1], "s", seconds, "Seconds"}, QuantityTF]]
    "MassSource"0, mass source [TemplateBox[{InterpretationBox[, 1], {"mol", , "/(", , {"m", ^, 3}, , "s", , ")"}, moles per meter cubed second, {{(, "Moles", )}, /, {(, {{"Meters", ^, 3},  , "Seconds"}, )}}}, QuantityTF]]
    "ModelForm""NonConservative"
    "RegionSymmetry"None
  • All parameters may depend on any of , and , as well as other dependent variables.
  • The number of independent variables determines the dimensions of and the length of .
  • The mass convection velocity specifies the velocity with which a fluid transports mass.
  • A mass reaction term models mass chemical reactions of masses.
  • A mass source models mass that is generated (positive) or absorbed (negative).
  • Possible choices for the parameter "ModelForm" are "Conservative" and "NonConservative".
  • A possible choice for the parameter "RegionSymmetry" is "Axisymmetric".
  • "Axisymmetric" region symmetry represents a truncated cylindrical coordinate system where the cylindrical coordinates are reduced by removing the angle variable as follows:
  • dimensionreductionnon-conservative equation
    1D
    2D
  • dimensionreductionconservative equation
    1D
    2D
  • The input specification for the parameters is exactly the same as for their corresponding operator terms.
  • Coupled equations can be generated with the same input specification as with the corresponding operator terms.
  • If no parameters are specified, the default mass transport PDE is:
  • (partialc(t,x))/(partialt)+ del .(-del c(t,x))^(︷^(          diffusive term        ))

  • If the MassTransportPDEComponent depends on parameters that are specified in the association pars as ,keypi,pivi,], the parameters are replaced with .

Examples

open allclose all

Basic Examples  (3)

Define a time-dependent mass transport model:

Set up a time-dependent mass transport model with particular material parameters:

Model a 1D chemical species field in an incompressible fluid whose right side and left side are subjected to a mass concentration and inflow condition, respectively:

 del .(-d del c(x))+v^->.del c(x)^(︷^(           mass transport model              )) =|_(Gamma_(x=0))q(x)^(︷^( mass flux value  ))

Set up the stationary mass transport model variables vars:

Set up a region :

Specify the mass transport model parameters species diffusivity and fluid flow velocity :

Specify a species flux boundary condition:

Specify a mass concentration boundary condition:

Set up the equation:

Solve the PDE:

Visualize the solution:

Scope  (23)

Basic Usage  (9)

Set up a time-dependent mass transport model with numeric material parameters:

Define a 2D stationary mass transport model:

Set up a 2D stationary mass transport model with an orthotropic mass diffusion:

Set up a 2D stationary mass transport model with a diffusivity matrix:

Set up a 2D stationary mass transport model with an anisotropic diffusivity matrix:

Define a 2D stationary mass transport model with a material change:

Define a 2D stationary mass transport model with a material change and an anisotropic material:

Set up a coupled 2D stationary mass transport model:

Set up a coupled 2D transient mass transport model with cross-coupled nonlinear reaction terms:

1D  (1)

Model a 1D chemical species field in an incompressible fluid whose right side and left side are subjected to a mass concentration and inflow condition, respectively:

 del .(-d del c(x))+v^->.del c(x)^(︷^(           mass transport model              )) =|_(Gamma_(x=0))q(x)^(︷^( mass flux value  ))

Set up the stationary mass transport model variables vars:

Set up a region :

Specify the mass transport model parameters species diffusivity and fluid flow velocity :

Specify a species flux boundary condition:

Specify a mass concentration boundary condition:

Set up the equation:

Solve the PDE:

Visualize the solution:

1D Axisymmetric  (3)

Define a 1D axisymmetric stationary mass transport model:

Define a 1D axisymmetric conservative stationary mass transport model:

Define a Lamm equation:

Look at the activated and simplified form of the equation:

2D  (2)

Model mass transport of a pollutant in a 2D rectangular region in an isotropic homogeneous medium. Initially, the pollutant concentration is zero throughout the region of interest. A concentration of 3000 is maintained at a strip with dimension 0.2 located at the center of the left boundary, while the right boundary is subject to a parallel species flow with a constant concentration of 1500 , allowing for mass transfer. A pollutant outflow of 100 is applied at both the top and bottom boundaries. A diffusion coefficient of 0.833 is distributed uniformly with a uniform horizontal velocity of 0.01 :

 del .(-d del c(x,y))+v^->.del c(x,y)^(︷^(           mass transport model              )) =|_(Gamma_(y=0, y=10))q(x,y)^(︷^(    mass flux value     ))+|_(Gamma_(x=20))h (c_(ext)(x,y)-c(x,y))^(︷^(         mass transfer value       ))

Set up the mass transport model variables vars:

Set up a rectangular domain with a width of and a height of :

Specify model parameters species diffusivity and fluid flow velocity :

Set up a species concentration source of 0.2 in length at the center of the left surface:

Set up a mass transfer boundary on the right surface:

Set up an outflow flux of on the top and bottom surfaces:

Set up the equation:

Solve the PDE:

Visualize the solution:

Symmetry boundaries can be used to reduce the size of the geometry of the model. Set up a mass transport equation:

Set up and visualize a region:

Solve and visualize the equation:

Set up a region about the symmetry axis at :

Solve and visualize the equation with a symmetry boundary at :

2D Axisymmetric  (2)

Define a 2D axisymmetric stationary mass transport model:

Define a 2D axisymmetric conservative stationary mass transport model:

3D  (1)

Model a non-conservative chemical species field in a unit cubic domain, with two mass conditions at two lateral surfaces and a mass inflow through a circle with radius 0.2 at the center of the top surface, as well as an orthotropic mass diffusivity :

 del .(-d del c(x,y,z))+v^->.del c(x,y,z)^(︷^(                              mass transport model                        )) =|_(Gamma_(z=1& (x-0.5)^2+(y-0.5)^2<=0.04))q(x,y,z)^(︷^(                          mass flux value                      ))

Set up the mass transport model variables vars:

Set up a region :

Specify a diffusivity and a flow velocity field :

Specify mass concentrations:

Specify a flux condition of through a regional circle on the top surface:

Set up the equation:

Solve the PDE:

Visualize the solution:

Material Regions  (1)

Model a 1D chemical species transport through different material with a reaction rate in one. The right side and left side are subjected to a mass concentration and inflow condition, respectively:

 del .(-d del c(x))+a c(x)^(︷^(           mass transport model              )) =|_(Gamma_(x=0))q(x)^(︷^( mass flux value  ))

Set up the stationary mass transport model variables vars:

Set up a region :

Specify the mass transport model parameters species diffusivity and a reaction rate active in the region :

Specify a species flux boundary condition:

Specify a mass concentration boundary condition:

Set up the equation:

Solve the PDE:

Visualize the solution:

Time Dependent  (1)

Model a 1D non-conservative chemical species field and a mass flux through part of the boundary with:

 (partialc(t,x))/(partialt)+del .(-d del c(t,x))^(︷^(          diffusion term        )) +v^->.del c(t,x)^(︷^(  convection term)) =|_(Gamma_(x=0))q(t,x)^(︷^( mass flux term))

Set up the time-dependent mass transport model variables vars:

Set up a region :

Specify the mass transport model parameters mass diffusivity and mass convection velocity :

Set up the equation with a mass flux of at the left end for the first 50 seconds:

Solve the PDE with an initial condition of a zero concentration:

Visualize the solution:

Nonlinear Time Dependent  (1)

Model a 1D non-conservative chemical species field with a nonlinear diffusivity coefficient and an outflow condition through part of the boundary, which is expressed as follows:

 (partialc(t,x))/(partialt)+del .(-d del c(t,x))^(︷^(          diffusion term       )) +v^->.del c(t,x))^(︷^(  convection term)) =|_(Gamma_(x=0.2))q(t,x)^(︷^( mass flux term ))

Set up the mass transport model variables vars:

Set up a region :

Specify the nonlinear species diffusivity and fluid flow velocity :

Specify an outflow flux of applied at the right end:

Specify a time-dependent mass concentration surface condition:

Set up an initial condition:

Set up the equation:

Solve the PDE:

Visualize the solution:

Coupled Time Dependent  (2)

Model a 1D coupled non-conservative dual chemical species field with corresponding mass flux through the left parts of the boundary:

 (partialc_1(t,x))/(partialt)+del .(-d_(11) del c_1(t,x))^(︷^(             mass transport model                  )) =|_(Gamma_(x=0))q_1(t,x)^(︷^(    mass flux value     ))

 (partialc_2(t,x))/(partialt)+del .(-d_(22) del c_2(t,x))^(︷^(             mass transport model                  )) =|_(Gamma_(x=0))q_2(t,x)^(︷^(    mass flux value     ))

Set up the time-dependent mass transport model variables vars for the and species, respectively:

Set up a uniform region :

Specify the mass transport model parameters mass diffusivity and for the and species:

Set up the boundary conditions with a mass flux of 4 and 8 for and at the left end for the first 50 seconds:

Set up the equation:

Set up initial conditions:

Solve the PDEs:

Visualize the solution:

Model a 1D coupled chemical species field with a convection velocity and a mass flux through the left boundary:

 (partialc_1(t,x))/(partialt)+del .(-d_(11) del c_1(t,x))+v^->.del c_1(t,x)^(︷^(                                        mass transport model                               )) =|_(Gamma_(x=0))q_1(t,x)^(︷^(    mass flux value     ))

 (partialc_2(t,x))/(partialt)+del .(-d_(22) del c_2(t,x))+v^->.del c_2(t,x)^(︷^(                                       mass transport model                                  )) =|_(Gamma_(x=0))q_2(t,x)^(︷^(    mass flux value     ))

Set up the time-dependent mass transport model variables vars for the and species, respectively:

Set up a uniform region :

Specify the mass transport model parameters mass diffusivity and for the and species:

Set up the equation with a mass flux of 6 and 12 for and at the left end for the first 50 seconds:

Set up the equation:

Set up initial conditions:

Solve the PDEs:

Visualize the solution:

Applications  (7)

Single Equations  (4)

This mass transport model describes the sedimentation and diffusion of a solute under ultracentrifugation in a disk sector cell. The governing equation for describing this phenomenon is called the Lamm equation, which can be modeled with a 1D axisymmetric conservative mass transport equation:

Set up the mass transport model variable vars:

Set up a line region where denotes the radial position of the air-solution meniscus, which is formed during the centrifugation process, and the radial position of the cell bottom:

Specify the model parameter's species diffusivity in  [cm^2/s] and fluid flow velocity , where is the sedimentation coefficient in seconds () and the angular velocity in :

Set up the parameters with an initial unity concentration:

Set up the initial conditions:

The flux is zero at both boundaries of the domain, so the boundary condition used is the MassImpermeableBoundaryValue that is applied at .This specific boundary is the implicit default boundary condition for the conservative model.

Set up the equation:

Solve the PDE:

Visualize the concentrations at various points in time:

Model mass transport of a pollutant in a 2D rectangular region in an isotropic homogeneous medium. Initially, the pollutant concentration is zero throughout the region of interest. A concentration of 3000 is maintained at a strip with dimension 0.2 located at the center of the left boundary, while a pollutant outflow of 100 is applied at both the top and bottom boundaries. A diffusion coefficient of 0.833 is distributed uniformly, but both horizontal and vertical velocity are spatial dependent:

 del .(-d del c(x,y))+v^->.del c(x,y)^(︷^(           mass transport model              )) =|_(Gamma_(y=0, y=10))q(x,y)^(︷^(    mass flux value     ))

Set up the mass transport model variables vars:

Set up a rectangular domain with a width of and a height of :

Specify the model parameters species diffusivity and fluid flow velocity :

Set up a species concentration source of 0.2 length at the center of the left surface:

Set up an outflow flux of on the top and bottom surfaces:

Set up the equation:

Solve the PDE:

Visualize the solution:

Set up a FokkerPlanck equation:

(partialc(t,x))/(partialt)+ del .((0 0; 0 -d) del c(x)+(y ; 2 xi omega y+x )c(x))^(︷^(      mass transport model    )) =0

Set up the mass transport model variables vars:

Set up a rectangular domain:

Specify the model parameters species diffusivity , the convection velocity term and parameters:

Set up the initial condition:

Set up the equation:

In this case, a first-order mesh is sufficient to solve the FokkerPlanck equation. Using a higher mesh order will result in an increased memory consumption. While solving, NDSolve will warn about the convection-dominant nature of the PDE:

Visualize the expected solution at the point {0,0}:

The Smoluchowski diffusion equation is a special case of the FokkerPlank equation. Both equations can be modeled with a conservative mass transport equation:

(partialc(t,x))/(partialt)+ del .(-d del c(x)+beta F(x))^(︷^(      mass transport model    )) =0

Set up the mass transport model variables vars:

Set up a line domain with a width of 8 units:

Specify the model parameters species diffusivity and a migration term that depends on a linear potential U(x) that relates to F(x) with F(x)=-xU(x):

Set up the known analytical solution:

Set up the initial conditions at from the analytical solution:

Set up the equation:

Solve the PDE:

Visualize the solution:

Plot the error at :

Coupled Equations  (3)

Solve a coupled heat and mass transport model:

(partialT(t, x))/(partialt)+del .(-k del Theta(t,x))-Q^(︷^(                  heat transfer model                  ))  = 0; (partialc(t,x))/(partialt)+del .(-d del c(t,x))-R^(︷^(                mass transport model                ))  = 0

Set up the heat transfer mass transport model variables vars:

Set up a region :

Specify heat transfer and mass transport model parameters, heat source , thermal conductivity , mass diffusivity and mass source :

Set up the model and initial conditions:

Set up initial conditions:

Solve the model:

Visualize the solution:

Solve a coupled heat transfer and mass transport model with a thermal transfer value and a mass flux value on the boundary:

(partialT(t, x))/(partialt)+del .(-k del Theta(t,x))-Q^(︷^(                      heat transfer model                         ))  = |_(Gamma_(x=1))h (Theta_(ext)(t,x)-Theta(t,x))^(︷^(             heat transfer boundary      )); (partialc(t,x))/(partialt)+del .(-d del c(t,x))-R^(︷^(                      mass transport model                         ))  = |_(Gamma_(x=0||x=1))q (t,x)^(︷^(  mass flux boundary ))

Set up the heat transfer mass transport model variables vars:

Set up a region :

Specify heat transfer and mass transport model parameters, heat source , thermal conductivity , mass diffusivity and mass source :

Specify boundary condition parameters for a thermal convection value with an external flow temperature of 1000 K and a heat transfer coefficient of :

Specify the equation:

Set up initial conditions:

Solve the model:

Visualize the solution:

A numeric cyclic voltammetry can be performed by solving a coupled reaction model:

(partialc_A(t, x))/(partialt)+del .(-d_A del c_A(t,x))^(︷^(                mass transport model                ))  = |_(Gamma_(x=0))k_cc_A (t,x)-k_ac_B(t,x)^(︷^(            mass transfer boundary          )); (partialc_B(t,x))/(partialt)+del .(-d_B del c_B(t,x))^(︷^(                mass transport model                ))  = |_(Gamma_(x=0))k_ac_B (t,x)-k_cc_A(t,x)^(︷^(            mass transfer boundary          ))

The underlying reaction model is given by

and ButlerVolmer kinetics.

Set up the mass transport model variables vars:

Set up a region :

Specify material parameters:

Specify the electrochemical rate constants:

Specify the potential:

Specify mass transport model parameters, mass diffusivity and . The concentration of at the far end is set to the bulk concentration and the concentration of is set to 0:

Set up the model:

Set up initial conditions such that only is in bulk solution:

Solve the model:

Visualize the concentrations at various points in time:

Visualize the cyclic voltammogram at various points in time:

Properties & Relations  (1)

Model a 1D chemical species field once with a conservative model and once with a non-conservative model. For a constant velocity flow field, both models return the same result. The right side and left side are subjected to a mass concentration and inflow conditions, respectively:

 del .(-d del c(x)+v^->.c(x))^(︷^(   conservative mass transport model  )) =|_(Gamma_(x=0))q(x)^(︷^( mass flux value  ))

 del .(-d del c(x))+v^->.del c(x)^(︷^(   non-conservative mass transport model  )) =|_(Gamma_(x=0))q(x)^(︷^( mass flux value  ))

Set up the stationary mass transport model variables vars:

Set up a region :

Specify the mass transport model parameters species diffusivity and fluid flow velocity :

Specify mass concentration boundary condition:

Specify species flux boundary condition:

Set up the equation:

Solve the PDE:

Visualize that the difference in the solutions is minimal:

Possible Issues  (2)

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:

 del .(-d del c(x,y))+v^->.del c(x,y)^(︷^(           mass transport model              )) =|_(Gamma_(y=0, y=10))q(x,y)^(︷^(    mass flux value     ))

 del .(-d del c(x,y))+del v^->.c(x,y)^(︷^(                  mass transport model                      )) =|_(Gamma_(y=0, y=10))q(x,y)^(︷^(    mass flux value     ))

Set up the mass transport model variables vars:

Set up a rectangular domain:

Specify the model parameters species diffusivity and fluid flow velocity :

Set up a species concentration source of 0.2 length at the center of the left surface:

Set up an outflow flux of on the top and bottom surfaces:

Since the default boundary condition for a conservative model is an impermeable boundary, an impermeable boundary condition is added to the non-conservative mode:

Set up the equation:

Solve the PDEs:

Visualize the difference in the solutions:

The scale of the differences in the solutions is expected and comes from numerical differences in how the operators are computed.

When a discretized region is given and the mesh does not meet the quality criteria for a large convection-to-diffusion ratio, a message is generated. Model a 1D non-conservative chemical species field with a high convection velocity to diffusivity ratio, expressed as follows:

 (partialc(t,x))/(partialt)+del .(-d del c(t,x))^(︷^(          diffusion term       )) +v^->.del c(t,x))^(︷^(  convection term)) =|_(Gamma_(x=0.2))q(t,x)^(︷^( mass flux term ))

Set up the mass transport model variables vars:

Set up a region :

Specify a nonlinear species diffusivity and fluid flow velocity :

Specify an outflow flux of applied at the right end:

Specify mass concentration surface conditions:

Set up an initial condition:

Set up the equation:

Solve the PDE with a refined mesh:

Wolfram Research (2020), MassTransportPDEComponent, Wolfram Language function, https://reference.wolfram.com/language/ref/MassTransportPDEComponent.html (updated 2021).

Text

Wolfram Research (2020), MassTransportPDEComponent, Wolfram Language function, https://reference.wolfram.com/language/ref/MassTransportPDEComponent.html (updated 2021).

CMS

Wolfram Language. 2020. "MassTransportPDEComponent." Wolfram Language & System Documentation Center. Wolfram Research. Last Modified 2021. https://reference.wolfram.com/language/ref/MassTransportPDEComponent.html.

APA

Wolfram Language. (2020). MassTransportPDEComponent. Wolfram Language & System Documentation Center. Retrieved from https://reference.wolfram.com/language/ref/MassTransportPDEComponent.html

BibTeX

@misc{reference.wolfram_2024_masstransportpdecomponent, author="Wolfram Research", title="{MassTransportPDEComponent}", year="2021", howpublished="\url{https://reference.wolfram.com/language/ref/MassTransportPDEComponent.html}", note=[Accessed: 05-November-2024 ]}

BibLaTeX

@online{reference.wolfram_2024_masstransportpdecomponent, organization={Wolfram Research}, title={MassTransportPDEComponent}, year={2021}, url={https://reference.wolfram.com/language/ref/MassTransportPDEComponent.html}, note=[Accessed: 05-November-2024 ]}