<commit_before># Solid Properties Module

The Solid Properties module provides a consistent interface to solid properties. Unlike
fluid properties that are oftentimes only a function of pressure and temperature
(or two other state variables), solid properties are frequently a function of many
other parameters in addition to temperature, such as accumulated radiation damage,
oxidation state, and microstructure. Some commonly-used properties in physics
simulations include thermal
properties such as specific heat, thermal conductivity, and emissivity; and
mechanical properties such as elastic modulus and Poisson ratio.

This module provides a consistent interface to define solid material properties.
A flexible design permits extension by other applications to include custom
properties. This module allows different solids
to be used in a physics simulation by simply swapping the name of the solid properties
userobject in a plug-and-play manner.

!alert warning
Always verify that the material properties provided in this module agree with
the system you are modeling. The selection of particular correlations here does not
constitute an endorsement of the accuracy of those correlations.

This module provides solid properties for different solids, organized according to
the overall type of property. The overall design of this module is as follows:

1. *UserObjects* contain functions to compute various solid properties in terms
   of dependent quantities (temperature, porosity, etc.). Different "categories" of
   solid properties are grouped together into different userobjects. For example,
   common solid properties used in thermal simulations (specific heat, thermal conductivity),
   are provided by derived classes of the [ThermalSolidProperties](/userobjects/ThermalSolidProperties.md)
   userobject. Mechanics properties (Youngs modulus, Poisson ratio), would be provided by
   a separate "family" of userobjects.
2. *Materials* call these userobject functions to compute the material properties at
   quadrature points. Like the userobjects, these materials are grouped into "categories."
   For example, common solid properties for thermal simulations are evaluated by the
   [ThermalSolidPropertiesMaterial](/materials/ThermalSolidPropertiesMaterial.md).

## Thermal properties

Thermal properties (density, specific heat, and thermal conductivity) are computed by
userobjects inheriting from the [ThermalSolidProperties](/userobjects/ThermalSolidProperties.md) base class. This class
defines functions to compute these material properties as a function of temperature:

- compute isobaric specific heat - `Real cp_from_T(const Real & T)`
- compute thermal conductivity - `Real k_from_T(const Real & T)`
- compute density - `Real rho_from_T(const Real & T)`

Functions to compute derivatives of these properties as a function of temperature
are also available:

- compute isobaric specific heat and its temperature derivative - `void cp_from_T(const Real & T, Real & cp, Real & dcp_dT)`
- compute thermal conductivity and its temperature derivative - `void k_from_T(const Real & T, Real & k, Real & dk_dT)`
- compute density and its temperature derivative - `void rho_from_T(const Real & T, Real & rho, Real & drho_dT)`

Userobjects available in the Solid Properties module that provide thermal properties are:

- [graphite](/ThermalGraphiteProperties.md)
- [monolithic silicon carbide](/ThermalMonolithicSiCProperties.md)
- [composite silicon carbide](/ThermalCompositeSiCProperties.md)
- [stainless steel alloy 316](/ThermalSS316Properties.md)
- [using functions](/ThermalFunctionSolidProperties.md)

An example will be provided later on this page for creating a new solid userobject.

Then, in the [ThermalSolidPropertiesMaterial](/materials/ThermalSolidPropertiesMaterial.md) material,
the `computeQpProperties` method evaluates the thermal conductivity, isobaric specific heat, and density at
the quadrature points using the values of a coupled variable representing temperature plus the functions provided by
the selected userobject.

!listing modules/solid_properties/src/materials/ThermalSolidPropertiesMaterial.C start=computeQpProperties

## Usage

The solid properties material can be accessed in MOOSE objects through the usual Material
interface. Here, we show an example where thermal conductivity is needed in a kernel
named `HeatDiffusion`.

### Source

To access the properties defined in the Solid Properties module in a MOOSE object,
add the desired material properties to the class members:

