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
| Type | Name | Default | Description |
|---|---|---|---|
| Integer | method | worldModel1.qss | |
| Integer | n | worldModel1.n | |
| 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_xCD4B4 | der5_1 | ||
| PDE.MOL.SpaceDerivative.SDInterfaces.u_xCD2B2 | der1 | ||
| PDE.MOL.SpaceDerivative.SDInterfaces.u_xCD6B6 | cD6B6_1 |