blocku_x

Extends from PDE.Icons.BlockIcon2.

Information

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

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, drop the higher-oder terms and set s = -1 to obtain

where h = xi+1 - xi (for i = 0,..., n-1). We assume here that the grid points are spaced equally.
For the boundary point x1 we use biased formula and obtain

By using the same idea we obtain a biased formula for the boundary point xn

Release Notes:

    Parameters

    TypeNameDefaultDescription
    IntegermethodworldModel1.qss
    IntegernworldModel1.n
    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_xCD4B4der5_1
    PDE.MOL.SpaceDerivative.SDInterfaces.u_xCD2B2der1
    PDE.MOL.SpaceDerivative.SDInterfaces.u_xCD6B6cD6B6_1