This package contains FluxLimited block that computes fluxes at each cell interface.
Release Notes:
| Name | Description |
|---|---|
PDE.FiniteVolume.FluxLimiter.FluxLimited.FluxLimited
Computes the j-th flux matrix FluxLimited at each interface from the j-th eigenvalue j-th lambda and the j-th wave matrix j-th Waves.
Only one term in the above sum is computed. To obtain the complete sum, m FluxLimited blocks are needed. At the end all FluxLimited blocks must be summed.
Release Notes:
| Type | Name | Default | Description |
|---|---|---|---|
| Integer | n | worldModel1.n | |
| Integer | m | worldModel1.m | |
| Integer | gcl | worldModel1.gcl | |
| Integer | gcr | worldModel1.gcr | |
| Real | deltat | worldModel1.deltat | |
| Real | deltax | 1/n | |
| Integer | p | 1 |
| Type | Name | Description |
|---|---|---|
| input RealInput | u | |
| input RealInput | u1[worldModel1.m, worldModel1.n + 1] | |
| output RealOutput | y[worldModel1.m, worldModel1.n + 1] |
block FluxLimited
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;
parameter Real deltat = worldModel1.deltat;
parameter Real deltax = 1/n;
parameter Integer p = 1;
equation
for j in 1:n+1 loop
for i in 1:m loop
y[i, j] = 0.5*abs(u)*(1-(deltat/deltax)*abs(u))*u1[i, j];
end for;
end for;
public
Modelica.Blocks.Interfaces.RealInput u;
Modelica.Blocks.Interfaces.RealInput u1[worldModel1.m,worldModel1.n
+ 1];
Modelica.Blocks.Interfaces.RealOutput y[worldModel1.m,worldModel1.n
+ 1];
end FluxLimited;