This package contains integrator block that implements Method of Lines.
Release Notes:
| Name | Description |
|---|---|
PDE.MOL.Integrator.UniversalIntegrator
The integrator block accepts the equations of the form
where f is a function of u, u_xx, and so on. Once the equation is transformed in this form
we can construct the right part f and pass it to the input R of the integrator block.
The unknown varible u that we need for the construction of the right part of the equation is
provided by the Var output of the integrator block.
The initial condition is passed to the IC input, whereas the left and right boundary conditions are
passed to the BCL and BCR inputs respectively.
In the PDE->MOL->Examples Package many examples are implemented that show how to use the integrator block
Release Notes:
| Type | Name | Default | Description |
|---|---|---|---|
| Integer | n | worldModel1.n | |
| Unknowns | |||
| Integer | vb | 1 | The left most unknown |
| Integer | ve | worldModel1.n | The right most unknown |
| Initial Condition | |||
| Integer | icb | 1 | Begin of the initial condition |
| Integer | ice | worldModel1.n | End of the initial condition |
| Boundary Conditions | |||
| Integer | bcl | 0 | Boundary condition at the left (0: no; 1: yes) |
| Integer | bcr | 0 | Boundary condition at the right (0: no; 1: yes) |
| Type | Name | Description |
|---|---|---|
| input RealInput | u[worldModel1.n] | |
| output RealOutput | y[worldModel1.n] | |
| input RealInput | u1[worldModel1.n] | |
| input RealInput | u2 | |
| input RealInput | u3 |
block UniversalIntegrator
extends PDE.Icons.BlockIcon1;
outer PDE.World.worldModel worldModel1;
parameter Integer n = worldModel1.n;
parameter Integer vb = 1 "|Unknowns| The left most unknown";
parameter Integer ve = worldModel1.n "|Unknowns| The right most unknown";
parameter Integer icb = 1 "|Initial Condition| Begin of the initial condition";
parameter Integer ice = worldModel1.n
"|Initial Condition| End of the initial condition";
parameter Integer bcl = 0
"|Boundary Conditions| Boundary condition at the left (0: no; 1: yes)";
parameter Integer bcr = 0
"|Boundary Conditions| Boundary condition at the right (0: no; 1: yes)";
Real f[n];
equation
y = f;
if bcl == 1 then
f[1] = u2;
end if;
if bcr == 1 then
f[n] = u3;
end if;
for i in vb:ve loop
der(f[i]) = u[i];
end for;
initial equation
for i in icb:ice loop
f[i] = u1[i];
end for;
public
Modelica.Blocks.Interfaces.RealInput u[worldModel1.n];
Modelica.Blocks.Interfaces.RealOutput y[worldModel1.n];
Modelica.Blocks.Interfaces.RealInput u1[worldModel1.n];
Modelica.Blocks.Interfaces.RealInput u2;
Modelica.Blocks.Interfaces.RealInput u3;
equation
end UniversalIntegrator;