RankTwoTensorFromComponentProperties

Assembles a RankTwoTensor from scalar material properties or constants

Overview

RankTwoTensorFromComponentProperties assembles a RankTwoTensor material property from scalar material properties or numeric constants. This material enables creation of anisotropic property tensors where individual components are defined separately.

For example, this can create an anisotropic diffusivity tensor: where can be scalar material property or constant.

Usage

The material requires exactly 9 tensor components specified in row-major order. Each component can be:

  • A material property name (must be of type Real)

  • A numeric constant (e.g., 0.0, 1.5)

Example: Diagonal Anisotropic Diffusivity The following example demonstrates assembling a diagonal diffusivity tensor from two variable-dependent properties and one constant value:

[Mesh<<<{"href": "../../syntax/Mesh/index.html"}>>>]
  [gen]
    type = GeneratedMeshGenerator<<<{"description": "Create a line, square, or cube mesh with uniformly spaced or biased elements.", "href": "../meshgenerators/GeneratedMeshGenerator.html"}>>>
    dim<<<{"description": "The dimension of the mesh to be generated"}>>> = 3
    nx<<<{"description": "Number of elements in the X direction"}>>> = 2
    ny<<<{"description": "Number of elements in the Y direction"}>>> = 3
    nz<<<{"description": "Number of elements in the Z direction"}>>> = 2
    xmax<<<{"description": "Upper X Coordinate of the generated mesh"}>>> = 0.1
    ymax<<<{"description": "Upper Y Coordinate of the generated mesh"}>>> = 0.1
    zmax<<<{"description": "Upper Z Coordinate of the generated mesh"}>>> = 0.1
  []
[]
[Problem<<<{"href": "../../syntax/Problem/index.html"}>>>]
  solve = false
[]
[Variables<<<{"href": "../../syntax/Variables/index.html"}>>>]
  [temperature]
  []
[]
[ICs<<<{"href": "../../syntax/ICs/index.html"}>>>]
  [temp_ic]
    type = FunctionIC<<<{"description": "An initial condition that uses a normal function of x, y, z to produce values (and optionally gradients) for a field variable.", "href": "../ics/FunctionIC.html"}>>>
    variable<<<{"description": "The variable this initial condition is supposed to provide values for."}>>> = temperature
    function<<<{"description": "The initial condition function."}>>> = '300 + 1000*z'
  []
[]
[Materials<<<{"href": "../../syntax/Materials/index.html"}>>>]
[k_x_property]
  type = ParsedMaterial<<<{"description": "Parsed expression Material.", "href": "ParsedMaterial.html"}>>>
  property_name<<<{"description": "Name of the parsed material property"}>>> = k_x
  coupled_variables<<<{"description": "Vector of variables used in the parsed function"}>>> = 'temperature'
  expression<<<{"description": "Parsed function (see FParser) expression for the parsed material"}>>> = '1.0 +0.005*temperature '
[]

[k_y_property]
  type = ParsedMaterial<<<{"description": "Parsed expression Material.", "href": "ParsedMaterial.html"}>>>
  property_name<<<{"description": "Name of the parsed material property"}>>> = k_y
  coupled_variables<<<{"description": "Vector of variables used in the parsed function"}>>> = 'temperature'
  expression<<<{"description": "Parsed function (see FParser) expression for the parsed material"}>>> = '10.0 +0.05*temperature'
[]

  # Assemble into tensor
  [thermal_conductivity_tensor]
    type = RankTwoTensorFromComponentProperties<<<{"description": "Assembles a RankTwoTensor from scalar material properties or constants", "href": "RankTwoTensorFromComponentProperties.html"}>>>
    tensor_name<<<{"description": "Name of output tensor"}>>> = 'thermal_conductivity'
    tensor_values<<<{"description": "9 tensor components (row-major) as material property names or constants"}>>> = 'k_x       0.0     0.0
                     0.0       k_y     0.0
                     0.0       0.0     1.0'
    outputs<<<{"description": "Vector of output names where you would like to restrict the output of variables(s) associated with this object"}>>>=exodus
  []
[]

