OOF2: The Manual

Name

ProfileFunctionX, ProfileFunctionXT — Specify an arbitrary function for a boundary condition.

Synopsis

ProfileFunctionX(function)

ProfileFunctionXT(function)

Parameters

function
A string representing a function of any or all of the variables x, y, nx, ny, s, alpha, and i.

Discussion

ProfileFunctionX and ProfileFunctionXT objects are used in the ContinuumProfile, ContinuumProfileXT, and ContinuumProfileXTd classes to specify how a boundary condition Profile varies along a boundary. For Edge Boundaries, ProfileFunctions are evaluated at points along the edges that form the boundary.[42] For Point Boundaries, the function is evaluated only at nodes.

ProfileFunctions are specified in terms of the following variables:

  • x: The x coordinate of the evaluation point. Always provided.
  • y: The y coordinate of the evaluation point. Always provided.
  • t: Time. Only provided in ProfileFunctionXT.
  • nx: The x component of the unit normal direction at the evaluation point. Only provided by Neumann boundary conditions on Edge Boundaries.
  • ny: The y component of the unit normal direction at the evaluation point. Only provided by Neumann boundary conditions on Edge Boundaries.
  • s: The distance along the boundary from its beginning to the evaluation point. Only meaningful for Edge Boundaries.
  • alpha: The fractional distance along the boundary from its beginning to the evaluation point, i.e, s divided by the length of the boundary. Only meaningful for Edge Boundaries.
  • i: The integer index of a node within the boundary. Provided for Dirichlet and Float boundary conditions on Edge Boundaries, and always provided for Point Boundaries. For the latter case, nodes are numbered within a point boundary in the order in which they were added to the boundary. The user doesn't always have control over this (for example, when building a boundary from the set of selected nodes) so this variable is of dubious utility.

Besides the variables listed above, the function can contain functions and constants from the Python math library (acos, asin, atan, atan2, ceil, cos, cosh, degrees, e, exp, fabs, floor, fmod, frexp, hypot, ldexp, log, log10, modf, pi, pow, radians, sin, sinh, sqrt, tan, and tanh) as well as any variables and functions that may have been defined in the OOF2 Console window.

In the GUI, a ProfileFunction should simply be typed into the text input box, without quotation marks. In scripts or the text interface, quotation marks are required. However, it's permissable to assign the function string directly to the ProfileFunction parameter. That is,

	ContinuumProfile(function=ProfileFunctionX('x+y'))

is equivalent to

	ContinuumProfile(function='x+y').



[42] Depending on the applied boundary condition, these points may be the nodes, or they may be Gauss points for integration over the edges.