STW

Port-based approach of complex distributed-parameter system models for analysis and simulation (PACDAS, STW-TWI.6012)

Univ. Twente

Some early test examples of the DTF code

The DTF, using a piece-wise cubic approximation, can be used to study various non-linear problems with various boundary conditions. The code have been developed in collaboration with LAGEP in Lyon. Conservation laws are hard-wired into the method, which should guarantee stability (except for the time-stepping algorithm which is Eulerian).

First, the wave equation was investigated, since hyperbolic problems are unstable, and the linear case has simple solutions (g(vt+x) + f(vt-x)) to compare the results with. To keep numerically the pulse-shape invariant for a system not based on scattering variables (and suitable for non-linear problems) is highly nontrivial, however, it works pretty well. Both the "charge" and the "flux" are depicted, corresponding to the states of potential and kinetic energy. (click on the picture to see the animation)

Simulation 1

We now add a small mass bump on the left side and look at the wave distortion:


Simulation 2

The same code can be reused for diffusion problems: (with effort=0 (pressure=0) boundaries, and, in this case, flow=0 boundaries)


Simulation 3

or with mixed boundary conditions:


Simulation 4

or with an in-flow from the right:


Simulation 4

In the case of an oscillatory pressure at one end, the oscillations have only a limited range into the system:

Simulation 5

The time-stepping for the wave problem must be pretty small, since the segment size divided by the time step must be much larger than the wave velocity. The diffusion is inherently stable; the time step can be larger.

Depending on the step-size, the pulse will deteriorate in a couple of 10 000 to a million time steps. One can see the onset of the detoriation in the tail of the pulse, in the first simulation. This could be could be cured by adding a small diffusive term or having a smoother pulse or periodic signal, however, that would defy the purpose of trying to keep an invariant pulse shape, and testing the code "as is." Here is an simulation of 500 000 time steps (280 kB) where one can see the signal loss. The first crime of Numerical Analysis plays up: never differentiate a numerical approximation to a function; it is unstable. However, the advantages of using the differential form of dynamical equations are clear: conservation laws are local and exact. We can improve the stability of the algorithm by including a smoothing step. If the smoothing step is included in the variational part of the dynamical laws, i.e., the V(Q) and J(j) relations, the conservation laws are retained. It would correspond to an instantaneous diffusion of state variables.

(The pictures are black-and-white histogram plots since in that case the animated gif of 500x410x50 still has a very limited size of about 50 kB).


Back to the PACDAS project page