# ParsedMaterial

Parsed Function Material.

Sets up a single material property that is computed using a parsed function expression.

A ParsedMaterial object takes the function expression as an input parameter in the form of a Function Parser expression. Parsed materials (unlike ParsedFunctions) can couple to non-linear variables and material properties. In its configuration block all non-linear variables the free energy depends on (args), as well as constants (constant_names and constant_expressions) and other material properties (material_property_names) are declared. Constants can be declared as parsed expressions (which can depend on previously defined constants). One application would be the definition of a temperature , the Boltzmann constant , a defect formation energy , and then an equilibrium defect concentration defined using a Boltzmann factor .

Example

The following material object creates a single property for visualization purposes. It will be 0 for phase 1, -1 for phase 2, and 1 for phase 3

  [./phasemap]
    type = ParsedMaterial
    f_name = phase
    args = 'eta2 eta3'
    function = 'if(eta3>0.5,1,0)-if(eta2>0.5,1,0)'
    outputs = exodus
  [../]
(../moose/modules/combined/examples/phase_field-mechanics/Pattern1.i)

Input Parameters

  • functionFParser function expression for the phase free energy

    C++ Type:std::string

    Description:FParser function expression for the phase free energy

Required Parameters

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

    C++ Type:std::vector

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

  • computeTrueWhen false, MOOSE will not call compute methods on this material. The user must call computeProperties() after retrieving the Material via MaterialPropertyInterface::getMaterial(). Non-computed Materials are not sorted for dependencies.

    Default:True

    C++ Type:bool

    Description:When false, MOOSE will not call compute methods on this material. The user must call computeProperties() after retrieving the Material via MaterialPropertyInterface::getMaterial(). Non-computed Materials are not sorted for dependencies.

  • f_nameFBase name of the free energy function (used to name the material properties)

    Default:F

    C++ Type:std::string

    Description:Base name of the free energy function (used to name the material properties)

  • argsArguments of F() - use vector coupling

    C++ Type:std::vector

    Description:Arguments of F() - use vector coupling

  • material_property_namesVector of material properties used in the parsed function

    C++ Type:std::vector

    Description:Vector of material properties used in the parsed function

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

    C++ Type:std::vector

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

  • tol_valuesVector of tolerance values for the variables in tol_names

    C++ Type:std::vector

    Description:Vector of tolerance values for the variables in tol_names

  • tol_namesVector of variable names to be protected from being 0 or 1 within a tolerance (needed for log(c) and log(1-c) terms)

    C++ Type:std::vector

    Description:Vector of variable names to be protected from being 0 or 1 within a tolerance (needed for log(c) and log(1-c) terms)

  • boundaryThe list of boundary IDs from the mesh where this boundary condition applies

    C++ Type:std::vector

    Description:The list of boundary IDs from the mesh where this boundary condition applies

  • blockThe list of block ids (SubdomainID) that this object will be applied

    C++ Type:std::vector

    Description:The list of block ids (SubdomainID) that this object will be applied

Optional Parameters

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

    Default:False

    C++ Type:bool

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

  • enableTrueSet the enabled status of the MooseObject.

    Default:True

    C++ Type:bool

    Description:Set the enabled status of the MooseObject.

  • 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

    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.

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

    Default:True

    C++ Type:bool

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

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

    C++ Type:std::vector

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

  • seed0The seed for the master random number generator

    Default:0

    C++ Type:unsigned int

    Description:The seed for the master random number generator

  • enable_auto_optimizeTrueEnable automatic immediate optimization of derivatives

    Default:True

    C++ Type:bool

    Description:Enable automatic immediate optimization of derivatives

  • disable_fpoptimizerFalseDisable the function parser algebraic optimizer

    Default:False

    C++ Type:bool

    Description:Disable the function parser algebraic optimizer

  • enable_ad_cacheTrueEnable cacheing of function derivatives for faster startup time

    Default:True

    C++ Type:bool

    Description:Enable cacheing of function derivatives for faster startup time

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

    Default:True

    C++ Type:bool

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

  • constant_onNONEWhen ELEMENT, MOOSE will only call computeQpProperties() for the 0th quadrature point, and then copy that value to the other qps.When SUBDOMAIN, MOOSE will only call computeSubdomainProperties() for the 0th quadrature point, and then copy that value to the other qps. Evaluations on element qps will be skipped

    Default:NONE

    C++ Type:MooseEnum

    Description:When ELEMENT, MOOSE will only call computeQpProperties() for the 0th quadrature point, and then copy that value to the other qps.When SUBDOMAIN, MOOSE will only call computeSubdomainProperties() for the 0th quadrature point, and then copy that value to the other qps. Evaluations on element qps will be skipped

Advanced Parameters

  • output_propertiesList of material properties, from this material, to output (outputs must also be defined to an output type)

    C++ Type:std::vector

    Description:List of material properties, from this material, to output (outputs must also be defined to an output type)

  • outputsnone Vector of output names were you would like to restrict the output of variables(s) associated with this object

    Default:none

    C++ Type:std::vector

    Description:Vector of output names were you would like to restrict the output of variables(s) associated with this object

Outputs Parameters