dsolve/numeric/spatialDistributionfind numerical solution of transport equation (PDE) using spatialDistribution operator
Calling SequenceParametersDescription
<Text-field style="Heading 2" layout="Heading 2" bookmark="usage">Calling Sequence</Text-field>
dsolve(SDsys, numeric, options)
<Text-field style="Heading 2" layout="Heading 2" bookmark="bkmrk0">Parameters</Text-field>SDsys-set or list; ordinary differential or differential-algebraic equation(s) containing spatialDistribution operatorsnumeric-name; instruct dsolve to find a numerical solutionoptions-(optional) equations of the form keyword = value
<Text-field style="Heading 2" layout="Heading 2" bookmark="info">Description</Text-field>
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
where:
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):
'SDmaxpts'=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 Alsodsolve[numeric,delay]dsolve[numeric]plots[odeplot]