Periodic System

Periodic boundary conditions enforce value constraints on separate boundaries in the mesh. This capability is useful for modeling quasi-infinite domains and systems with conserved quantities.

MOOSE has full support for Periodic BCs in

  • 1D, 2D, and 3D.

  • With mesh adaptivity.

  • Can be restricted to specific variables.

Arbitrary translation vectors and arbitrary mapping transformations between boundaries are also supported for defining periodicity.

In this example, periodic boundary conditions are set on variable u in the X and Y axis directions. The boundaries that are matched on all sides of the system are automatically detected, due to using the "auto_direction" parameter.

commentnote

The automatic detection of the boundaries to match is only available in the X, Y and Z axis directions.

[BCs<<<{"href": "../index.html"}>>>]
  [./Periodic<<<{"href": "index.html"}>>>]
    [./all]
      variable<<<{"description": "Variable for the periodic boundary condition"}>>> = u
      auto_direction<<<{"description": "If using a generated mesh, you can specify just the dimension(s) you want to mark as periodic"}>>> = 'x y'
    [../]
  [../]
[]
(moose/test/tests/bcs/periodic/auto_periodic_bc_test.i)

Translation Periodic Boundaries

In this example, periodic boundary conditions are set on variable u in the X and Y axis directions, using the exact distance for the translation needed to go from one periodic boundary to the other. The boundaries are also explicitly specified using the "primary" and "secondary" parameters.

[BCs<<<{"href": "../index.html"}>>>]
  [./Periodic<<<{"href": "index.html"}>>>]
    [./x]
      variable<<<{"description": "Variable for the periodic boundary condition"}>>> = u
      primary<<<{"description": "Boundary ID associated with the primary boundary."}>>> = 3
      secondary<<<{"description": "Boundary ID associated with the secondary boundary."}>>> = 1
      translation<<<{"description": "Vector that translates coordinates on the primary boundary to coordinates on the secondary boundary."}>>> = '40 0 0'
    [../]

    [./y]
      variable<<<{"description": "Variable for the periodic boundary condition"}>>> = u
      primary<<<{"description": "Boundary ID associated with the primary boundary."}>>> = 0
      secondary<<<{"description": "Boundary ID associated with the secondary boundary."}>>> = 2
      translation<<<{"description": "Vector that translates coordinates on the primary boundary to coordinates on the secondary boundary."}>>> = '0 40 0'
    [../]
  [../]
[]
(moose/test/tests/bcs/periodic/periodic_bc_test.i)

Function Transform Periodic Boundaries

In this example, periodic boundary conditions are set on variable u in arbitrary non-matching directions, using the mapping functions to go from one boundary to the other. The transformation to go from the primary to the secondary is given by a Function using the "transform_func" parameter, and in the other direction the "inv_transform_func" parameter. The boundaries are also explicitly specified using the "primary" and "secondary" parameters.

[Functions<<<{"href": "../../Functions/index.html"}>>>]
  [./tr_x]
    type = ParsedFunction<<<{"description": "Function created by parsing a string", "href": "../../../source/functions/MooseParsedFunction.html"}>>>
    expression<<<{"description": "The user defined function."}>>> = -x*cos(pi/3)
  [../]

  [./tr_y]
    type = ParsedFunction<<<{"description": "Function created by parsing a string", "href": "../../../source/functions/MooseParsedFunction.html"}>>>
    expression<<<{"description": "The user defined function."}>>> = x*sin(pi/3)
  [../]

  [./itr_x]
    type = ParsedFunction<<<{"description": "Function created by parsing a string", "href": "../../../source/functions/MooseParsedFunction.html"}>>>
    expression<<<{"description": "The user defined function."}>>> = -x/cos(pi/3)
  [../]

  [./itr_y]
    type = ParsedFunction<<<{"description": "Function created by parsing a string", "href": "../../../source/functions/MooseParsedFunction.html"}>>>
    expression<<<{"description": "The user defined function."}>>> = 0
  [../]
[]

[BCs<<<{"href": "../index.html"}>>>]
  [./Periodic<<<{"href": "index.html"}>>>]
    [./x]
      primary<<<{"description": "Boundary ID associated with the primary boundary."}>>> = 1
      secondary<<<{"description": "Boundary ID associated with the secondary boundary."}>>> = 4
      transform_func<<<{"description": "Functions that specify the transformation"}>>> = 'tr_x tr_y'
      inv_transform_func<<<{"description": "Functions that specify the inverse transformation"}>>> = 'itr_x itr_y'
    [../]
  [../]
[]
(moose/test/tests/bcs/periodic/trapezoid.i)

Available Actions