ParsedFunction

!syntax description /Functions/ParsedFunction

Description

The ParsedFunction function takes a mathematical expression in value. The expression can be a function of time (t) or coordinate (x, y, or z). The expression can include common mathematical functions. Examples include 4e4+1e2*t, sqrt(x*x+y*y+z*z), and if(t\textless=1.0, 0.1*t, (1.0+0.1)*cos(pi/2*(t-1.0)) - 1.0).

Additional variables may be declared in the vars parameter vector. The corresponding vals parameter vector should list the items these variables are bound to. Variables can be bound to:

  • Constant number literals (for example vars = kB and vals = 8.61733e-5)

  • A PostProcessor name (providing the value form the PP's last execution)

  • A Function name (providing an immediate evaluation of the specified function)

Further information can be found at the function parser site.

Example Input Syntax

[Functions]
  [./tr_x]
    type = ParsedFunction
    value = sqrt(x^2+y^2)*cos(2*pi/3)
  [../]

  [./tr_y]
    type = ParsedFunction
    value = sqrt(x^2+y^2)*sin(2*pi/3)
  [../]

  [./itr_x]
    type = ParsedFunction
    value = sqrt(x^2+y^2)*cos(0)
  [../]

  [./itr_y]
    type = ParsedFunction
    value = sqrt(x^2+y^2)*sin(0) # Always Zero!
  [../]
[]
(examples/ex04_bcs/trapezoid.i)

Input Parameters

  • valueThe user defined function.

    C++ Type:FunctionExpression

    Options:

    Description:The user defined function.

Required Parameters

  • valsConstant numeric values, postprocessor names, or function names for vars.

    C++ Type:std::vector

    Options:

    Description:Constant numeric values, postprocessor names, or function names for vars.

  • varsVariables (excluding t,x,y,z) that are bound to the values provided by the corresponding items in the vals vector.

    C++ Type:std::vector

    Options:

    Description:Variables (excluding t,x,y,z) that are bound to the values provided by the corresponding items in the vals vector.

Optional Parameters

  • control_tagsAdds user-defined labels for accessing object parameters via control logic.

    C++ Type:std::vector

    Options:

    Description:Adds user-defined labels for accessing object parameters via control logic.

  • enableTrueSet the enabled status of the MooseObject.

    Default:True

    C++ Type:bool

    Options:

    Description:Set the enabled status of the MooseObject.

Advanced Parameters