LCOV - code coverage report
Current view: top level - src/materials - ComputeSmallStrainMaterialBaseBPD.C (source / functions) Hit Total Coverage
Test: idaholab/moose peridynamics: #31405 (292dce) with base fef103 Lines: 15 24 62.5 %
Date: 2025-09-04 07:55:08 Functions: 3 3 100.0 %
Legend: Lines: hit not hit

          Line data    Source code
       1             : //* This file is part of the MOOSE framework
       2             : //* https://mooseframework.inl.gov
       3             : //*
       4             : //* All rights reserved, see COPYRIGHT for full restrictions
       5             : //* https://github.com/idaholab/moose/blob/master/COPYRIGHT
       6             : //*
       7             : //* Licensed under LGPL 2.1, please see LICENSE for details
       8             : //* https://www.gnu.org/licenses/lgpl-2.1.html
       9             : 
      10             : #include "ComputeSmallStrainMaterialBaseBPD.h"
      11             : 
      12             : InputParameters
      13         237 : ComputeSmallStrainMaterialBaseBPD::validParams()
      14             : {
      15         237 :   InputParameters params = ParametricMaterialBasePD::validParams();
      16         237 :   params.addClassDescription("Base class for bond-based peridynamic mechanics models");
      17             : 
      18         237 :   return params;
      19           0 : }
      20             : 
      21         186 : ComputeSmallStrainMaterialBaseBPD::ComputeSmallStrainMaterialBaseBPD(
      22         186 :     const InputParameters & parameters)
      23         186 :   : ParametricMaterialBasePD(parameters)
      24             : {
      25         186 : }
      26             : 
      27             : void
      28     1044022 : ComputeSmallStrainMaterialBaseBPD::computeBondForce()
      29             : {
      30     1044022 :   if (_scalar_out_of_plane_strain_coupled)
      31             :   {
      32           0 :     _bond_local_force[_qp] =
      33           0 :         _Cij *
      34           0 :         (_mechanical_stretch[_qp] +
      35           0 :          _poissons_ratio * (_scalar_out_of_plane_strain[0] -
      36           0 :                             _alpha * (0.5 * (_temp[0] + _temp[1]) - _temp_ref))) *
      37           0 :         _node_vol[0] * _node_vol[1];
      38           0 :     _bond_local_dfdT[_qp] =
      39           0 :         -_Cij * (1.0 + _poissons_ratio) * 0.5 * _alpha * _node_vol[0] * _node_vol[1];
      40             :   }
      41             :   else
      42             :   {
      43     1044022 :     _bond_local_force[_qp] = _Cij * _mechanical_stretch[_qp] * _node_vol[0] * _node_vol[1];
      44     1044022 :     _bond_local_dfdT[_qp] = -_Cij * 0.5 * _alpha * _node_vol[0] * _node_vol[1];
      45             :   }
      46             : 
      47     1044022 :   _bond_local_dfdU[_qp] = _Cij / _origin_vec.norm() * _node_vol[0] * _node_vol[1];
      48     1044022 :   _bond_local_dfdE[_qp] = _Cij * _poissons_ratio * _node_vol[0] * _node_vol[1];
      49     1044022 : }

Generated by: LCOV version 1.14