ParsedODEKernel

This scalar kernel adds a source term : where is the variable the source acts upon, are other scalar variables, and are post-processor values.

The parameter function is a string expression for the source term as it appears on the left-hand-side of the equation; thus it represents . The expression may use the following quantities:

  • the name of the scalar variable upon which the kernel acts,

  • the names of any scalar variables specified in the args parameter,

  • the names of any post-processors specified in the postprocessors parameter, and

  • the names supplied in the constant_names parameter, defined to have the values provided by the constant_expressions parameters.

Currently, the function expression cannot be a function of time.

[ScalarKernels]
  [./td1]
    type = ODETimeDerivative
    variable = x
  [../]

  #
  # This parsed expression ODE Kernel behaves exactly as the ImplicitODEx kernel
  # in the main example. Checkout ImplicitODEx::computeQpResidual() in the
  # source code file ImplicitODEx.C to see the matching residual function.
  #
  # The ParsedODEKernel automaticaly generates the On- and Off-Diagonal Jacobian
  # entries.
  #
  [./ode1]
    type = ParsedODEKernel
    function = '-3*x - 2*y'
    variable = x
    args = y
  [../]

  [./td2]
    type = ODETimeDerivative
    variable = y
  [../]

  #
  # This parsed expression ODE Kernel behaves exactly as the ImplicitODEy Kernel
  # in the main example.
  #
  [./ode2]
    type = ParsedODEKernel
    function = '-4*x - y'
    variable = y
    args = x
  [../]
[]
(examples/ex18_scalar_kernel/ex18_parsed.i)

Input Parameters

  • functionfunction expression

    C++ Type:std::string

    Options:

    Description:function expression

  • variableThe name of the variable that this kernel operates on

    C++ Type:NonlinearVariableName

    Options:

    Description:The name of the variable that this kernel operates on

Required Parameters

  • argsadditional coupled variables

    C++ Type:std::vector

    Options:

    Description:additional coupled variables

  • constant_expressionsVector of values for the constants in constant_names (can be an FParser expression)

    C++ Type:std::vector

    Options:

    Description:Vector of values for the constants in constant_names (can be an FParser expression)

  • constant_namesVector of constants used in the parsed function (use this for kB etc.)

    C++ Type:std::vector

    Options:

    Description:Vector of constants used in the parsed function (use this for kB etc.)

  • postprocessorsVector of postprocessor names used in the function expression

    C++ Type:std::vector

    Options:

    Description:Vector of postprocessor names used in the function expression

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.

  • disable_fpoptimizerFalseDisable the function parser algebraic optimizer

    Default:False

    C++ Type:bool

    Options:

    Description:Disable the function parser algebraic optimizer

  • enableTrueSet the enabled status of the MooseObject.

    Default:True

    C++ Type:bool

    Options:

    Description:Set the enabled status of the MooseObject.

  • enable_ad_cacheTrueEnable cacheing of function derivatives for faster startup time

    Default:True

    C++ Type:bool

    Options:

    Description:Enable cacheing of function derivatives for faster startup time

  • enable_auto_optimizeTrueEnable automatic immediate optimization of derivatives

    Default:True

    C++ Type:bool

    Options:

    Description:Enable automatic immediate optimization of derivatives

  • enable_jitTrueEnable just-in-time compilation of function expressions for faster evaluation

    Default:True

    C++ Type:bool

    Options:

    Description:Enable just-in-time compilation of function expressions for faster evaluation

  • fail_on_evalerrorFalseFail fatally if a function evaluation returns an error code (otherwise just pass on NaN)

    Default:False

    C++ Type:bool

    Options:

    Description:Fail fatally if a function evaluation returns an error code (otherwise just pass on NaN)

  • implicitTrueDetermines whether this object is calculated using an implicit or explicit form

    Default:True

    C++ Type:bool

    Options:

    Description:Determines whether this object is calculated using an implicit or explicit form

  • use_displaced_meshFalseWhether or not this object should use the displaced mesh for computation. Note that in the case this is true but no displacements are provided in the Mesh block the undisplaced mesh will still be used.

    Default:False

    C++ Type:bool

    Options:

    Description:Whether or not this object should use the displaced mesh for computation. Note that in the case this is true but no displacements are provided in the Mesh block the undisplaced mesh will still be used.

Advanced Parameters

  • extra_matrix_tagsThe extra tags for the matrices this Kernel should fill

    C++ Type:std::vector

    Options:

    Description:The extra tags for the matrices this Kernel should fill

  • extra_vector_tagsThe extra tags for the vectors this Kernel should fill

    C++ Type:std::vector

    Options:

    Description:The extra tags for the vectors this Kernel should fill

  • matrix_tagssystemThe tag for the matrices this Kernel should fill

    Default:system

    C++ Type:MultiMooseEnum

    Options:nontime system

    Description:The tag for the matrices this Kernel should fill

  • vector_tagsnontimeThe tag for the vectors this Kernel should fill

    Default:nontime

    C++ Type:MultiMooseEnum

    Options:nontime time

    Description:The tag for the vectors this Kernel should fill

Tagging Parameters

Input Files