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 : #pragma once 11 : 12 : #include "Compute1DSmallStrain.h" 13 : #include "SubblockIndexProvider.h" 14 : 15 : /** 16 : * ComputeAxisymmetric1DSmallStrain defines small strains in an Axisymmetric 1D problem. 17 : * The COORD_TYPE in the Problem block must be set to RZ. 18 : */ 19 : class ComputeAxisymmetric1DSmallStrain : public Compute1DSmallStrain 20 : { 21 : public: 22 : static InputParameters validParams(); 23 : 24 : ComputeAxisymmetric1DSmallStrain(const InputParameters & parameters); 25 : 26 : void initialSetup() override; 27 : 28 : protected: 29 : /// Computes the strain_yy for axisymmetric problems 30 : Real computeStrainYY() override; 31 : 32 : /// Computes the strain_zz for axisymmetric problems, where 33 : /// \f$ \epsilon_{\theta} = \frac{u_r}{r} \f$ 34 : Real computeStrainZZ() override; 35 : 36 : /// gets its subblock index for current element 37 4976 : unsigned int getCurrentSubblockIndex() const 38 : { 39 4976 : return _subblock_id_provider ? _subblock_id_provider->getSubblockIndex(*_current_elem) : 0; 40 : }; 41 : 42 : /// A Userobject that carries the subblock ID for all elements 43 : const SubblockIndexProvider * const _subblock_id_provider; 44 : 45 : /// Whether an out-of-plane strain variable is coupled 46 : const bool _has_out_of_plane_strain; 47 : 48 : /// The out-of-plane strain variable 49 : const VariableValue & _out_of_plane_strain; 50 : 51 : /// Whether out-of-plane strain scalar variables are coupled 52 : const bool _has_scalar_out_of_plane_strain; 53 : 54 : /// The out-of-plane strain scalar variables 55 : std::vector<const VariableValue *> _scalar_out_of_plane_strain; 56 : };