This package offers a high resolution method, van Leer method, for solving linear constant-coefficient hyperbolic system of equations.
Release Notes:
| Name | Description |
|---|---|
PDE.FiniteVolume.FluxLimiter.HighResolutionMethods.vanLeer
The van Leer Method takes as input the teta matrix and gives as output the f(teta) matrix which has in the j-th row
and zeros in all other rows.
Release Notes:
| Type | Name | Default | Description |
|---|---|---|---|
| Integer | n | worldModel1.n | |
| Integer | m | worldModel1.m | |
| Integer | gcl | worldModel1.gcl | |
| Integer | gcr | worldModel1.gcr | |
| Integer | p |
| Type | Name | Description |
|---|---|---|
| input RealInput | u[worldModel1.m, worldModel1.n + 1] | |
| output RealOutput | y[worldModel1.m, worldModel1.n + 1] |
block vanLeer
extends Icons.BlockIcon;
outer PDE.World.worldModel worldModel1;
parameter Integer n = worldModel1.n;
parameter Integer m = worldModel1.m;
parameter Integer gcl = worldModel1.gcl;
parameter Integer gcr = worldModel1.gcr;
outer parameter Integer p;
equation
for j in 1:n+1 loop
for i in 1:p-1 loop
y[i, j] = 0.0;
end for;
end for;
for j in 1:n+1 loop
y[p, j] = (u[p, j] + abs(u[p, j]))/(1 + abs(u[p, j]));
end for;
for j in 1:n+1 loop
for i in p+1:m loop
y[i, j] = 0.0;
end for;
end for;
public
Modelica.Blocks.Interfaces.RealInput u[worldModel1.m,worldModel1.n +
1];
Modelica.Blocks.Interfaces.RealOutput y[worldModel1.m,worldModel1.n
+ 1];
end vanLeer;