This package contains GeneralIntegrator block that implements the Method of Lines and Finite Volume Methods.
Release Notes:
| Name | Description |
|---|---|
PDE.General.Integrator.GeneralIntegrator
The GeneralIntegrator block combines two integrators into one block. The scope of the block is to make more abstract the
procedure of solving PDE. This provide transparence to the user, that can just take one integrator block and choose the numerical
method to use. The integrator parameter allows to select the method: 1 for MOL and 2 for FVM. The treatment of the IC, BCL and BCR
inputs is the same as for other integrator blocks.
Release Notes:
| Type | Name | Default | Description |
|---|---|---|---|
| Integer | n | worldModel1.n | |
| Integer | integrator | 1 | |
| Integer | vb | 1 | |
| Integer | ve | n | |
| Integer | icb | 1 | |
| Integer | ice | n | |
| Boundary Conditions | |||
| Integer | bcl | 0 | Type of the boundary condition at the left (-1:symmtery; 0: none) |
| Integer | bcr | 0 | Type of the boundary condition at the right (-1:symmtery; 0: none) |
| Type | Name | Description |
|---|---|---|
| input RealInput | u[worldModel1.n] | |
| input RealInput | u1[worldModel1.n + 1] | |
| input RealInput | u2[worldModel1.n] | |
| input RealInput | u3 | |
| input RealInput | u4 | |
| output RealOutput | y[worldModel1.n] | |
| output RealOutput | y1[worldModel1.n + worldModel1.gcl + worldModel1.gcr] |
block GeneralIntegrator
extends Icons.BlockIcon1;
outer PDE.World.worldModel worldModel1;
inner parameter Integer n = worldModel1.n;
parameter Integer integrator = 1;
inner parameter Integer bcl = 0
"|Boundary Conditions| Type of the boundary condition at the left (-1:symmtery; 0: none)";
inner parameter Integer bcr = 0
"|Boundary Conditions| Type of the boundary condition at the right (-1:symmtery; 0: none)";
inner parameter Integer vb = 1;
inner parameter Integer ve = n;
inner parameter Integer icb = 1;
inner parameter Integer ice = n;
Modelica.Blocks.Interfaces.RealInput u[worldModel1.n];
Modelica.Blocks.Interfaces.RealInput u1[worldModel1.n + 1];
Modelica.Blocks.Interfaces.RealInput u2[worldModel1.n];
Modelica.Blocks.Interfaces.RealInput u3;
Modelica.Blocks.Interfaces.RealInput u4;
Modelica.Blocks.Interfaces.RealOutput y[worldModel1.n];
Modelica.Blocks.Interfaces.RealOutput y1[worldModel1.n + worldModel1.gcl +
worldModel1.gcr];
PDE.General.Interfaces.IntegratorMOL integratorMOL if
integrator == 1;
PDE.General.Interfaces.IntegratorFVM integratorFVM(
bcl=0, bcr=0) if
integrator == 2;
equation
connect(u, integratorMOL.u);
connect(u1, integratorFVM.u);
connect(u2, integratorMOL.u1);
connect(u2, integratorFVM.u2);
connect(u3, integratorMOL.u2);
connect(u3, integratorFVM.u3[1]);
connect(u3, integratorFVM.u3[2]);
connect(u4, integratorFVM.u4[1]);
connect(u4, integratorFVM.u4[2]);
connect(u4, integratorMOL.u3);
connect(integratorMOL.y, y);
connect(integratorFVM.y, y1);
end GeneralIntegrator;