ParsedMaterial

Parsed expression 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 nonlinear variables and material properties. In its configuration block all nonlinear variables the function depends on ("coupled_variables"), as well as constants ("constant_names" and "constant_expressions"), other material properties ("material_property_names"), and postprocessors ("postprocessor_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
    property_name = phase
    coupled_variables = 'eta2 eta3'
    expression = 'if(eta3>0.5,1,0)-if(eta2>0.5,1,0)'
    outputs = exodus
  [../]
(modules/combined/examples/phase_field-mechanics/Pattern1.i)

Input Parameters

  • blockThe list of blocks (ids or names) that this object will be applied

    C++ Type:std::vector<SubdomainName>

    Controllable:No

    Description:The list of blocks (ids or names) that this object will be applied

  • boundaryThe list of boundaries (ids or names) from the mesh where this object applies

    C++ Type:std::vector<BoundaryName>

    Controllable:No

    Description:The list of boundaries (ids or names) from the mesh where this object applies

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

    Default:True

    C++ Type:bool

    Controllable:No

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

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

    C++ Type:std::vector<std::string>

    Controllable:No

    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<std::string>

    Controllable:No

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

  • 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 computeQpProperties() 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

    Options:NONE, ELEMENT, SUBDOMAIN

    Controllable:No

    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 computeQpProperties() for the 0th quadrature point, and then copy that value to the other qps. Evaluations on element qps will be skipped

  • coupled_variables

    C++ Type:std::vector<VariableName>

    Controllable:No

  • declare_suffixAn optional suffix parameter that can be appended to any declared properties. The suffix will be prepended with a '_' character.

    C++ Type:MaterialPropertyName

    Controllable:No

    Description:An optional suffix parameter that can be appended to any declared properties. The suffix will be prepended with a '_' character.

  • error_on_missing_material_propertiesTrueThrow an error if any explicitly requested material property does not exist. Otherwise assume it to be zero.

    Default:True

    C++ Type:bool

    Controllable:No

    Description:Throw an error if any explicitly requested material property does not exist. Otherwise assume it to be zero.

  • expressionParsed function (see FParser) expression for the parsed material

    C++ Type:FunctionExpression

    Controllable:No

    Description:Parsed function (see FParser) expression for the parsed material

  • extra_symbolsSpecial symbols, like point coordinates, time, and timestep size.

    C++ Type:MultiMooseEnum

    Options:x, y, z, t, dt

    Controllable:No

    Description:Special symbols, like point coordinates, time, and timestep size.

  • material_property_namesVector of material properties used in the parsed function

    C++ Type:std::vector<std::string>

    Controllable:No

    Description:Vector of material properties used in the parsed function

  • postprocessor_namesVector of postprocessor names used in the parsed function

    C++ Type:std::vector<PostprocessorName>

    Controllable:No

    Description:Vector of postprocessor names used in the parsed function

  • prop_getter_suffixAn optional suffix parameter that can be appended to any attempt to retrieve/get material properties. The suffix will be prepended with a '_' character.

    C++ Type:MaterialPropertyName

    Controllable:No

    Description:An optional suffix parameter that can be appended to any attempt to retrieve/get material properties. The suffix will be prepended with a '_' character.

  • property_nameFName of the parsed material property

    Default:F

    C++ Type:std::string

    Controllable:No

    Description:Name of the parsed material property

  • 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<std::string>

    Controllable:No

    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)

  • tol_valuesVector of tolerance values for the variables in tol_names

    C++ Type:std::vector<double>

    Controllable:No

    Description:Vector of tolerance values for the variables in tol_names

  • use_interpolated_stateFalseFor the old and older state use projected material properties interpolated at the quadrature points. To set up projection use the ProjectedStatefulMaterialStorageAction.

    Default:False

    C++ Type:bool

    Controllable:No

    Description:For the old and older state use projected material properties interpolated at the quadrature points. To set up projection use the ProjectedStatefulMaterialStorageAction.

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.

  • disable_fpoptimizerFalseDisable the function parser algebraic optimizer

    Default:False

    C++ Type:bool

    Controllable:No

    Description:Disable the function parser algebraic optimizer

  • enableTrueSet the enabled status of the MooseObject.

    Default:True

    C++ Type:bool

    Controllable:Yes

    Description:Set the enabled status of the MooseObject.

  • enable_ad_cacheTrueEnable caching of function derivatives for faster startup time

    Default:True

    C++ Type:bool

    Controllable:No

    Description:Enable caching of function derivatives for faster startup time

  • enable_auto_optimizeTrueEnable automatic immediate optimization of derivatives

    Default:True

    C++ Type:bool

    Controllable:No

    Description:Enable automatic immediate optimization of derivatives

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

    Default:True

    C++ Type:bool

    Controllable:No

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

  • evalerror_behaviornanWhat to do if evaluation error occurs. Options are to pass a nan, pass a nan with a warning, throw a error, or throw an exception

    Default:nan

    C++ Type:MooseEnum

    Options:nan, nan_warning, error, exception

    Controllable:No

    Description:What to do if evaluation error occurs. Options are to pass a nan, pass a nan with a warning, throw a error, or throw an exception

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

    Default:True

    C++ Type:bool

    Controllable:No

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

  • seed0The seed for the master random number generator

    Default:0

    C++ Type:unsigned int

    Controllable:No

    Description:The seed for the master random number generator

  • 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

    Controllable:No

    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

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

    C++ Type:std::vector<std::string>

    Controllable:No

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

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

    Default:none

    C++ Type:std::vector<OutputName>

    Controllable:No

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

Outputs Parameters

Input Files