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
| Type | Name | Default | Description |
|---|---|---|---|
| Integer | n | worldModel1.n | |
| Integer | u_xx | worldModel1.u_xx | |
| Integer | bcl | 0 | |Boundary Conditions| Type of the boundary condition at the left (-1:symmtery; 0: none) |
| Integer | bcr | 0 | |Boundary Conditions| Type of the boundary condition at the right (-1:symmtery; 0: none) |
Connectors
| Type | Name | Default | Description |
|---|---|---|---|
| Modelica.Blocks.Interfaces.RealInput[worldModel1.n] | u | ||
| Modelica.Blocks.Interfaces.RealOutput[worldModel1.n] | y |
Components
| Type | Name | Default | Description |
|---|---|---|---|
| PDE.World.worldModel | worldModel1 | ||
| PDE.MOL.SpaceDerivative.SDInterfaces.u_xxCD2B2 | u_xxCD2B2_1 | ||
| PDE.MOL.SpaceDerivative.SDInterfaces.u_xxCD4B4 | derivatorSecond |