LCOV - code coverage report
Current view: top level - src/materials - ComputeThermalExpansionEigenDeformationGradient.C (source / functions) Hit Total Coverage
Test: coverage.info Lines: 22 26 84.6 %
Date: 2025-02-21 01:06:12 Functions: 3 4 75.0 %

          Line data    Source code
       1             : //* This file is part of the RACCOON application
       2             : //* being developed at Dolbow lab at Duke University
       3             : //* http://dolbow.pratt.duke.edu
       4             : 
       5             : #include "ComputeThermalExpansionEigenDeformationGradient.h"
       6             : 
       7             : registerADMooseObject("raccoonApp", ComputeThermalExpansionEigenDeformationGradient);
       8             : 
       9             : InputParameters
      10         142 : ComputeThermalExpansionEigenDeformationGradient::validParams()
      11             : {
      12         142 :   InputParameters params = Material::validParams();
      13         142 :   params += BaseNameInterface::validParams();
      14         142 :   params.addClassDescription(
      15             :       "This class computes the thermal deformation gradient, $\bfF = (1+\alpha(T-T_0))\bfI$, "
      16             :       "where $\alpha$ is the thermal expansion coefficient, $T$ is the temperature, and $T_0$ is "
      17             :       "the reference temperature corresponding to zero thermal expansion.");
      18             : 
      19         284 :   params.addRequiredParam<MaterialPropertyName>("eigen_deformation_gradient_name",
      20             :                                                 "The name of the thermal deformation gradient");
      21         284 :   params.addRequiredParam<FunctionName>(
      22             :       "thermal_expansion_function",
      23             :       "Function describing the thermal expansion coefficient $\alpha$");
      24         284 :   params.addRequiredCoupledVar("temperature", "The current temperature");
      25         284 :   params.addRequiredCoupledVar("reference_temperature",
      26             :                                "The reference temperature corresponding to zero thermal expansion");
      27             : 
      28         142 :   params.suppressParameter<bool>("use_displaced_mesh");
      29         142 :   return params;
      30           0 : }
      31             : 
      32           3 : ComputeThermalExpansionEigenDeformationGradient::ComputeThermalExpansionEigenDeformationGradient(
      33           3 :     const InputParameters & parameters)
      34             :   : Material(parameters),
      35             :     BaseNameInterface(parameters),
      36           3 :     _Fg(declareADProperty<RankTwoTensor>(prependBaseName("eigen_deformation_gradient_name", true))),
      37           3 :     _alpha(getFunction("thermal_expansion_function")),
      38           3 :     _T(adCoupledValue("temperature")),
      39           6 :     _T0(coupledValue("reference_temperature"))
      40             : {
      41           3 : }
      42             : 
      43             : void
      44           0 : ComputeThermalExpansionEigenDeformationGradient::initQpStatefulProperties()
      45             : {
      46           0 :   computeQpProperties();
      47           0 : }
      48             : 
      49             : void
      50         504 : ComputeThermalExpansionEigenDeformationGradient::computeQpProperties()
      51             : {
      52             :   const Point p;
      53         504 :   const Real alpha = _alpha.value(MetaPhysicL::raw_value(_T[_qp]), p);
      54             : 
      55         504 :   _Fg[_qp].setToIdentity();
      56        1512 :   _Fg[_qp] *= 1 + alpha * (_T[_qp] - _T0[_qp]);
      57         504 : }

Generated by: LCOV version 1.16