This package contains Fluctuation block that computes positive and negative fluctuations at each cell interface.
Release Notes:
| Name | Description |
|---|---|
PDE.FiniteVolume.FluxLimiter.Fluctuations.Fluctuation
Computes two fluctuation matrices A+ and A- from j-th Waves matrix and j-th eigenvalue lambda.
Release Notes:
| Type | Name | Default | Description |
|---|---|---|---|
| Integer | n | worldModel1.n | |
| Integer | m | worldModel1.m | |
| Integer | gcl | worldModel1.gcl | |
| Integer | gcr | worldModel1.gcr |
| Type | Name | Description |
|---|---|---|
| input RealInput | u | |
| input RealInput | u1[worldModel1.m, worldModel1.n + 1] | |
| output RealOutput | y[worldModel1.m, worldModel1.n + 1] | |
| output RealOutput | y1[worldModel1.m, worldModel1.n + 1] |
block Fluctuation
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;
equation
if u > 0 then
for j in 1:n+1 loop
for i in 1:m loop
y[i, j] = u*u1[i, j];
y1[i, j] = 0;
end for;
end for;
elseif u < 0 then
for j in 1:n+1 loop
for i in 1:m loop
y1[i, j] = u*u1[i, j];
y[i, j] = 0;
end for;
end for;
else
for j in 1:n+1 loop
for i in 1:m loop
y[i, j] = 0;
y1[i, j] = 0;
end for;
end for;
end if;
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];
Modelica.Blocks.Interfaces.RealOutput y1[worldModel1.m,worldModel1.n
+ 1];
end Fluctuation;