- valueThe user defined function.
C++ Type:FunctionExpression
Controllable:No
Description:The user defined function.
ParsedFunction
Function created by parsing a string
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<=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
andvals = 8.61733e-5
)A PostProcessor name (providing the value from the PP's last execution)
A Function name (providing an immediate evaluation of the specified function)
A scalar variable name
Further information can be found at the function parser site.
Example Input Syntax
[Functions]
# A ParsedFunction allows us to supply analytic expressions
# directly in the input file
[./bc_func]
type = ParsedFunction
value = sin(alpha*pi*x)
vars = 'alpha'
vals = '16'
[../]
# This function is an actual compiled function
# We could have used ParsedFunction for this as well
[./forcing_func]
type = ExampleFunction
alpha = 16
[../]
[]
(../../../SoftwareDownloads/moose/examples/ex13_functions/ex13.i)Input Parameters
- execute_onLINEARThe list of flag(s) indicating when this object should be executed, the available options include NONE, INITIAL, LINEAR, NONLINEAR, TIMESTEP_END, TIMESTEP_BEGIN, FINAL, CUSTOM, ALWAYS.
Default:LINEAR
C++ Type:ExecFlagEnum
Controllable:No
Description:The list of flag(s) indicating when this object should be executed, the available options include NONE, INITIAL, LINEAR, NONLINEAR, TIMESTEP_END, TIMESTEP_BEGIN, FINAL, CUSTOM, ALWAYS.
- valsConstant numeric values, postprocessor names, or function names for vars.
C++ Type:std::vector<std::string>
Controllable:No
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<std::string>
Controllable:No
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<std::string>
Controllable:No
Description:Adds user-defined labels for accessing object parameters via control logic.
- enableTrueSet the enabled status of the MooseObject.
Default:True
C++ Type:bool
Controllable:No
Description:Set the enabled status of the MooseObject.