blocku_xx

Extends from Icons.BlockIcon3.

Information

The u_xx block computes the second-order space derivative. By using the Newton-Gregory backward polynomial we
obtain

where h = xi+1 - xi (for i = 0,..., n-1). We assume here that the grid points are spaced equally.
If we wish a second-order central difference approximation, we need to fit the polynomial through the three points
xi-1, xi, xi+1. This means to write the polynomial for example around the point xi+1 and drop the higher-oder terms to obtain

and finally, to evaluate the second-order space derivative around the point xi we need to set s = -1 to get

The second-order central difference scheme is implemented in u_xxCD2B2 block.
By following the same approach we can compute the fourth-order central difference scheme. This time we need more terms in the polynomial

and so we obtain

for the boundary points we use a biased formula and we obtain

Release Notes:

    Parameters

    TypeNameDefaultDescription
    IntegernworldModel1.n
    Integeru_xxworldModel1.u_xx
    Integerbcl0|Boundary Conditions| Type of the boundary condition at the left (-1:symmtery; 0: none)
    Integerbcr0|Boundary Conditions| Type of the boundary condition at the right (-1:symmtery; 0: none)

    Connectors

    TypeNameDefaultDescription
    Modelica.Blocks.Interfaces.RealInput[worldModel1.n]u
    Modelica.Blocks.Interfaces.RealOutput[worldModel1.n]y

    Components

    TypeNameDefaultDescription
    PDE.World.worldModelworldModel1
    PDE.MOL.SpaceDerivative.SDInterfaces.u_xxCD2B2u_xxCD2B2_1
    PDE.MOL.SpaceDerivative.SDInterfaces.u_xxCD4B4derivatorSecond