https://mooseframework.inl.gov
Loading...
Searching...
No Matches
ADComputeRSphericalFiniteStrain.C
Go to the documentation of this file.
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
11#include "Assembly.h"
12#include "FEProblem.h"
13#include "MooseMesh.h"
14
15#include "libmesh/quadrature.h"
16
18
21{
23 params.addClassDescription("Compute a strain increment and rotation increment for finite strains "
24 "in 1D spherical symmetry problems.");
25 return params;
26}
27
29 : ADComputeFiniteStrain(parameters), _disp_old_0(coupledValueOld("displacements", 0))
30{
31}
32
33void
35{
37
38 const auto & subdomainIDs = _mesh.meshSubdomains();
39 for (auto subdomainID : subdomainIDs)
41 mooseError("The coordinate system must be set to RSPHERICAL for 1D R spherical simulations.");
42}
43
44void
46{
47 for (_qp = 0; _qp < _qrule->n_points(); ++_qp)
48 {
49 // Deformation gradient calculation in cylindrical coordinates
50 ADRankTwoTensor A; // Deformation gradient
51 RankTwoTensor Fbar; // Old Deformation gradient
52
53 // Step through calculating the current and old deformation gradients
54 // Only diagonal components are nonzero because this is a 1D material
55 // Note: x_disp is the radial displacement
56 A(0, 0) = (*_grad_disp[0])[_qp](0);
57 Fbar(0, 0) = (*_grad_disp_old[0])[_qp](0);
58
59 // The polar and azimuthal strains are functions of radial displacement
60 if (!MooseUtils::relativeFuzzyEqual(_q_point[_qp](0), 0.0))
61 {
62 A(1, 1) = (*_disp[0])[_qp] / _q_point[_qp](0);
63 Fbar(1, 1) = _disp_old_0[_qp] / _q_point[_qp](0);
64 }
65
66 // The polar and azimuthal strains are equivalent in this 1D problem
67 A(2, 2) = A(1, 1);
68 Fbar(2, 2) = Fbar(1, 1);
69
70 // very nearly A = gradU - gradUold, adapted to cylindrical coords
71 A -= Fbar;
72
73 // Fbar = ( I + gradUold)
74 Fbar.addIa(1.0);
75
76 // Incremental deformation gradient _Fhat = I + A Fbar^-1
77 _Fhat[_qp] = A * Fbar.inverse();
78 _Fhat[_qp].addIa(1.0);
79
81 }
82}
registerMooseObject("SolidMechanicsApp", ADComputeRSphericalFiniteStrain)
ADComputeFiniteStrain defines a strain increment and rotation increment, for finite strains.
static InputParameters validParams()
std::vector< ADRankTwoTensor > _Fhat
std::vector< const VariableGradient * > _grad_disp_old
ADComputeRSphericalFiniteStrain defines a strain increment and a rotation increment for finite strain...
ADComputeRSphericalFiniteStrain(const InputParameters &parameters)
const VariableValue & _disp_old_0
the old value of the first component of the displacements vector
virtual void computeProperties()
Computes the current and old deformation gradients with the assumptions for 1D spherical symmetry geo...
std::vector< const ADVariableValue * > _disp
Displacement variables.
std::vector< const ADVariableGradient * > _grad_disp
Gradient of displacements.
void addClassDescription(const std::string &doc_string)
unsigned int _qp
MooseMesh & _mesh
FEProblemBase & _fe_problem
const QBase *const & _qrule
const MooseArray< Point > & _q_point
void mooseError(Args &&... args) const
const std::set< SubdomainID > & meshSubdomains() const
void addIa(const T &a)
RankTwoTensorTempl< T > inverse() const
Moose::CoordinateSystemType getCoordSystem(SubdomainID sid) const
COORD_RSPHERICAL