Spatial Distribution - Maple Help
For the best experience, we recommend viewing online help using Google Chrome or Microsoft Edge.

Online Help

All Products    Maple    MapleSim


find numerical solution of transport equation (PDE) using spatialDistribution operator


Calling Sequence



Calling Sequence

dsolve(SDsys, numeric, options)




set or list; ordinary differential or differential-algebraic equation(s) containing spatialDistribution operators



name; instruct dsolve to find a numerical solution



(optional) equations of the form keyword = value



In Modelica, the spatialDistribution operator allows approximation of variable-speed transport of properties. This operator keeps track of the spatialDistribution of z(x, t), by suitable sampling, interpolation, and shifting of the stored distribution. The spatialDistribution operator allows to approximate efficiently the solution of the infinite-dimensional problem described by the PDE:

dz(x,t)/dt + v(t)dz(x,t)/dx = 0

z(0,t) = in0(t) if v >= 0

z(1,t) = in1(t) if v < 0



z(x,t) : transported quantity

x : normalized spatial coordinate (0<=x<=1)

t : time

v(t) = dx/dt : normalized transport velocity

in0(t), in1(t) : boundary conditions z(0,t), z(1,t)

out0, out1 : spatialDistribution solutions z(0,t), z(1,t)


The flattened spatialDistribution operator has the following arguments:

out0 = spatialDistribution(

           in0, in1,          # boundary conditions at time t

           x,                 # normalized spatial coordinate

           positiveVelocity,  # Is v(t) >= 0? truefalse

           initialPoints,     # Array of x values at time t0

           initialValues,     # Array of z values at time t0

           out1)              # output argument z(1,t)


Post-processing during Toolchain converts the above equation into an operator expression with two output arguments, i.e.:

spatialDistribution(in0, in1, x, positiveVelocity,

                   initialPoints, initialValues,

                   out0, out1)

where out0 and out1 are inplace outputs.


In addition to the options described in dsolve[numeric] and dsolve[Error_Control], systems containing spatialDistribution operators also have the following option(s):



positive integer


'SDmaxpts'= positive integer


This option specifies the maximum point storage to allocate when storing spatialDistribution data.


In the event that a requested spatialDistribution is so small as to be past the end of the last computed step, extrapolation using the interpolant of the last available step is used.


In the event that insufficient storage is allocated for a problem (in other words, if SDmaxpts was set too small), an error is returned (undefined).

See Also