-
Notifications
You must be signed in to change notification settings - Fork 1k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #18395 from lindsayad/functor-material
Functor material properties
- Loading branch information
Showing
290 changed files
with
7,315 additions
and
1,239 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
17 changes: 17 additions & 0 deletions
17
framework/doc/content/source/materials/GenericConstantFunctorMaterial.md
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
# GenericConstantFunctorMaterial | ||
|
||
!syntax description /Materials/GenericConstantFunctorMaterial | ||
|
||
## Overview | ||
|
||
This object is very similar to [GenericConstantMaterial.md] and takes the exact | ||
same input file syntax. The difference is that this object creates | ||
[functor material properties](Materials/index.md#functor-props), e.g. properties | ||
that get evaluated on-the-fly, as opposed to traditional "static" material | ||
properties, e.g. material properties that are pre-evaluated. | ||
|
||
!syntax parameters /Materials/GenericConstantFunctorMaterial | ||
|
||
!syntax inputs /Materials/GenericConstantFunctorMaterial | ||
|
||
!syntax children /Materials/GenericConstantFunctorMaterial |
22 changes: 22 additions & 0 deletions
22
framework/doc/content/source/materials/GenericConstantVectorFunctorMaterial.md
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
# GenericConstantVectorFunctorMaterial | ||
|
||
!syntax description /Materials/GenericConstantVectorFunctorMaterial | ||
|
||
The functor version of [GenericConstantVectorFunctorMaterial.md], this can be | ||
used to quickly create simple constant anisotropic material properties, for | ||
testing, for initial survey of a problem or simply because the material | ||
properties do not vary much over the domain explored by the simulation. | ||
|
||
## Example Input File Syntax | ||
|
||
In this example, we create a `GenericConstantVectorFunctorMaterial` for two | ||
anisotropic friction factors in a porous media flow simulation. Note the syntax | ||
for declaring two material properties and their values in the same material. | ||
|
||
!listing modules/navier_stokes/test/tests/finite_volume/pins/channel-flow/2d-rc-friction.i block=Materials/darcy | ||
|
||
!syntax parameters /Materials/GenericConstantVectorFunctorMaterial | ||
|
||
!syntax inputs /Materials/GenericConstantVectorFunctorMaterial | ||
|
||
!syntax children /Materials/GenericConstantVectorFunctorMaterial |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
31 changes: 31 additions & 0 deletions
31
framework/doc/content/source/materials/GenericFunctionFunctorMaterial.md
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
# GenericFunctionFunctorMaterial | ||
|
||
!syntax description /Materials/GenericFunctionFunctorMaterial | ||
|
||
## Overview | ||
|
||
This class template is the functor material property version of | ||
[GenericFunctionMaterial.md]. It evaluates the function at the requested location, | ||
which can be the element centroid, an element face centroid, a quadrature point, | ||
or any defined overload of the functor argument. | ||
|
||
By default this class caches function evaluations | ||
and clears the cache at the beginning of every timestep. Cache clearing behavior can be | ||
controlled by setting the `execute_on` parameter. | ||
|
||
## Example Input File Syntax | ||
|
||
In this example, `ADGenericFunctionMaterial` is used to define a linearly varying in space | ||
diffusion coefficient for this finite volume diffusion calculation. | ||
We add the prefix `AD` as this simulation is making use of automatic differentiation to compute the Jacobian exactly. | ||
The diffusion coefficient is retrieved as a `Moose::Functor<ADReal>`, the base class | ||
of `FunctorMaterialProperty<ADReal>`, by the diffusion kernel. The diffusion kernel can | ||
then obtain the diffusion coefficient directly on the faces when evaluating the face flux. | ||
|
||
!listing test/tests/materials/boundary_material/fv_material_quadrature.i block=Materials/k1 | ||
|
||
!syntax parameters /Materials/GenericFunctionFunctorMaterial | ||
|
||
!syntax inputs /Materials/GenericFunctionFunctorMaterial | ||
|
||
!syntax children /Materials/GenericFunctionFunctorMaterial |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
16 changes: 16 additions & 0 deletions
16
framework/doc/content/source/materials/VarFunctorMaterial.md
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
# VarFunctorMaterial | ||
|
||
!syntax description /Materials/VarFunctorMaterial | ||
|
||
## Overview | ||
|
||
Creates a functor material property with name corresponding to the value | ||
provided for the parameter `mat_prop_name`. The functor material property | ||
evaluation will be equivalent to the evaluation of the coupled variable `var` at | ||
the provided geometric argument. | ||
|
||
!syntax parameters /Materials/VarFunctorMaterial | ||
|
||
!syntax inputs /Materials/VarFunctorMaterial | ||
|
||
!syntax children /Materials/VarFunctorMaterial |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.