OOF2: The Manual
Name
Dirichlet (DirichletBC) — Fix the values of a Field along a boundary.
Synopsis
DirichletBC(field,field_component,equation,eqn_component,profile,boundary)
Details
-
Base class:
BC -
Parameters:
field- Type: A
Fieldobject. field_component- Type: A character string representing a field or flux index (eg,
'x'). equation- Type: An
Equationobject which can be used in boundary conditions. eqn_component- Type: A character string representing a field or flux index (eg,
'x'). profile- Profile describing how this condition varies. Type: An object of the
ProfileXTdclass. boundary- Boundary to which this condition applies. Type: The name of a point or edge boundary in a mesh.
Description
Dirichlet boundary conditions assign fixed values to Fields. A
separate boundary condition must be established for each component
of a Field that is to be fixed. Dirichlet boundary conditions
may be applied to both Edge and
Point
boundaries.
The field parameter specifies which Field is
to be fixed. The field_component parameter
specifies which component is to be fixed. It is a string
representing the component index. The acceptable strings depend
on the type of Field selected. The GUI presents a pull down
menu listing the legal strings, but users using the text
interface or editing scripts will need to know the possible
values. For vector fields, the field_component
must be 'x' or 'y'.
For tensor fields (when implemented) the component must be one of
'xx', 'yy',
'xy', etc.
For scalar fields the field_component is
ignored. Note that because the input is a Python string, the
quotation marks are required.
The equation and
eqn_component parameters require a bit of
explanation. The finite element machinery constructs a system of
linear equations with N equations and N unknowns, where N is the
number of nodes times the number of active field components. Each
time a Dirichlet boundary condition is applied at a node, one
unknown is removed from the problem, and all of a sudden there are
too many equations, and one of them must be removed from the
system before it is solved. That is, one of the equations becomes
dependent on the others. The
equation and eqn_component
parameters specify which equation that is. In general, any
equation containing the fixed Field may be chosen, but no
equation component may be chosen more than once on a single
boundary.
In simple problems with uncoupled fields, there is a natural
choice for the dependent equation -- it is the equation for the
component of the Flux that is conjugate to the fixed Field
component. For example, when constraining the value of the x
component of displacement, the x component of the force balance
equation is dependent. But in complicated problems with coupled
fields, the choice isn't always so obvious, and OOF2 relies on
the user to identify the dependent equation. For example, if a
Field contributes to two Fluxes, both of which have divergence
equations, then either of the two equations may be
selected.
The profile parameter determines the Field
component values along the boundary. Profiles may be arbitrary
functions of position, and are specified by providing a ProfileXTd object.
Example.
DirichletBC(field=Displacement, field_component='y',
equation=Force_Balance, eqn_component='y',
profile=ContinuumProfileXTd(function='y * sin(x/10)'),
boundary='top')
This constrains the y component of the
Displacement along the top boundary of
the Mesh, making the y component of the
Force_Balance equation dependent. The y
displacement at point
on the boundary
is set to
.



