.ModelicaReference.Operators.'spatialDistribution()'

spatialDistribution()

Information

The operator spatialDistribution allows the infinite-dimensional problem below to be solved efficiently with good accuracy

spatialdistribution.png
where z(x, t) is the transported quantity, x is the normalized spatial coordinate (0.0 ≤ x ≤ 1.0), t is the time, v(t) = der(x) is the normalized transport velocity and the boundary conditions are set at either x = 0.0 or x = 1.0, depending on the sign of the velocity.

Syntax

(out0, out1) = spatialDistribution(in0, in1, x, positiveVelocity,
                               initialPoints = {0.0, 1.0},
                               initialValues = {0.0, 0.0});

Description

Many applications involve the modelling of variable-speed transport of properties. One option to model this infinite-dimensional system is to approximate it by an ODE, but this requires a large number of state variables and might introduce either numerical diffusion or numerical oscillations. Another option is to use a built-in operator that keeps track of the spatial distribution of z⁢(x,t), by suitable sampling, interpolation, and shifting of the stored distribution. In this case, the internal state of the operator is hidden from the ODE solver.

See Section 3.7.2.2 of the Modelica Language Specification 3.4 for a more in-depth description and elaborate example.


Generated at 2025-06-06T18:20:43Z by OpenModelicaOpenModelica 1.25.0 using GenerateDoc.mos