!listing modules/solid_properties/test/src/kernels/HeatDiffusion.C start=parameters end={

In the header file of the MOOSE object where a solid material property is needed,
`const` references to the material properties are required:

!listing modules/solid_properties/test/include/kernels/HeatDiffusion.h start=/// thermal end=};

The name `_k` is arbitrary, and may be selected as desired per application.
Then, material properties are used just as other MOOSE materials are used. For example, the
weak residual for the heat diffusion kernel grabs the value of thermal conductivity at the
present quadrature point.

!listing modules/solid_properties/test/src/kernels/HeatDiffusion.C start=computeQpResidual end=Real

### Input file syntax

The userobjects defining the material properties are set up in the `UserObjects` block.  For
example, to use stainless steel 316 thermal properties to provide the thermal conductivity in
the `HeatDiffusion` kernel above, the input file syntax would be:

!listing modules/solid_properties/test/tests/userobjects/stainless_steel_316/stainless_steel_316.i
  start=Modules
  end=Kernels

Due to the consistent interface for solid properties, a different solid can be substituted in the
input file be changing the type of the userobject. For example, to set thermal properties
with a general functional dependence instead, the solid property module section of
the input file is:

!listing modules/solid_properties/test/tests/userobjects/functional/functional.i
  start=Modules
  end=Kernels

## Creating additional solids

New solids can be added by inheriting from the userobject base class appropriate
to the formulation and overriding the methods that describe the solid properties.

For example, suppose new thermal solid properties were desired for granite.
The first step is to create a userobject named `ThermalGraniteProperties` by
inheriting from [ThermalSolidProperties](/userobjects/ThermalSolidProperties.md) and
overriding all methods that you would like to implement.
The header file for your new userobject indicates all methods that will be defined.

!listing! language=cpp
#pragma once

#include "ThermalSolidProperties.h"

class ThermalGraniteProperties : public ThermalSolidProperties
{
#pragma GCC diagnostic push
#pragma GCC diagnostic ignored "-Woverloaded-virtual"
public:
  static InputParameters validParams();

  ThermalGraniteProperties(const InputParameters & parameters);

  virtual Real k_from_T(const Real & T) const override;
  virtual void k_from_T(const Real & T, Real & k, Real & dk_dT) const override;
  virtual void k_from_T(const DualReal & T, DualReal & k, DualReal & dk_dT) const override;

  virtual Real cp_from_T(const Real & T) const override;
  virtual void cp_from_T(const Real & T, Real & cp, Real & dcp_dT) const override;
  virtual void cp_from_T(const DualReal & T, DualReal & cp, DualReal & dcp_dT) const override;

  virtual Real rho_from_T(const Real & T) const override;
  virtual void rho_from_T(const Real & T, Real & rho, Real & drho_dT) const override;
  virtual void rho_from_T(const DualReal & T, DualReal & rho, DualReal & drho_dT) const override;
};
!listing-end!

Next, implement those methods in a `ThermalGraniteProperties` userobject. You can provide
a class description to make it clear what properties this new material provides.

!listing! language=cpp
#include "ThermalGraniteProperties.h"

registerMooseObject("SolidPropertiesApp", ThermalGraniteProperties);
<commit_msg>Remove unused methods from documentation. Refs #12284<commit_after># Solid Properties Module

The Solid Properties module provides a consistent interface to solid properties. Unlike
fluid properties that are oftentimes only a function of pressure and temperature
(or two other state variables), solid properties are frequently a function of many
other parameters in addition to temperature, such as accumulated radiation damage,
oxidation state, and microstructure. Some commonly-used properties in physics
simulations include thermal
properties such as specific heat, thermal conductivity, and emissivity; and
mechanical properties such as elastic modulus and Poisson ratio.

This module provides a consistent interface to define solid material properties.
A flexible design permits extension by other applications to include custom
properties. This module allows different solids
to be used in a physics simulation by simply swapping the name of the solid properties
userobject in a plug-and-play manner.

!alert warning
Always verify that the material properties provided in this module agree with
the system you are modeling. The selection of particular correlations here does not
constitute an endorsement of the accuracy of those correlations.

This module provides solid properties for different solids, organized according to
the overall type of property. The overall design of this module is as follows:

1. *UserObjects* contain functions to compute various solid properties in terms
   of dependent quantities (temperature, porosity, etc.). Different "categories" of
   solid properties are grouped together into different userobjects. For example,
   common solid properties used in thermal simulations (specific heat, thermal conductivity),
   are provided by derived classes of the [ThermalSolidProperties](/userobjects/ThermalSolidProperties.md)
   userobject. Mechanics properties (Youngs modulus, Poisson ratio), would be provided by
   a separate "family" of userobjects.
2. *Materials* call these userobject functions to compute the material properties at
   quadrature points. Like the userobjects, these materials are grouped into "categories."
   For example, common solid properties for thermal simulations are evaluated by the
   [ThermalSolidPropertiesMaterial](/materials/ThermalSolidPropertiesMaterial.md).

## Thermal properties

Thermal properties (density, specific heat, and thermal conductivity) are computed by
userobjects inheriting from the [ThermalSolidProperties](/userobjects/ThermalSolidProperties.md) base class. This class
defines functions to compute these material properties as a function of temperature:

- compute isobaric specific heat - `Real cp_from_T(const Real & T)`
- compute thermal conductivity - `Real k_from_T(const Real & T)`
- compute density - `Real rho_from_T(const Real & T)`

Functions to compute derivatives of these properties as a function of temperature
are also available:

- compute isobaric specific heat and its temperature derivative - `void cp_from_T(const Real & T, Real & cp, Real & dcp_dT)`
- compute thermal conductivity and its temperature derivative - `void k_from_T(const Real & T, Real & k, Real & dk_dT)`
- compute density and its temperature derivative - `void rho_from_T(const Real & T, Real & rho, Real & drho_dT)`

Userobjects available in the Solid Properties module that provide thermal properties are:

- [graphite](/ThermalGraphiteProperties.md)
- [monolithic silicon carbide](/ThermalMonolithicSiCProperties.md)
- [composite silicon carbide](/ThermalCompositeSiCProperties.md)
- [stainless steel alloy 316](/ThermalSS316Properties.md)
- [using functions](/ThermalFunctionSolidProperties.md)

An example will be provided later on this page for creating a new solid userobject.

Then, in the [ThermalSolidPropertiesMaterial](/materials/ThermalSolidPropertiesMaterial.md) material,
the `computeQpProperties` method evaluates the thermal conductivity, isobaric specific heat, and density at
the quadrature points using the values of a coupled variable representing temperature plus the functions provided by
the selected userobject.

!listing modules/solid_properties/src/materials/ThermalSolidPropertiesMaterial.C start=computeQpProperties

## Usage

The solid properties material can be accessed in MOOSE objects through the usual Material
interface. Here, we show an example where thermal conductivity is needed in a kernel
named `HeatDiffusion`.

### Source

To access the properties defined in the Solid Properties module in a MOOSE object,
add the desired material properties to the class members:

!listing modules/solid_properties/test/src/kernels/HeatDiffusion.C start=parameters end={

In the header file of the MOOSE object where a solid material property is needed,
`const` references to the material properties are required:

!listing modules/solid_properties/test/include/kernels/HeatDiffusion.h start=/// thermal end=};

The name `_k` is arbitrary, and may be selected as desired per application.
Then, material properties are used just as other MOOSE materials are used. For example, the
weak residual for the heat diffusion kernel grabs the value of thermal conductivity at the
present quadrature point.

!listing modules/solid_properties/test/src/kernels/HeatDiffusion.C start=computeQpResidual end=Real

### Input file syntax

The userobjects defining the material properties are set up in the `UserObjects` block.  For
example, to use stainless steel 316 thermal properties to provide the thermal conductivity in
the `HeatDiffusion` kernel above, the input file syntax would be:

!listing modules/solid_properties/test/tests/userobjects/stainless_steel_316/stainless_steel_316.i
  start=Modules
  end=Kernels

Due to the consistent interface for solid properties, a different solid can be substituted in the
input file be changing the type of the userobject. For example, to set thermal properties
with a general functional dependence instead, the solid property module section of
the input file is:

!listing modules/solid_properties/test/tests/userobjects/functional/functional.i
  start=Modules
  end=Kernels

## Creating additional solids

New solids can be added by inheriting from the userobject base class appropriate
to the formulation and overriding the methods that describe the solid properties.

For example, suppose new thermal solid properties were desired for granite.
The first step is to create a userobject named `ThermalGraniteProperties` by
inheriting from [ThermalSolidProperties](/userobjects/ThermalSolidProperties.md) and
overriding all methods that you would like to implement.
The header file for your new userobject indicates all methods that will be defined.

!listing! language=cpp
#pragma once

#include "ThermalSolidProperties.h"

class ThermalGraniteProperties : public ThermalSolidProperties
{
#pragma GCC diagnostic push
#pragma GCC diagnostic ignored "-Woverloaded-virtual"
public:
  static InputParameters validParams();

  ThermalGraniteProperties(const InputParameters & parameters);

  virtual Real k_from_T(const Real & T) const override;
  virtual void k_from_T(const Real & T, Real & k, Real & dk_dT) const override;

  virtual Real cp_from_T(const Real & T) const override;
  virtual void cp_from_T(const Real & T, Real & cp, Real & dcp_dT) const override;

  virtual Real rho_from_T(const Real & T) const override;
  virtual void rho_from_T(const Real & T, Real & rho, Real & drho_dT) const override;
};

#pragma GCC diagnostic pop
!listing-end!

Next, implement those methods in a `ThermalGraniteProperties` userobject. You can provide
a class description to make it clear what properties this new material provides.

!listing! language=cpp
#include "ThermalGraniteProperties.h"

registerMooseObject("SolidPropertiesApp", ThermalGraniteProperties);

{'fraction_non_alphanumeric': 0.05190617689827401, 'fraction_numerical': 0.002465701460453942, 'mean_word_length': 5.533663775299463, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '6036736', 'n_tokens_mistral': 4114, 'n_tokens_neox': 3831, 'n_words': 1865}