[BCs<<<{"href": "../../syntax/BCs/index.html"}>>>]
  [fixed]
    type = DirichletBC<<<{"description": "Imposes the essential boundary condition $u=g$, where $g$ is a constant, controllable value.", "href": "../bcs/DirichletBC.html"}>>>
    variable<<<{"description": "The name of the variable that this residual object operates on"}>>> = temperature
    boundary<<<{"description": "The list of boundary IDs from the mesh where this object applies"}>>> = 'left right top bottom front back'
    value<<<{"description": "Value of the BC"}>>> = 300
  []
[]

[Executioner<<<{"href": "../../syntax/Executioner/index.html"}>>>]
  type = Steady
  solve_type = NEWTON
  petsc_options_iname = '-pc_type'
  petsc_options_value = 'lu'
[]

[Outputs<<<{"href": "../../syntax/Outputs/index.html"}>>>]
  exodus<<<{"description": "Output the results using the default settings for Exodus output."}>>> = true
[]

[Postprocessors<<<{"href": "../../syntax/Postprocessors/index.html"}>>>]
  [temp_max]
    type = ElementExtremeValue<<<{"description": "Finds either the min or max elemental value of a variable over the domain.", "href": "../postprocessors/ElementExtremeValue.html"}>>>
    variable<<<{"description": "The name of the variable that this postprocessor operates on"}>>> = temperature
    value_type<<<{"description": "Type of extreme value to return. 'max' returns the maximum value. 'min' returns the minimum value. 'max_abs' returns the maximum of the absolute value."}>>> = max
  []

  [temp_center]
    type = PointValue<<<{"description": "Compute the value of a variable at a specified location", "href": "../postprocessors/PointValue.html"}>>>
    variable<<<{"description": "The name of the variable that this postprocessor operates on."}>>> = temperature
    point<<<{"description": "The physical point where the solution will be evaluated."}>>> = '0.05 0.05 0.05'
  []
[]
(moose/test/tests/materials/rank_two_tensor_from_component_properties/basic.i)

This produces the following tensor:

Input Parameters

  • tensor_values9 tensor components (row-major) as material property names or constants

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

    Controllable:No

    Description:9 tensor components (row-major) as material property names or constants

Required 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_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

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

    C++ Type:MaterialPropertyName

    Unit:(no unit assumed)

    Controllable:No

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

  • tensor_nameName of output tensor

    C++ Type:MaterialPropertyName

    Unit:(no unit assumed)

    Controllable:No

    Description:Name of output tensor

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:Yes

    Description:Set the enabled status of the MooseObject.

  • 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

  • search_methodnearest_node_connected_sidesChoice of search algorithm. All options begin by finding the nearest node in the primary boundary to a query point in the secondary boundary. In the default nearest_node_connected_sides algorithm, primary boundary elements are searched iff that nearest node is one of their nodes. This is fast to determine via a pregenerated node-to-elem map and is robust on conforming meshes. In the optional all_proximate_sides algorithm, primary boundary elements are searched iff they touch that nearest node, even if they are not topologically connected to it. This is more CPU-intensive but is necessary for robustness on any boundary surfaces which has disconnections (such as Flex IGA meshes) or non-conformity (such as hanging nodes in adaptively h-refined meshes).

    Default:nearest_node_connected_sides

    C++ Type:MooseEnum

    Options:nearest_node_connected_sides, all_proximate_sides

    Controllable:No

    Description:Choice of search algorithm. All options begin by finding the nearest node in the primary boundary to a query point in the secondary boundary. In the default nearest_node_connected_sides algorithm, primary boundary elements are searched iff that nearest node is one of their nodes. This is fast to determine via a pregenerated node-to-elem map and is robust on conforming meshes. In the optional all_proximate_sides algorithm, primary boundary elements are searched iff they touch that nearest node, even if they are not topologically connected to it. This is more CPU-intensive but is necessary for robustness on any boundary surfaces which has disconnections (such as Flex IGA meshes) or non-conformity (such as hanging nodes in adaptively h-refined meshes).

  • 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

  • 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

    Unit:(no unit assumed)

    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.

  • 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.

Material Property Retrieval Parameters