addBoundaryConditions¶
The commands allows to add a variety of boundary conditions at initial point and end point. It is also possible to define cyclic boundary conditions that links initial and final states to be equal or generic boundary conditions defined as algebraic expressions that involves states at the initial and/or final points.
Initial conditions are of type \(x(\zeta_i) = x_i\)
Final conditions are of type \(x(\zeta_f) = x_f\)
Cyclic conditions are of type \(x(\zeta_i) = x(\zeta_f)\)
Generic conditions are of type \(f(x(\zeta_i)) = 0\) or \(f(x(\zeta_f)) = 0\)
If the command is called without arguments then default initial and final boundary conditions are set
Alternatively the boundary condition can be specified providing the list for initial, final, cyclic or generic.
Arguments:
generic: list of generic boundary conditions. Default is empty list
[]
-
initial: list of initial boundary conditions. Default is empty list
[]
The list is made of single items (variables the the user wants the boundary condition for) and/or list of two items
[variable,string]
.The string is the name of the boundary condition. If missing (single item case) a default name is used.
-
final: list of final boundary conditions. Default is empty list
[]
.The list is made of single items (variables the the user wants the boundary condition for) and/or list of two items
[variable,string]
.The string is the name of the boundary condition. If missing (single item case) a default name is used.
-
cyclic: list of cyclic boundary conditions. Default is empty list
[]
The list is made of single items (variables the the user wants the boundary condition for) and/or list of two items
[variable,string]
.The string is the name of the boundary condition. If missing (single item case) a default name is used.
Syntax:
How to add default initial and final boundary conditions:
addBoundaryConditions();
How to add initial and final boundary conditions for pecific variables:
addBoundaryConditions(
initial=[x,[y(zeta),'ybc_name']],
final=[x(zeta),[y,'ybc_name']]
);
How to add cyclic boundary conditions:
addBoundaryConditions(cyclic=[x,[y,'ybc_name']]);
In case the algebraic boundary conditions contains
mesh functions (i.e. functions that are linked to
mesh points and therefore to segments) it is important
to add as suffix _L
or _R
to the
mesh function name if we wish to evaluate the mesh
function respectively to the initial (i.e. left)
or final (i.e. right) point.