Skip to content

Boundaryconditions context

Arne Morten Kvarving edited this page Mar 1, 2017 · 3 revisions

The boundaryconditions context

The <boundaryconditions> context is used for everything related to boundary conditions.

<boundaryconditions>
  <dirichlet set="Edge1" comp="1" type="constant">1.0</dirichlet>
  <dirichlet set="Edge1" comp="2" type="expression">sin(x)</dirichlet>
  <dirichlet set="Edge2" comp="12" type="anasol"/>
  <dirichlet set="Edge3" comp="1" type="expression" axes="local" t1="y">3*x</dirichlet>
  <neumann set="Edge4" type="anasol"/>
  <neumann set="Edge4" type="constant" direction="1">10</neumann>
  <neumann set="Edge4" type="expression" direction="0">x*y*z</neumann>
</boundaryconditions>

dirichlet

Use this to define Dirichlet-type boundary conditions. A Dirichlet boundary condition is described through

  • set - the topologyset to apply the boundary condition to.
  • comp - The components to apply the boundary conditions to (one indexed, string with 1, 2, 3 or combinations).
  • type - The type of the boundary condition specification (anasol, expression, constant).
  • axes - The coordinate system to use when applying the boundary condition (global, local, local projected).
  • t1 - If using local axes in 3D, this is the first tangent direction (x,y,z).

Here the anasol type only makes sense for problems where a known analytic solution is available.

  • Attributes: set, comp, type, axes, t1
  • Value: A constant number or a function expression, in accordance with the given type. A blank value gives a homogeneous Dirichlet condition.

See the expression functions page for the symbolic expression syntax.

Example:

  <dirichlet set="foo" comp="1"/>
  <dirichlet set="foo" comp="123" type="anasol"/>
  <dirichlet set="foo" comp="123" type="expression">x*y*z</dirichlet>

neumann

Use this to define Neumann-type boundary conditions. A Neumann boundary condition is described through

  • set - The topologyset to apply the boundary condition to.
  • type - The type of the boundary condition specification (anasol, expression, constant, linear, generic).
  • direction - The direction of the Neumann condition for vector fields (0 = along normal, 1,2,3 for a given global coordinate direction).

Here the anasol type only makes sense for problems where a known analytic solution is available.

  • Attributes: set, type, direction
  • Value: The constant, slope or expression function in accordance with the given type.

See the expression functions page for the symbolic expression syntax.

Example:

  <neumann set="foo" type="anasol"/>
  <neumann set="foo" type="constant" direction="1">10</neumann>
  <neumann set="foo" type="expression" direction="0">x*y*z</neumann>